summaryrefslogtreecommitdiff
path: root/src/gun.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gun.c')
-rw-r--r--src/gun.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/gun.c b/src/gun.c
index 96d0f21..bddeda1 100644
--- a/src/gun.c
+++ b/src/gun.c
@@ -93,7 +93,16 @@ static void addShotTrivial(tux_t *tux, int x, int y, int px, int py, int gun)
if( getNetTypeGame() == NET_GAME_TYPE_SERVER )
{
- proto_send_shot_server(PROTO_SEND_ALL, NULL, shot);
+ client_t *thisClient;
+
+ thisClient = getClientFromTux(tux);
+
+ if( thisClient != NULL )
+ {
+ proto_send_shot_server(PROTO_SEND_ONE, thisClient, shot);
+ }
+
+ proto_send_shot_server(PROTO_SEND_ALL_SEES_TUX, thisClient, shot);
}
}
@@ -178,7 +187,7 @@ static void timer_addShotTimer(void *p)
id = * ((int *)p);
free(p);
- tux = getTuxID(getCurrentArena()->listTux, id);
+ tux = getObjectFromSpaceWithID(getCurrentArena()->spaceTux, id);
if( tux == NULL )return;
@@ -209,7 +218,7 @@ static void timer_addLaserTimer(void *p)
id = * ((int *)p);
free(p);
- tux = getTuxID(getCurrentArena()->listTux, id);
+ tux = getObjectFromSpaceWithID(getCurrentArena()->spaceTux, id);
if( tux == NULL )return;
@@ -281,7 +290,7 @@ static void putInGunMine(tux_t *tux)
proto_send_additem_server(PROTO_SEND_ALL, NULL, item);
}
- addList(arena->listItem, item );
+ addObjectToSpace(arena->spaceItem, item );
}
}
}