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.
  • Loading branch information
skyjake committed Mar 16, 2013
1 parent e0daf0f commit 544f6ee
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions doomsday/plugins/common/src/p_map.c
Expand Up @@ -2971,12 +2971,14 @@ int PIT_CheckOnmobjZ(mobj_t* thing, void* data)
else if(tmThing->origin[VZ] + tmThing->height < thing->origin[VZ])
return false; // Under thing.

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

if(thing->flags & MF_SOLID)
onMobj = thing;
Expand Down

0 comments on commit 544f6ee

Please sign in to comment.