mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Properly unregister events from the level object
Unregister() was mistakenly being called on the DM_Manager object when it should have been called on the level object, to unregister events like axiswin, allieswin, draw
This commit is contained in:
parent
a36bbb0cda
commit
512831dea9
1 changed files with 3 additions and 3 deletions
|
@ -1415,7 +1415,7 @@ void DM_Manager::EventDoRoundTransition(Event *ev)
|
|||
// Play the axis victory sound
|
||||
world->Sound("den_victory_v");
|
||||
|
||||
Unregister(STRING_AXISWIN);
|
||||
level.Unregister(STRING_AXISWIN);
|
||||
} else if (m_iTeamWin == TEAM_ALLIES) {
|
||||
G_CenterPrintToAllClients(va("\n\n\n%s\n", gi.LV_ConvertString("Allies win!")));
|
||||
G_PrintToAllClients(va("%s\n", gi.LV_ConvertString("Allies win!")));
|
||||
|
@ -1423,12 +1423,12 @@ void DM_Manager::EventDoRoundTransition(Event *ev)
|
|||
// Play the allies victory sound
|
||||
world->Sound("dfr_victory_v");
|
||||
|
||||
Unregister(STRING_ALLIESWIN);
|
||||
level.Unregister(STRING_ALLIESWIN);
|
||||
} else {
|
||||
G_CenterPrintToAllClients(va("\n\n\n%s\n", gi.LV_ConvertString("It's a draw!")));
|
||||
G_PrintToAllClients(va("%s\n", gi.LV_ConvertString("It's a draw!")));
|
||||
|
||||
Unregister(STRING_DRAW);
|
||||
level.Unregister(STRING_DRAW);
|
||||
}
|
||||
|
||||
G_DisplayScoresToAllClients();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue