From 437da38a26548714e6e1640722148f0f9f601ccb Mon Sep 17 00:00:00 2001 From: oroborus Date: Mon, 17 Mar 2008 20:29:34 +0000 Subject: - opravena chyba, clent nacital iba _jeden_ sietovy packet za 50 ms ( ano aj ked ich prislo viacej) - server pinguje clientov a na zaklade toho client vie, ci server nespadol - publicserver sa da korektne vypnut signalom SIGQUIT - publicserver bol pretiahnuty cez valgrind, teraz za pocet volani funkcie malloc rovna poctu volani funkcie free - v sietovom multiplayeri sa da chodit cez teleporty a strielat do teleportov - do rur sa da siez strielat git-svn-id: http://opensvn.csie.org/tuxanci_ng@24 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e --- src/shot.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/shot.c') diff --git a/src/shot.c b/src/shot.c index b8bec35..d105a5c 100644 --- a/src/shot.c +++ b/src/shot.c @@ -6,6 +6,8 @@ #include "main.h" #include "shot.h" #include "gun.h" +#include "net_multiplayer.h" +#include "proto.h" #ifndef BUBLIC_SERVER #include "image.h" @@ -191,7 +193,7 @@ static int getSppedShot(shot_t *shot) return ( myAbs(shot->px) > myAbs(shot->py) ? myAbs(shot->px) : myAbs(shot->py) ); } -static void eventOnlyLasser(shot_t *shot) +void transformOnlyLasser(shot_t *shot) { switch( shot->position ) { @@ -248,7 +250,7 @@ static void transformShot(shot_t *shot, int position) if( shot->gun == GUN_LASSER ) { - eventOnlyLasser(shot); + transformOnlyLasser(shot); } } @@ -294,6 +296,12 @@ void moveShot(shot_t *shot, int position, int src_x, int src_y, shot->y = dist_y + dist_h; break; } + + if( getNetTypeGame() == NET_GAME_TYPE_SERVER ) + { + proto_send_shot_server(shot); + } + } void destroyShot(shot_t *p) -- cgit v1.2.3