mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-12-02 09:12:54 +00:00
Merge branch 'mobj-spawn-null-fix' into 2210-rc3
This commit is contained in:
commit
3d78ad07c8
1 changed files with 7 additions and 0 deletions
|
@ -10477,10 +10477,17 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
|
||||||
|
|
||||||
if (type == MT_NULL)
|
if (type == MT_NULL)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
#ifdef PARANOIA
|
#ifdef PARANOIA
|
||||||
I_Error("Tried to spawn MT_NULL\n");
|
I_Error("Tried to spawn MT_NULL\n");
|
||||||
#endif
|
#endif
|
||||||
return NULL;
|
return NULL;
|
||||||
|
#endif
|
||||||
|
// Hack: Some code assumes that P_SpawnMobj can never return NULL
|
||||||
|
// So replace MT_NULL with MT_RAY in the meantime
|
||||||
|
// Remove when dealt properly
|
||||||
|
CONS_Debug(DBG_GAMELOGIC, "Tried to spawn MT_NULL, using MT_RAY\n");
|
||||||
|
type = MT_RAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
mobj = Z_Calloc(sizeof (*mobj), PU_LEVEL, NULL);
|
mobj = Z_Calloc(sizeof (*mobj), PU_LEVEL, NULL);
|
||||||
|
|
Loading…
Reference in a new issue