summaryrefslogtreecommitdiff
path: root/src/modules/modTeleport.c
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-07-08 21:17:12 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-07-08 21:17:12 +0000
commit0eda3185ba30d433029c9a7e725529a801c93d80 (patch)
tree3eeed16eb926fc3529f051704fd53070670e7124 /src/modules/modTeleport.c
parent7386e93e32575bae21006d0300cbff4cf7a40926 (diff)
- 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
Diffstat (limited to 'src/modules/modTeleport.c')
-rwxr-xr-xsrc/modules/modTeleport.c37
1 files changed, 9 insertions, 28 deletions
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, &current_x, &current_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;