From 360267e6d9b9fabb31869737b2f6a2397dced602 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Tue, 4 Sep 2007 12:28:00 +0000 Subject: [PATCH] *** empty log message *** git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@1292 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/weapon.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/source/src/weapon.cpp b/source/src/weapon.cpp index e152cb92..15676f4a 100644 --- a/source/src/weapon.cpp +++ b/source/src/weapon.cpp @@ -218,7 +218,7 @@ playerent *playerincrosshair() return intersectclosest(player1->o, worldpos, player1); } -struct projectile { vec o, to; float speed; playerent *owner; int gun; bool local; }; +struct projectile { vec o, to; float speed; playerent *owner; int gun; bool local; int id; }; vector projs; void projreset() { projs.setsize(0); } @@ -232,6 +232,7 @@ void newprojectile(vec &from, vec &to, float speed, bool local, playerent *owner p.local = local; p.owner = owner; p.gun = gun; + p.id = lastmillis; } void removeprojectiles(playerent *owner) @@ -386,8 +387,9 @@ void moveprojectiles(float time) } if(exploded) { - addmsg(SV_EXPLODE, "ri2iv", lastmillis, p.gun, - hits.length(), hits.length()*sizeof(hitmsg)/sizeof(int), hits.getbuf()); + if(p.local) + addmsg(SV_EXPLODE, "ri3iv", lastmillis, p.gun, p.id, + hits.length(), hits.length()*sizeof(hitmsg)/sizeof(int), hits.getbuf()); projs.remove(i--); } else p.o = v;