Ignore collisions between 2 objects that are BOTH in hitlag

Still allows it if a new object interferes to add more hitlag, but this should hooopefully prevent super big knockback stacking from 1 object?
This commit is contained in:
Sally Coolatta 2021-11-27 13:45:23 -05:00
parent cb5ea8b335
commit a17f11e6c5

View file

@ -485,6 +485,10 @@ static boolean PIT_CheckThing(mobj_t *thing)
|| (thing->player && thing->player->spectator)) || (thing->player && thing->player->spectator))
return true; return true;
// Ignore the collision if BOTH things are in hitlag.
if (thing->hitlag > 0 && tmthing->hitlag > 0)
return true;
if ((thing->flags & MF_NOCLIPTHING) || !(thing->flags & (MF_SOLID|MF_SPECIAL|MF_PAIN|MF_SHOOTABLE|MF_SPRING))) if ((thing->flags & MF_NOCLIPTHING) || !(thing->flags & (MF_SOLID|MF_SPECIAL|MF_PAIN|MF_SHOOTABLE|MF_SPRING)))
return true; return true;