summaryrefslogtreecommitdiff
path: root/src/wall.c
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-05-04 19:22:36 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-05-04 19:22:36 +0000
commit8b70ac9538f7e4da10666cfc21fd368a91a77ae3 (patch)
tree0157c0b2378e3032fa2357a6e543e3bbab03445c /src/wall.c
parent9058b5c0bfc9a05c9004cfbbcdd3bb85d80ed6fc (diff)
- oprava chyby -> client sa zrutil ak dostal packety "init" a "additem" v opacnom poradi
- oprava chyby -> item a shot ukazoval pointerom na tuxa, to znamenalo, ze ak sa tux odhlasil, tak item a shot ukazoval do uvolnenej pamate - oprava chyby -> exploziu si client pridaval sam, a este prijmal packet od servera, ze sa ma pridat explozia git-svn-id: http://opensvn.csie.org/tuxanci_ng@50 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/wall.c')
-rw-r--r--src/wall.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/wall.c b/src/wall.c
index 54f034a..c91f58d 100644
--- a/src/wall.c
+++ b/src/wall.c
@@ -100,6 +100,7 @@ int isConflictWithListWall(list_t *listWall, int x, int y, int w, int h)
void eventConflictShotWithWall(list_t *listWall, list_t *listShot)
{
shot_t *thisShot;
+ tux_t *author;
int i;
assert( listWall != NULL );
@@ -112,8 +113,11 @@ void eventConflictShotWithWall(list_t *listWall, list_t *listShot)
if( isConflictWithListWall(listWall, thisShot->x, thisShot->y, thisShot->w, thisShot->h) )
{
- if( thisShot->author->bonus == BONUS_GHOST &&
- thisShot->author->bonus_time > 0 )
+ author = getTuxID( getCurrentArena()->listShot, thisShot->author_id );
+
+ if( author != NULL &&
+ author->bonus == BONUS_GHOST &&
+ author->bonus_time > 0 )
{
continue;
}