Fix segfault when damaging mobj with no painstate

This commit is contained in:
Gustaf Alhäll 2023-04-18 22:08:26 +02:00
parent 57b0dfcfac
commit ad412c9700
No known key found for this signature in database
GPG key ID: 6C1F67D690CDEDFD

View file

@ -3763,6 +3763,9 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
else
P_SetMobjState(target, target->info->painstate);
if (P_MobjWasRemoved(target))
return false;
if (target->type == MT_HIVEELEMENTAL)
target->extravalue1 += 3;