1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 05:23:04 +01:00

Move gMapSize to GameState_t

This commit is contained in:
Harry-Hopkinson
2024-02-12 21:32:08 +00:00
parent 72ca04633e
commit b755c873e5
25 changed files with 128 additions and 90 deletions

View File

@@ -205,8 +205,9 @@ namespace Editor
*/
static void SetAllLandOwned()
{
MapRange range = { 2 * COORDS_XY_STEP, 2 * COORDS_XY_STEP, (gMapSize.x - 3) * COORDS_XY_STEP,
(gMapSize.y - 3) * COORDS_XY_STEP };
auto& gameState = GetGameState();
MapRange range = { 2 * COORDS_XY_STEP, 2 * COORDS_XY_STEP, (gameState.MapSize.x - 3) * COORDS_XY_STEP,
(gameState.MapSize.y - 3) * COORDS_XY_STEP };
auto landSetRightsAction = LandSetRightsAction(range, LandSetRightSetting::SetForSale);
landSetRightsAction.SetFlags(GAME_COMMAND_FLAG_NO_SPEND);
GameActions::Execute(&landSetRightsAction);