summaryrefslogtreecommitdiff
path: root/src/proto.c
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-06-19 19:28:04 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-06-19 19:28:04 +0000
commita370d2f5860a0f89ac44af857d1059885ad1d60f (patch)
tree5ad5112a884e41367b271a8ea3509dec04524819 /src/proto.c
parentfadf9365dba24b680db5cb8750c53e264ff1ec27 (diff)
- upravy v kode
- prepis stirel pre space_t * - v kode su dva vyhladavacie algortmy, implicitne sa pouziva ten ktory funguje :) ten co nefunguje je zamakrovany makrom SUPPORT_ERROR a este ho musim doladit git-svn-id: http://opensvn.csie.org/tuxanci_ng@66 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/proto.c')
-rw-r--r--src/proto.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/proto.c b/src/proto.c
index e14db9f..72e8f16 100644
--- a/src/proto.c
+++ b/src/proto.c
@@ -753,10 +753,9 @@ void proto_recv_shot_client(char *msg)
proto_send_check_client(check_id);
- if( ( shot = getShotID(getCurrentArena()->listShot, shot_id) ) != NULL )
+ if( ( shot = getObjectFromSpaceWithID(getCurrentArena()->spaceShot, shot_id) ) != NULL )
{
- delListItem(getCurrentArena()->listShot,
- searchListItem(getCurrentArena()->listShot, shot), destroyShot);
+ delObjectFromSpaceWithObject(getCurrentArena()->spaceShot, shot, destroyShot);
//return;
}
@@ -772,7 +771,7 @@ void proto_recv_shot_client(char *msg)
transformOnlyLasser(shot);
}
- addList(getCurrentArena()->listShot, shot);
+ addObjectToSpace(getCurrentArena()->spaceShot, shot);
}
#endif
@@ -807,18 +806,11 @@ void proto_recv_delshot_client(char *msg)
proto_send_check_client(check_id);
- shot = getShotID(getCurrentArena()->listShot, id);
+ shot = getObjectFromSpaceWithID(getCurrentArena()->spaceShot, id);
if( shot != NULL )
{
- int index;
-
- index = searchListItem(getCurrentArena()->listShot, shot);
-
- if( index >= 0 )
- {
- delListItem(getCurrentArena()->listShot, index, destroyShot);
- }
+ delObjectFromSpaceWithObject(getCurrentArena()->spaceShot, shot, destroyShot);
}
}