Skip to content

Commit c36bfd0

Browse files
committed
Fix mystery rounds stacking
1 parent 1b51b6e commit c36bfd0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/game/server/gamemodes/Bomb.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,12 @@ void CGameControllerBomb::EndBombRound(bool RealEnd)
504504
GameServer()->SendChat(-1, TEAM_ALL, "Noone won the round!");
505505
}
506506

507+
if(m_WasMysteryRound)
508+
{
509+
GameServer()->Console()->ExecuteFile(g_Config.m_SvMysteryRoundsResetFileName);
510+
m_WasMysteryRound = false;
511+
}
512+
507513
std::vector<std::string> vTemp;
508514
while(g_Config.m_BombtagMysteryChance && rand() % 101 <= g_Config.m_BombtagMysteryChance)
509515
{
@@ -513,6 +519,7 @@ void CGameControllerBomb::EndBombRound(bool RealEnd)
513519
}
514520
if(!m_WasMysteryRound)
515521
{
522+
GameServer()->Console()->ExecuteFile(g_Config.m_SvMysteryRoundsResetFileName);
516523
GameServer()->SendChat(-1, TEAM_ALL, "MYSTERY ROUND!");
517524
}
518525
const char *pLine = GameServer()->Server()->GetMysteryRoundLine();
@@ -522,18 +529,11 @@ void CGameControllerBomb::EndBombRound(bool RealEnd)
522529
{
523530
continue;
524531
}
525-
526-
GameServer()->Console()->ExecuteFile(g_Config.m_SvMysteryRoundsResetFileName);
527532
GameServer()->Console()->ExecuteLine(pLine);
528533
m_WasMysteryRound = true;
529534
vTemp.emplace_back(pLine);
530535
}
531536
}
532-
if(m_WasMysteryRound)
533-
{
534-
GameServer()->Console()->ExecuteFile(g_Config.m_SvMysteryRoundsResetFileName);
535-
m_WasMysteryRound = false;
536-
}
537537

538538
EndRound();
539539
DoWarmup(3);

0 commit comments

Comments
 (0)