From 1c6254c42649596d353478610ef731fe0b5878e4 Mon Sep 17 00:00:00 2001 From: toaster Date: Fri, 1 Aug 2025 21:19:21 +0100 Subject: [PATCH] Anti-marbel-garden softlock Stumble if you touch a spike while already flashing/spunout (and not just collided with it 2 tics ago) --- src/p_map.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/p_map.c b/src/p_map.c index ff84bece3..bb57a6275 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -1382,6 +1382,20 @@ static BlockItReturn_t PIT_CheckThing(mobj_t *thing) } else { + if ( + thing->type == MT_WALLSPIKE + && g_tm.thing->health + && g_tm.thing->player + && (g_tm.thing->player->justbumped < bumptime-2) + && ( + g_tm.thing->player->flashing + || P_PlayerInPain(g_tm.thing->player) + ) + ) + { + K_StumblePlayer(g_tm.thing->player); + } + // Do not return because solidity code comes below. P_DamageMobj(g_tm.thing, thing, thing, 1, DMG_NORMAL); }