Skip to content

Commit

Permalink
Game logic: Ignore mobjs with a NULL info ptr
Browse files Browse the repository at this point in the history
They're likely client mobjs that haven't received all their
info yet.
  • Loading branch information
skyjake committed Jul 15, 2011
1 parent c5bebe3 commit 801b0a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions doomsday/engine/portable/src/cl_mobj.c
Expand Up @@ -585,6 +585,11 @@ boolean ClMobj_IsValid(mobj_t* mo)
// Should not use this for playsim.
return false;
}
if(!mo->info)
{
// We haven't yet received info about the mobj's type?
return false;
}
return true;
}

Expand Down
2 changes: 2 additions & 0 deletions doomsday/plugins/jheretic/src/p_mobj.c
Expand Up @@ -124,6 +124,8 @@ boolean P_SetMobjStateNF(mobj_t *mobj, statenum_t state)

void P_ExplodeMissile(mobj_t *mo)
{
if(!mo->info) return;

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

0 comments on commit 801b0a3

Please sign in to comment.