From 61c84be70445c61c8907ca5bc647f574a5623342 Mon Sep 17 00:00:00 2001 From: mazmazz Date: Tue, 14 Aug 2018 16:08:21 -0400 Subject: [PATCH] Fix bonus time quirk where lines are run if player->marebonuslap is 0 * Bonus laps start at 1, so if a line is looking for bonus laps, they should only be run at >= 1. --- src/p_spec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/p_spec.c b/src/p_spec.c index 66fedeab5..e70aec650 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -1641,6 +1641,9 @@ static boolean P_CheckNightsTriggerLine(line_t *triggerline, mobj_t *actor) currentlap = lapfrombonustime ? actor->player->marebonuslap : actor->player->marelap; } + if (lapfrombonustime && !currentlap) + return false; // special case: player->marebonuslap is 0 until passing through on bonus time. Don't trigger lines looking for inputlap 0. + // Compare current mare/lap to input mare/lap based on rules if (!(specialtype >= 323 && specialtype <= 324 && donomares) // don't return false if donomares and we got this far && ((ltemare && currentmare > inputmare)