mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-21 11:21:11 +00:00
Fix segfault when removing source from ShouldDamage
This commit is contained in:
parent
57b0dfcfac
commit
072dd2eda7
1 changed files with 2 additions and 0 deletions
|
@ -3546,6 +3546,8 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
|||
UINT8 shouldForce = LUA_HookShouldDamage(target, inflictor, source, damage, damagetype);
|
||||
if (P_MobjWasRemoved(target))
|
||||
return (shouldForce == 1); // mobj was removed
|
||||
if (P_MobjWasRemoved(source))
|
||||
source = NULL;
|
||||
if (shouldForce == 1)
|
||||
force = true;
|
||||
else if (shouldForce == 2)
|
||||
|
|
Loading…
Reference in a new issue