1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 07:14:31 +01:00

Pass game state ref as parameter to game actions (#25065)

This commit is contained in:
Aaron van Geffen
2025-09-08 16:21:29 +02:00
committed by GitHub
parent 3e10c20792
commit 4446ff9f6f
227 changed files with 927 additions and 848 deletions

View File

@@ -2075,7 +2075,7 @@ namespace OpenRCT2::Network
pickup_peep->Id,
{ GetPickupPeepOldX(connection_player->Id), 0, 0 },
GetCurrentPlayerId() };
auto res = GameActions::Execute(&pickupAction);
auto res = GameActions::Execute(&pickupAction, getGameState());
}
ServerSendEventPlayerDisconnected(
const_cast<char*>(connection_player->Name.c_str()), connection->GetLastDisconnectReason());
@@ -2840,7 +2840,7 @@ namespace OpenRCT2::Network
// Something went wrong, game is not loaded. Return to main screen.
auto loadOrQuitAction = GameActions::LoadOrQuitAction(
GameActions::LoadOrQuitModes::OpenSavePrompt, PromptMode::saveBeforeQuit);
GameActions::Execute(&loadOrQuitAction);
GameActions::Execute(&loadOrQuitAction, getGameState());
}
if (has_to_free)
{