diff --git a/src/game/game.hpp b/src/game/game.hpp index c560d7263c..036ebfe44a 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -64,11 +64,6 @@ public: */ static void NewEvent(class ScriptEvent *event); - /** - * Get the current GameScript instance. - */ - static class GameInstance *GetGameInstance() { return Game::instance.get(); } - /** * Get the current GameInfo. */ diff --git a/src/game/game_instance.cpp b/src/game/game_instance.cpp index fa4617de82..8c30da998d 100644 --- a/src/game/game_instance.cpp +++ b/src/game/game_instance.cpp @@ -94,8 +94,8 @@ void GameInstance::Died() */ void CcGame(Commands cmd, const CommandCost &result, const CommandDataBuffer &data, CommandDataBuffer result_data) { - if (Game::GetGameInstance()->DoCommandCallback(result, data, std::move(result_data), cmd)) { - Game::GetGameInstance()->Continue(); + if (Game::GetInstance()->DoCommandCallback(result, data, std::move(result_data), cmd)) { + Game::GetInstance()->Continue(); } } diff --git a/src/script/script_gui.cpp b/src/script/script_gui.cpp index d92c069e5d..b2a4930581 100644 --- a/src/script/script_gui.cpp +++ b/src/script/script_gui.cpp @@ -1311,7 +1311,7 @@ void ShowScriptDebugWindowIfScriptError() } } - GameInstance *g = Game::GetGameInstance(); + GameInstance *g = Game::GetInstance(); if (g != nullptr && g->IsDead()) { ShowScriptDebugWindow(OWNER_DEITY); }