From 0255b7eabcc59df4854831882fe9a5bd6b14bf38 Mon Sep 17 00:00:00 2001 From: Arthur Date: Thu, 22 Feb 2024 22:27:35 -0500 Subject: [PATCH 1/3] ML_BOUNCY will count pushables in all sectors the line is tagged to --- src/p_spec.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/src/p_spec.c b/src/p_spec.c index 572258165..bf5bf4911 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -1527,12 +1527,31 @@ static boolean P_CheckPushables(line_t *triggerline, sector_t *caller) if (!caller) return false; // we need a calling sector to find pushables in, silly! - // Count the pushables in this sector - for (node = caller->touching_thinglist; node; node = node->m_thinglist_next) + if (triggerline->flags & ML_BOUNCY) // Count pushables in ALL sectors this line is tagged to { - mo = node->m_thing; - if ((mo->flags & MF_PUSHABLE) || ((mo->info->flags & MF_PUSHABLE) && mo->fuse)) - numpushables++; + for (size_t i = 0; i < numsectors; i++) + { + if (sectors[i].triggertag != caller->triggertag) + continue; + + // Count the pushables in this sector + for (node = sectors[i].touching_thinglist; node; node = node->m_thinglist_next) + { + mo = node->m_thing; + if ((mo->flags & MF_PUSHABLE) || ((mo->info->flags & MF_PUSHABLE) && mo->fuse)) + numpushables++; + } + } + } + else + { + // Count the pushables in this sector + for (node = caller->touching_thinglist; node; node = node->m_thinglist_next) + { + mo = node->m_thing; + if ((mo->flags & MF_PUSHABLE) || ((mo->info->flags & MF_PUSHABLE) && mo->fuse)) + numpushables++; + } } switch (triggerline->args[2]) From e4d59fc3c99b4af3f02ec17021703b13bee7ea99 Mon Sep 17 00:00:00 2001 From: SSNTails Date: Fri, 23 Feb 2024 15:19:00 -0500 Subject: [PATCH 2/3] Don't change drawangle when riding on a fan --- src/p_user.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/p_user.c b/src/p_user.c index 25a60cf34..1964a6b3e 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -12134,6 +12134,8 @@ void P_PlayerThink(player_t *player) case CR_DUSTDEVIL: player->drawangle += ANG20; break; + case CR_FAN: // Don't impact drawangle in any special way when on a fan + break; /* -- in case we wanted to have the camera freely movable during zoom tubes case CR_ZOOMTUBE:*/ case CR_ROPEHANG: From c3ebc5a8ec87e1ed17865fcbb50e611424c89af2 Mon Sep 17 00:00:00 2001 From: SSNTails Date: Fri, 23 Feb 2024 15:20:52 -0500 Subject: [PATCH 3/3] lol wrong issue, reverting last commit --- src/p_user.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 1964a6b3e..25a60cf34 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -12134,8 +12134,6 @@ void P_PlayerThink(player_t *player) case CR_DUSTDEVIL: player->drawangle += ANG20; break; - case CR_FAN: // Don't impact drawangle in any special way when on a fan - break; /* -- in case we wanted to have the camera freely movable during zoom tubes case CR_ZOOMTUBE:*/ case CR_ROPEHANG: