From 8b70ac9538f7e4da10666cfc21fd368a91a77ae3 Mon Sep 17 00:00:00 2001 From: oroborus Date: Sun, 4 May 2008 19:22:36 +0000 Subject: - 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 --- src/gun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gun.c') diff --git a/src/gun.c b/src/gun.c index a055440..afa6a2f 100644 --- a/src/gun.c +++ b/src/gun.c @@ -77,7 +77,7 @@ static void addShotTrivial(tux_t *tux, int x, int y, int px, int py, int gun) break; } - shot = newShot(tux->x + dest_x, tux->y + dest_y, dest_px, dest_py, gun, tux); + shot = newShot(tux->x + dest_x, tux->y + dest_y, dest_px, dest_py, gun, tux->id); addList( getCurrentArena()->listShot, shot ); if( getNetTypeGame() == NET_GAME_TYPE_SERVER ) @@ -261,7 +261,7 @@ static void putInGunMine(tux_t *tux) if( getNetTypeGame() != NET_GAME_TYPE_CLIENT ) { - item = newItem(x, y, ITEM_MINE, tux); + item = newItem(x, y, ITEM_MINE, tux->id); if( getNetTypeGame() == NET_GAME_TYPE_SERVER ) { -- cgit v1.2.3