From 9913b4b481ddcaf0fa8499f3554c85bb588be7f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 29 Jul 2014 22:34:23 +0300 Subject: Fix yellow bar settings loading. --- src/game.cpp | 1 + src/gamemodifiers.cpp | 7 ++----- src/gamemodifiers.h | 4 +--- 3 files changed, 4 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/game.cpp b/src/game.cpp index c96771e46..7af443a9b 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -155,6 +155,7 @@ static void initEngines() if (joystick) joystick->update(); + GameModifiers::init(); UpdateStatusListener::distributeEvent(); } diff --git a/src/gamemodifiers.cpp b/src/gamemodifiers.cpp index 94dea8ecf..228dd66f3 100644 --- a/src/gamemodifiers.cpp +++ b/src/gamemodifiers.cpp @@ -76,7 +76,7 @@ &GameModifiers::get##name1##String, 0, true, forward); \ } -GameModifiers::GameModifiers() +void GameModifiers::init() { settings.crazyMoveType = config.getIntValue("crazyMoveType"); settings.moveToTargetType = config.getIntValue("moveToTargetType"); @@ -90,10 +90,7 @@ GameModifiers::GameModifiers() settings.imitationMode = config.getIntValue("imitationMode"); settings.disableGameModifiers = config.getBoolValue( "disableGameModifiers"); -} - -GameModifiers::~GameModifiers() -{ +// UpdateStatusListener::distributeEvent(); } void GameModifiers::changeMode(unsigned *restrict const var, diff --git a/src/gamemodifiers.h b/src/gamemodifiers.h index 497622236..806b4c085 100644 --- a/src/gamemodifiers.h +++ b/src/gamemodifiers.h @@ -28,11 +28,9 @@ class GameModifiers final { public: - GameModifiers(); - A_DELETE_COPY(GameModifiers) - ~GameModifiers(); + static void init(); static void changeMode(unsigned *restrict const var, const unsigned limit, -- cgit v1.2.3-70-g09d2