https://github.com/libsdl-org/Maelstrom/commit/46912848d6cb058ba77f797056fc1289be2c94a9
From 46912848d6cb058ba77f797056fc1289be2c94a9 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Fri, 25 Nov 2011 13:23:57 -0500
Subject: [PATCH] Update deathmatch game mode when toggled in the lobby.
---
game/gameinfo.cpp | 1 -
game/lobby.cpp | 8 +++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/game/gameinfo.cpp b/game/gameinfo.cpp
index b0bc786c..54c539d1 100644
--- a/game/gameinfo.cpp
+++ b/game/gameinfo.cpp
@@ -42,7 +42,6 @@ GameInfo::Reset()
wave = 0;
lives = 0;
turbo = 0;
- deathMatch = 0;
gameMode = 0;
deathMatch = 0;
numNodes = 0;
diff --git a/game/lobby.cpp b/game/lobby.cpp
index 4dbfb305..797995f3 100644
--- a/game/lobby.cpp
+++ b/game/lobby.cpp
@@ -347,7 +347,13 @@ LobbyDialogDelegate::GlobalGameChanged(void*)
void
LobbyDialogDelegate::SetDeathmatch(void*, int value)
{
- m_game.deathMatch = (Uint8)value;
+ if (value) {
+ m_game.gameMode |= GAME_MODE_DEATHMATCH;
+ m_game.deathMatch = (Uint8)value;
+ } else {
+ m_game.gameMode &= ~GAME_MODE_DEATHMATCH;
+ m_game.deathMatch = 0;
+ }
}
void