summaryrefslogtreecommitdiff
path: root/src/base/proto.c
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-07-04 19:16:27 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-07-04 19:16:27 +0000
commit247baf298bf2425fd91297ea18d716e714cb3dc5 (patch)
treecfe9277e1d8086d2b38b13f2caf75dea4b73c41e /src/base/proto.c
parent157e2a29828f2ddbdf32e1c9e565b13e5e732e34 (diff)
- podpora bigAren :-)
- radar git-svn-id: http://opensvn.csie.org/tuxanci_ng@90 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/base/proto.c')
-rw-r--r--src/base/proto.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/base/proto.c b/src/base/proto.c
index 9c9c3c7..b109115 100644
--- a/src/base/proto.c
+++ b/src/base/proto.c
@@ -26,6 +26,7 @@
#include "screen/screen_analyze.h"
#include "client/client.h"
#include "client/term.h"
+#include "client/radar.h"
#endif
#ifdef PUBLIC_SERVER
@@ -325,6 +326,7 @@ void proto_recv_event_client(char *msg)
if( tux != NULL )
{
actionTux(tux, action);
+ addToRadar(tux->id, tux->x, tux->y, RADAR_TYPE_TUX);
}
}
@@ -438,6 +440,8 @@ void proto_recv_newtux_client(char *msg)
addObjectToSpace(getCurrentArena()->spaceTux, tux);
}
+ addToRadar(id, x, y, RADAR_TYPE_TUX);
+
moveObjectInSpace(getCurrentArena()->spaceTux, tux, x, y);
tux->status = status;
tux->position = position;
@@ -534,6 +538,7 @@ void proto_recv_del_client(char *msg)
sprintf(term_msg, "tux with id %d is disconnect\n", tux->id);
appendTextInTerm(term_msg);
+ delFromRadar(id);
delObjectFromSpaceWithObject(getCurrentArena()->spaceTux, tux, destroyTux);
return;
}
@@ -543,6 +548,7 @@ void proto_recv_del_client(char *msg)
if( shot != NULL )
{
//printf("delete shot..\n");
+ delFromRadar(id);
delObjectFromSpaceWithObject(getCurrentArena()->spaceShot, shot, destroyShot);
return;
}
@@ -552,6 +558,7 @@ void proto_recv_del_client(char *msg)
if( item != NULL )
{
//printf("delete item..\n");
+ delFromRadar(id);
delObjectFromSpaceWithObject(getCurrentArena()->spaceItem, item, destroyItem);
return;
}
@@ -601,6 +608,8 @@ void proto_recv_additem_client(char *msg)
return;
}
+ addToRadar(id, x, y, RADAR_TYPE_ITEM);
+
item = newItem(x, y, type, author_id);
replaceItemID(item, id);