diff --git a/src/m_cond.c b/src/m_cond.c index c61c028b0..e170f8fe6 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -1817,6 +1817,16 @@ boolean M_CheckCondition(condition_t *cn, player_t *player) case UCRP_TRACKHAZARD: { + if (!(gametyperules & GTR_CIRCUIT)) + { + // Prison Break/Versus + + if (!player->exiting && cn->requirement == 0) + return false; + + return (((player->roundconditions.hittrackhazard[0] & 1) == 1) == (cn->requirement == 1)); + } + INT16 requiredlap = cn->extrainfo1; if (requiredlap < 0) @@ -2706,7 +2716,7 @@ static const char *M_GetConditionString(condition_t *cn) case UCRP_TRACKHAZARD: { - work = (cn->requirement == 1) ? "touch a track hazard" : "don't touch any track hazards"; + work = (cn->requirement == 1) ? "touch a course hazard" : "don't touch any course hazards"; if (cn->extrainfo1 == -1) return va("%s%s", work, (cn->requirement == 1) ? " on every lap" : ""); if (cn->extrainfo1 == -2) diff --git a/src/p_inter.c b/src/p_inter.c index b8645c76a..d8512e194 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -2986,10 +2986,12 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da } } else if (!(inflictor && inflictor->player) - && player->laps <= numlaps + && !(player->exiting || player->laps > numlaps) && damagetype != DMG_DEATHPIT) { + // laps will never increment outside of GTR_CIRCUIT, so this is still fine const UINT8 requiredbit = 1<<(player->laps & 7); + if (!(player->roundconditions.hittrackhazard[player->laps/8] & requiredbit)) { player->roundconditions.hittrackhazard[player->laps/8] |= requiredbit;