Skip to content

Commit

Permalink
Justice forwardport: synchronize explode events to for rockets/grenad…
Browse files Browse the repository at this point in the history
…es, checktype cleanups
  • Loading branch information
greghaynes committed Jul 21, 2010
1 parent ff99573 commit 8d1ac03
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/fpsgame/game.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ enum
{
N_CONNECT = 0, N_SERVINFO, N_WELCOME, N_INITCLIENT, N_POS, N_TEXT, N_SOUND, N_CDIS,
N_SHOOT, N_EXPLODE, N_SUICIDE,
N_DIED, N_DAMAGE, N_HITPUSH, N_SHOTFX,
N_DIED, N_DAMAGE, N_HITPUSH, N_SHOTFX, N_EXPLODEFX,
N_TRYSPAWN, N_SPAWNSTATE, N_SPAWN, N_FORCEDEATH,
N_GUNSELECT, N_TAUNT,
N_MAPCHANGE, N_MAPVOTE, N_ITEMSPAWN, N_ITEMPICKUP, N_ITEMACC,
Expand All @@ -222,7 +222,7 @@ static const int msgsizes[] = // size inclusive message token, 0 f
{
N_CONNECT, 0, N_SERVINFO, 5, N_WELCOME, 2, N_INITCLIENT, 0, N_POS, 0, N_TEXT, 0, N_SOUND, 2, N_CDIS, 2,
N_SHOOT, 0, N_EXPLODE, 0, N_SUICIDE, 1,
N_DIED, 4, N_DAMAGE, 6, N_HITPUSH, 7, N_SHOTFX, 9,
N_DIED, 4, N_DAMAGE, 6, N_HITPUSH, 7, N_SHOTFX, 10, N_EXPLODEFX, 4,
N_TRYSPAWN, 1, N_SPAWNSTATE, 14, N_SPAWN, 3, N_FORCEDEATH, 2,
N_GUNSELECT, 2, N_TAUNT, 1,
N_MAPCHANGE, 0, N_MAPVOTE, 0, N_ITEMSPAWN, 2, N_ITEMPICKUP, 2, N_ITEMACC, 3,
Expand Down Expand Up @@ -703,8 +703,9 @@ namespace game

// weapon
extern void shoot(fpsent *d, const vec &targ);
extern void shoteffects(int gun, const vec &from, const vec &to, fpsent *d, bool local, int prevaction);
extern void shoteffects(int gun, const vec &from, const vec &to, fpsent *d, bool local, int id, int prevaction);
extern void explode(bool local, fpsent *owner, const vec &v, dynent *safe, int dam, int gun);
extern void explodeeffects(int gun, fpsent *d, bool local, int id = 0);
extern void damageeffect(int damage, fpsent *d, bool thirdperson = true);
extern void superdamageeffect(const vec &vel, fpsent *d);
extern bool intersect(dynent *d, const vec &from, const vec &to);
Expand Down
3 changes: 2 additions & 1 deletion src/fpsgame/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,7 @@ namespace server
default:
return;
}
sendf(-1, 1, "ri4x", N_EXPLODEFX, ci->clientnum, gun, id, ci->ownernum);
loopv(hits)
{
hitinfo &h = hits[i];
Expand Down Expand Up @@ -1204,7 +1205,7 @@ namespace server
if(gun!=GUN_FIST) gs.ammo[gun]--;
gs.lastshot = millis;
gs.gunwait = guns[gun].attackdelay;
sendf(-1, 1, "ri9x", N_SHOTFX, ci->clientnum, gun,
sendf(-1, 1, "rii9x", N_SHOTFX, ci->clientnum, gun,
int(from.x*DMF), int(from.y*DMF), int(from.z*DMF),
int(to.x*DMF), int(to.y*DMF), int(to.z*DMF),
ci->ownernum);
Expand Down

0 comments on commit 8d1ac03

Please sign in to comment.