mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 22:34:33 +01:00
Make remove_park_fences multiplayer-safe
This commit is contained in:
@@ -1396,18 +1396,8 @@ static int32_t ConsoleCommandRemoveFloatingObjects(InteractiveConsole& console,
|
||||
|
||||
static int32_t ConsoleCommandRemoveParkFences(InteractiveConsole& console, [[maybe_unused]] const arguments_t& argv)
|
||||
{
|
||||
TileElementIterator it;
|
||||
TileElementIteratorBegin(&it);
|
||||
do
|
||||
{
|
||||
if (it.element->GetType() == TileElementType::Surface)
|
||||
{
|
||||
// Remove all park fence flags
|
||||
it.element->AsSurface()->SetParkFences(0);
|
||||
}
|
||||
} while (TileElementIteratorNext(&it));
|
||||
|
||||
GfxInvalidateScreen();
|
||||
auto action = CheatSetAction(CheatType::RemoveParkFences);
|
||||
GameActions::Execute(&action);
|
||||
|
||||
console.WriteFormatLine("Park fences have been removed.");
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user