summaryrefslogtreecommitdiff
path: root/src/base/proto.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/proto.c')
-rw-r--r--src/base/proto.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/base/proto.c b/src/base/proto.c
index b109115..9a5cc4b 100644
--- a/src/base/proto.c
+++ b/src/base/proto.c
@@ -381,12 +381,11 @@ void proto_send_newtux_server(int type, client_t *client, tux_t *tux)
}
else
{
- x = tux->x;
- y = tux->y;
+ //x = tux->x;
+ //y = tux->y;
+ getTuxProportion(tux, &x, &y, NULL, NULL);
}
- getTuxProportion(tux, &x, &y, NULL, NULL);
-
sprintf(msg, "newtux %d %d %d %d %d %d %d %s %d %d %d %d %d %d %d %d %d %d %d\n",
tux->id ,x, y, tux->status, tux->position ,tux->frame, tux->score, tux->name,
tux->gun, tux->bonus, tux->shot[GUN_SIMPLE], tux->shot[GUN_DUAL_SIMPLE],
@@ -440,8 +439,19 @@ void proto_recv_newtux_client(char *msg)
addObjectToSpace(getCurrentArena()->spaceTux, tux);
}
+ if( tux->control == TUX_CONTROL_KEYBOARD_RIGHT &&
+ x == TUX_LOCATE_UNKNOWN && y == TUX_LOCATE_UNKNOWN )
+ {
+ getTuxProportion(tux, &x, &y, NULL, NULL);
+ }
+
addToRadar(id, x, y, RADAR_TYPE_TUX);
+ if( tux->bonus == BONUS_HIDDEN )
+ {
+ delFromRadar(id);
+ }
+
moveObjectInSpace(getCurrentArena()->spaceTux, tux, x, y);
tux->status = status;
tux->position = position;