summaryrefslogtreecommitdiff
path: root/src/shot.c
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-03-17 20:29:34 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-03-17 20:29:34 +0000
commit437da38a26548714e6e1640722148f0f9f601ccb (patch)
tree3bc6a5a0903211e2d1ffa4fd9b3e6e467d413ecf /src/shot.c
parent51aae47ae08ad61507f219c24ed6d9321c866f45 (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/shot.c')
-rw-r--r--src/shot.c12
1 files changed, 10 insertions, 2 deletions
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)