From 0eda3185ba30d433029c9a7e725529a801c93d80 Mon Sep 17 00:00:00 2001 From: oroborus Date: Tue, 8 Jul 2008 21:17:12 +0000 Subject: - do widgetu textfiled sa zmesti IP adresa ( zatial aspon IPv4 ) - v arene je vzdy kostantny pocet zbarni/bonsov ( implicitny je 10, nastavuje sa v configu pomocou ITEM ) - oprava chyby, tux s binusom hidden sa moze teleportovat - oprava chyb v moduloch pipe teleport a wall git-svn-id: http://opensvn.csie.org/tuxanci_ng@125 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/modules/modTeleport.c | 37 +++++++++---------------------------- 1 file changed, 9 insertions(+), 28 deletions(-) (limited to 'src/modules/modTeleport.c') diff --git a/src/modules/modTeleport.c b/src/modules/modTeleport.c index 72b3690..d54bb4c 100755 --- a/src/modules/modTeleport.c +++ b/src/modules/modTeleport.c @@ -184,6 +184,7 @@ static int getRandomPosition() } assert( ! "Stupid error ! " ); + return -1; // no warnning } @@ -200,8 +201,6 @@ static void teleportTux(tux_t *tux, teleport_t *teleport) distTeleport = getRandomTeleportBut(spaceTeleport->list, teleport); - //export_fce->fce_getTuxProportion(tux, ¤t_x, ¤t_y, NULL, NULL); - switch( tux->position ) { case TUX_UP : @@ -237,7 +236,14 @@ static void teleportTux(tux_t *tux, teleport_t *teleport) #endif if( export_fce->fce_getNetTypeGame() == NET_GAME_TYPE_SERVER ) { - export_fce->fce_proto_send_newtux_server(PROTO_SEND_ALL, NULL, tux); + if( tux->bonus == BONUS_HIDDEN ) + { + export_fce->fce_proto_send_newtux_server(PROTO_SEND_ONE, (client_t *)tux->client, tux); + } + else + { + export_fce->fce_proto_send_newtux_server(PROTO_SEND_ALL, NULL, tux); + } } } } @@ -253,31 +259,6 @@ static int getSppedShot(shot_t *shot) return ( myAbs(shot->px) > myAbs(shot->py) ? myAbs(shot->px) : myAbs(shot->py) ); } -/* -static void transformOnlyLasser(shot_t *shot) -{ - switch( shot->position ) - { - case TUX_RIGHT : - case TUX_LEFT : - shot->w = GUN_LASSER_HORIZONTAL; - shot->h = GUN_SHOT_VERTICAL; -#ifndef PUBLIC_SERVER - shot->img = g_shot_lasserX; -#endif - break; - case TUX_UP : - case TUX_DOWN : - shot->w = GUN_SHOT_VERTICAL; - shot->h = GUN_LASSER_HORIZONTAL; -#ifndef PUBLIC_SERVER - shot->img = g_shot_lasserY; -#endif - break; - } -} -*/ - static void transformShot(shot_t *shot, int position) { int speed; -- cgit v1.2.3