mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-30 21:20:54 +00:00
Merge branch 'fix-zmovement-remove-crash' into 'next'
Fix crash when P_ZMovement calls from Lua removes the object See merge request STJr/SRB2!2054
This commit is contained in:
commit
e96a1630b5
1 changed files with 4 additions and 2 deletions
|
@ -1079,7 +1079,8 @@ static int lib_pZMovement(lua_State *L)
|
|||
if (!actor)
|
||||
return LUA_ErrInvalid(L, "mobj_t");
|
||||
lua_pushboolean(L, P_ZMovement(actor));
|
||||
P_CheckPosition(actor, actor->x, actor->y);
|
||||
if (!P_MobjWasRemoved(actor))
|
||||
P_CheckPosition(actor, actor->x, actor->y);
|
||||
P_SetTarget(&tmthing, ptmthing);
|
||||
return 1;
|
||||
}
|
||||
|
@ -1107,7 +1108,8 @@ static int lib_pSceneryZMovement(lua_State *L)
|
|||
if (!actor)
|
||||
return LUA_ErrInvalid(L, "mobj_t");
|
||||
lua_pushboolean(L, P_SceneryZMovement(actor));
|
||||
P_CheckPosition(actor, actor->x, actor->y);
|
||||
if (!P_MobjWasRemoved(actor))
|
||||
P_CheckPosition(actor, actor->x, actor->y);
|
||||
P_SetTarget(&tmthing, ptmthing);
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue