Skip to content

Commit

Permalink
Client: Fixed explosion of missiles
Browse files Browse the repository at this point in the history
On clientside missiles will run through their explosion
sequence when they hit something, but the damage
is dealt only by the server.
  • Loading branch information
skyjake committed Apr 19, 2011
1 parent ff2c115 commit 6730c54
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 21 deletions.
10 changes: 10 additions & 0 deletions doomsday/plugins/common/src/p_map.c
Expand Up @@ -957,6 +957,16 @@ boolean PIT_CheckLine(linedef_t* ld, void* data)
if(P_BoxOnLineSide(tmBBox, ld) != -1)
return true;

/*
if(IS_CLIENT)
{
// On clientside, missiles don't collide with anything.
if(tmThing->ddFlags & DDMF_MISSILE)
{
return true;
}
}*/

// A line has been hit
xline = P_ToXLine(ld);
#if !__JHEXEN__
Expand Down
7 changes: 0 additions & 7 deletions doomsday/plugins/jdoom/src/p_mobj.c
Expand Up @@ -116,13 +116,6 @@ boolean P_MobjChangeState(mobj_t* mobj, statenum_t state)

void P_ExplodeMissile(mobj_t *mo)
{
if(IS_CLIENT)
{
// Clients won't explode missiles.
P_MobjChangeState(mo, S_NULL);
return;
}

mo->mom[MX] = mo->mom[MY] = mo->mom[MZ] = 0;

P_MobjChangeState(mo, P_GetState(mo->type, SN_DEATH));
Expand Down
7 changes: 0 additions & 7 deletions doomsday/plugins/jdoom64/src/p_mobj.c
Expand Up @@ -120,13 +120,6 @@ boolean P_MobjChangeState(mobj_t* mobj, statenum_t state)

void P_ExplodeMissile(mobj_t *mo)
{
if(IS_CLIENT)
{
// Clients won't explode missiles.
P_MobjChangeState(mo, S_NULL);
return;
}

mo->mom[MX] = mo->mom[MY] = mo->mom[MZ] = 0;

P_MobjChangeState(mo, P_GetState(mo->type, SN_DEATH));
Expand Down
7 changes: 0 additions & 7 deletions doomsday/plugins/jheretic/src/p_mobj.c
Expand Up @@ -128,13 +128,6 @@ boolean P_SetMobjStateNF(mobj_t *mobj, statenum_t state)

void P_ExplodeMissile(mobj_t *mo)
{
if(IS_CLIENT)
{
// Clients won't explode missiles.
P_MobjChangeState(mo, S_NULL);
return;
}

if(mo->type == MT_WHIRLWIND)
{
if(++mo->special2 < 60)
Expand Down

0 comments on commit 6730c54

Please sign in to comment.