From 2ac566fa85db630ac9be5db9ff5e71376f8a6018 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Sun, 9 Jul 2017 15:08:17 +0100 Subject: [PATCH 1/4] Fix whitespace goofup of mine --- src/y_inter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/y_inter.c b/src/y_inter.c index acf1c6f2f..42f1e2235 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -236,7 +236,7 @@ void Y_IntermissionDrawer(void) ST_DrawNumFromHud(HUD_MINUTES, minutes); // Minutes ST_DrawPatchFromHud(HUD_TIMECOLON, sbocolon); // Colon ST_DrawPadNumFromHud(HUD_SECONDS, seconds, 2); // Seconds - + // we should show centiseconds on the intermission screen too, if the conditions are right. if (modeattacking || cv_timetic.value == 2) { From 7d4513f2f1a6c7715e29b37e58efdc8fd9aab0cb Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Mon, 17 Jul 2017 20:47:00 +0100 Subject: [PATCH 2/4] Don't be stupid with FF_BLOCKPLAYER/FF_BLOCKOTHERS flags please --- src/p_user.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 5ea1ae471..7abf85347 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1221,11 +1221,12 @@ boolean P_IsObjectOnGroundIn(mobj_t *mo, sector_t *sec) if (!(rover->flags & FF_EXISTS)) continue; - // If the FOF is configured to let players through, continue. - if (!(rover->flags & FF_BLOCKPLAYER) && (rover->flags & FF_BLOCKOTHERS)) + // If the FOF is configured to let the object through, continue. + if (!((rover->flags & FF_BLOCKPLAYER && mo->player) + || (rover->flags & FF_BLOCKOTHERS && !mo->player))) continue; - // If the the platform is intangile from below, continue. + // If the the platform is intangible from below, continue. if (rover->flags & FF_PLATFORM) continue; @@ -1254,11 +1255,12 @@ boolean P_IsObjectOnGroundIn(mobj_t *mo, sector_t *sec) if (!(rover->flags & FF_EXISTS)) continue; - // If the FOF is configured to let players through, continue. - if (!(rover->flags & FF_BLOCKPLAYER) && (rover->flags & FF_BLOCKOTHERS)) + // If the FOF is configured to let the object through, continue. + if (!((rover->flags & FF_BLOCKPLAYER && mo->player) + || (rover->flags & FF_BLOCKOTHERS && !mo->player))) continue; - // If the the platform is intangile from above, continue. + // If the the platform is intangible from above, continue. if (rover->flags & FF_REVERSEPLATFORM) continue; From 6e5cffba5b6dfe28cbdb4fa3204daadb4e00a056 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Mon, 17 Jul 2017 20:56:55 +0100 Subject: [PATCH 3/4] Create static function P_IsObjectOnRealGround for each time thinker to use in place of P_IsObjectOnGroundIn, for non-FOF floor touch specials This fixes solid FOFs activating floor touch specials for normal ground if using an "each time" trigger linedef --- src/p_floor.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/src/p_floor.c b/src/p_floor.c index 0af81efee..ce35ca12d 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -2021,6 +2021,33 @@ foundenemy: P_RemoveThinker(&nobaddies->thinker); } +// +// P_IsObjectOnRealGround +// +// Helper function for T_EachTimeThinker +// Like P_IsObjectOnGroundIn, except ONLY THE REAL GROUND IS CONSIDERED, NOT FOFS +// I'll consider whether to make this a more globally accessible function or whatever in future +// -- Monster Iestyn +// +static boolean P_IsObjectOnRealGround(mobj_t *mo, sector_t *sec) +{ + // Is the object in reverse gravity? + if (mo->eflags & MFE_VERTICALFLIP) + { + // Detect if the player is on the ceiling. + if (mo->z+mo->height >= P_GetSpecialTopZ(mo, sec, sec)) + return true; + } + // Nope! + else + { + // Detect if the player is on the floor. + if (mo->z <= P_GetSpecialBottomZ(mo, sec, sec)) + return true; + } + return false; +} + // // P_HavePlayersEnteredArea // @@ -2224,7 +2251,7 @@ void T_EachTimeThinker(levelspecthink_t *eachtime) || P_PlayerTouchingSectorSpecial(&players[i], 2, (GETSECSPECIAL(sec->special, 2))) == sec)) continue; - if (floortouch == true && P_IsObjectOnGroundIn(players[i].mo, sec)) + if (floortouch == true && P_IsObjectOnRealGround(players[i].mo, sec)) { if (i & 1) eachtime->var2s[i/2] |= 1; From 821692fbf7bed2ddf7fc341474c4beb7842d5075 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Mon, 24 Jul 2017 17:53:18 +0100 Subject: [PATCH 4/4] This was my fault, whoops --- src/p_spec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_spec.c b/src/p_spec.c index 8891165f8..4ddb90b09 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -1742,7 +1742,7 @@ boolean P_RunTriggerLinedef(line_t *triggerline, mobj_t *actor, sector_t *caller case 305: // continuous case 306: // each time case 307: // once - if (!(actor && actor->player && actor->player->charability != dist/10)) + if (!(actor && actor->player && actor->player->charability == dist/10)) return false; break; case 309: // continuous