mirror of https://github.com/OpenTTD/OpenTTD
Codechange: Remove Game::GetGameInstance() (duplicate of Game::GetInstance()) (#13901)
parent
ff08a22aa4
commit
6bf405eb18
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1311,7 +1311,7 @@ void ShowScriptDebugWindowIfScriptError()
|
|||
}
|
||||
}
|
||||
|
||||
GameInstance *g = Game::GetGameInstance();
|
||||
GameInstance *g = Game::GetInstance();
|
||||
if (g != nullptr && g->IsDead()) {
|
||||
ShowScriptDebugWindow(OWNER_DEITY);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue