Skip to content

Commit

Permalink
Fixed|Server: Crash when hit-testing mobjs
Browse files Browse the repository at this point in the history
A call was being made to a client-only API.

Note: __CLIENT__ is not defined in plugins (libcommon).
  • Loading branch information
skyjake committed Mar 16, 2013
1 parent dea92aa commit 4ed90ca
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions doomsday/plugins/common/src/p_map.c
Expand Up @@ -2971,11 +2971,14 @@ int PIT_CheckOnmobjZ(mobj_t* thing, void* data)
else if(tmThing->origin[VZ] + tmThing->height < thing->origin[VZ])
return false; // Under thing.

// Players cannot hit their clmobjs.
if(tmThing->player)
if(IS_CLIENT)
{
if(thing == ClPlayer_ClMobj(tmThing->player - players))
return false;
// Players cannot hit their clmobjs.
if(tmThing->player)
{
if(thing == ClPlayer_ClMobj(tmThing->player - players))
return false;
}
}

if(thing->flags & MF_SOLID)
Expand Down

0 comments on commit 4ed90ca

Please sign in to comment.