diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-30 16:51:15 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-30 16:51:15 +0000 |
| commit | 617ba439aab5f1798eb02618dfcfbed80a5baf28 (patch) | |
| tree | 13df71c96bd302f066406644f20ddd0e58490ded /src/tux.c | |
| parent | b4db5fe1a7c0145c2437cb2f117a2ae59d4e8025 (diff) | |
- polozky casovaca sa nachadzaju v zozname list_t , ktory he sucastou arena_t
- pri bonuse neviditelnost sa neda podvadzat modifikovanim clienta
- o vystreli sa stara server, ich suradnicu a dalsie info posiela server clientom
- parametre sa pisu vo forme --env=val
git-svn-id: http://opensvn.csie.org/tuxanci_ng@38 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/tux.c')
| -rw-r--r-- | src/tux.c | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -87,7 +87,7 @@ tux_t* newTux() new->gun = GUN_SIMPLE; new->shot[ new->gun ] = GUN_MAX_SHOT; - sprintf(new->name, "no_name_id_%d", new->id); + sprintf(new->name, "no_name_id_%dde", new->id); new->score = 0; new->frame = 0; @@ -155,14 +155,14 @@ void drawTux(tux_t *tux) SDL_Surface *g_image = NULL; assert( tux != NULL ); - - if( tux->bonus == BONUS_HIDDEN && +/* + if( tux->bonus == BONUS_HIDDEN && getNetTypeGame() != NET_GAME_TYPE_NONE && tux->control == TUX_CONTROL_NET ) { return; } - +*/ switch( tux->position ) { case TUX_UP : @@ -391,7 +391,7 @@ void eventTuxIsDead(tux_t *tux) if( getNetTypeGame() != NET_GAME_TYPE_CLIENT ) { - addTimer(timer_spawnTux, newInt(tux->id), TUX_TIME_SPAWN ); + addTimer(getCurrentArena()->listTimer, timer_spawnTux, newInt(tux->id), TUX_TIME_SPAWN ); } if( getNetTypeGame() == NET_GAME_TYPE_SERVER ) @@ -609,7 +609,8 @@ void switchTuxGun(tux_t *tux) { tux->gun = i; tux->isCanSwitchGun = FALSE; - addTimer(timer_tuxCanSwitchGun, newInt(tux->id), TUX_TIME_CAN_SWITCH_GUN ); + addTimer(getCurrentArena()->listTimer, timer_tuxCanSwitchGun, + newInt(tux->id), TUX_TIME_CAN_SWITCH_GUN ); #ifndef PUBLIC_SERVER playSound("switch_gun", SOUND_GROUP_BASE); sprintf(msg, "tux with id %d switch gun\n", tux->id); @@ -625,7 +626,8 @@ void switchTuxGun(tux_t *tux) { tux->gun = i; tux->isCanSwitchGun = FALSE; - addTimer(timer_tuxCanSwitchGun, newInt(tux->id), TUX_TIME_CAN_SWITCH_GUN ); + addTimer(getCurrentArena()->listTimer, timer_tuxCanSwitchGun, + newInt(tux->id), TUX_TIME_CAN_SWITCH_GUN ); #ifndef PUBLIC_SERVER playSound("switch_gun", SOUND_GROUP_BASE); @@ -655,7 +657,8 @@ void shotTux(tux_t *tux) shotInGun(tux); tux->isCanShot = FALSE; - addTimer(timer_tuxCanShot, newInt(tux->id), TUX_TIME_CAN_SHOT ); + addTimer(getCurrentArena()->listTimer, timer_tuxCanShot, + newInt(tux->id), TUX_TIME_CAN_SHOT ); if( tux->shot[tux->gun] == 0 ) { |