From 7916a6e1cbc85d6e4028d002e530449d0fa7c37f Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 7 Jan 2024 14:03:06 +0000 Subject: [PATCH] UC_UNLOCKPERCENT: Only evaluate when not in-game - M_MapLocked uses netgame state, so too easy to get Test Run early (resolves #859) - Major iteration of unlockable structs and related, so may also confer a performance benefit --- src/m_cond.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/m_cond.c b/src/m_cond.c index d38db3930..269dbdb1d 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -1468,6 +1468,11 @@ boolean M_CheckCondition(condition_t *cn, player_t *player) case UC_UNLOCKPERCENT: { + // Don't let netgame sessions intefere + // (or have this give a performance hit) + if (Playing()) + return false; + UINT16 i, unlocked = cn->extrainfo2, total = 0; // Special case for maps