mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-23 11:21:01 +00:00
Fix crash when P_ZMovement calls from Lua removes the object
This commit is contained in:
parent
9a31064c4a
commit
9a386111e2
1 changed files with 4 additions and 2 deletions
|
@ -1078,7 +1078,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;
|
||||
}
|
||||
|
@ -1106,7 +1107,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