BossHP: Add wrapper into OnGameFrame.

Simply to prevent error spam, since errors halt function. Meaning boolean wouldn't reset.
This commit is contained in:
zaCade 2019-03-07 21:33:31 +01:00
parent 7428d9c68b
commit 1d7a6973a1

View File

@ -902,9 +902,14 @@ public void OnGameFrame()
if(!g_aBoss) if(!g_aBoss)
return; return;
static bool s_bRunningBossFrame = false;
static bool s_bLastHudPrinted = false; static bool s_bLastHudPrinted = false;
g_sHUDText[0] = 0; g_sHUDText[0] = 0;
if (!s_bRunningBossFrame)
{
s_bRunningBossFrame = true;
for(int i = 0; i < g_aBoss.Length; i++) for(int i = 0; i < g_aBoss.Length; i++)
{ {
CBoss Boss = g_aBoss.Get(i); CBoss Boss = g_aBoss.Get(i);
@ -982,6 +987,9 @@ public void OnGameFrame()
s_bLastHudPrinted = false; s_bLastHudPrinted = false;
} }
} }
s_bRunningBossFrame = false;
}
} }
bool BossInit(CBoss _Boss) bool BossInit(CBoss _Boss)