diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-17 20:29:34 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-03-17 20:29:34 +0000 |
| commit | 437da38a26548714e6e1640722148f0f9f601ccb (patch) | |
| tree | 3bc6a5a0903211e2d1ffa4fd9b3e6e467d413ecf /src/teleport.c | |
| parent | 51aae47ae08ad61507f219c24ed6d9321c866f45 (diff) | |
<Oroborus> - opravena chyba, clent nacital iba _jeden_ sietovy packet za 50 ms ( ano aj ked ich prislo viacej)
<Oroborus> - server pinguje clientov a na zaklade toho client vie, ci server nespadol
<Oroborus> - publicserver sa da korektne vypnut signalom SIGQUIT
<Oroborus> - publicserver bol pretiahnuty cez valgrind, teraz za pocet volani funkcie malloc rovna poctu volani
funkcie free
<Oroborus> - v sietovom multiplayeri sa da chodit cez teleporty a strielat do teleportov
<Oroborus> - do rur sa da siez strielat
git-svn-id: http://opensvn.csie.org/tuxanci_ng@24 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/teleport.c')
| -rw-r--r-- | src/teleport.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/teleport.c b/src/teleport.c index 05cacd9..b004589 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -6,6 +6,8 @@ #include "tux.h" #include "teleport.h" #include "shot.h" +#include "net_multiplayer.h" +#include "proto.h" #ifndef BUBLIC_SERVER #include "layer.h" @@ -156,7 +158,15 @@ void eventConflictShotWithTeleport(list_t *listTeleport, list_t *listShot) continue; } - moveShotFromTeleport(thisShot, thisTeleport, listTeleport); + if( getNetTypeGame() == NET_GAME_TYPE_CLIENT ) + { + delListItem(listShot, i, destroyShot); + i--; + } + else + { + moveShotFromTeleport(thisShot, thisTeleport, listTeleport); + } } } } @@ -167,7 +177,8 @@ void eventTeleportTux(list_t *listTeleport, teleport_t *teleport, tux_t *tux) int current_x, current_y; int dist_x, dist_y; - if( tux->bonus == BONUS_GHOST ) + if( tux->bonus == BONUS_GHOST || + getNetTypeGame() == NET_GAME_TYPE_CLIENT ) { return; } @@ -209,6 +220,10 @@ void eventTeleportTux(list_t *listTeleport, teleport_t *teleport, tux_t *tux) #ifndef BUBLIC_SERVER playSound("teleport", SOUND_GROUP_BASE); #endif + if( getNetTypeGame() == NET_GAME_TYPE_SERVER ) + { + proto_send_newtux_server(NULL, tux); + } } } |