From cbebfe5a62eb115191344a83e6c0a30b4cf7d4f9 Mon Sep 17 00:00:00 2001 From: toaster Date: Fri, 10 Mar 2023 22:41:03 +0000 Subject: [PATCH] UC_POWERLEVEL: Do not iterate over your profiles in GS_LEVEL --- src/m_cond.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/m_cond.c b/src/m_cond.c index 5d0e26df9..6ea8e37e0 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -672,6 +672,10 @@ boolean M_CheckCondition(condition_t *cn, player_t *player) case UC_POWERLEVEL: // Requires power level >= x on a certain gametype { UINT8 i; + + if (gamestate == GS_LEVEL) + return false; // this one could be laggy with many profiles available + for (i = PROFILE_GUEST; i < PR_GetNumProfiles(); i++) { profile_t *p = PR_GetProfile(i);