forked from rosebudai/OpenRCT2-Web
Move indestructible cheat check to caller
This commit is contained in:
3 files changed
+3
-3
No files matched your search
@@ -9,6 +9,7 @@
|
||||
- Fix: [#26811] Crash when a ride points to a non-existing station object.
|
||||
- Fix: [#26816] Water rides ignore zero clearances, preventing adjacent terrain modifications and building them anywhere.
|
||||
- Fix: [#26880] Max negative G-Force stat on flat track erroneously reads as 0.49g.
|
||||
- Fix: [#26917] Tile Inspector does not show indestructible track status correctly when ‘Make all track pieces destructible’ cheat is enabled.
|
||||
|
||||
0.5.4 (2026-08-02)
|
||||
------------------------------------------------------------------------
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace OpenRCT2::GameActions
|
||||
return Result(Status::invalidParameters, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_ERR_TRACK_ELEMENT_NOT_FOUND);
|
||||
}
|
||||
|
||||
if (foundElement->isIndestructible())
|
||||
if (foundElement->isIndestructible() && !getGameState().cheats.makeAllDestructible)
|
||||
{
|
||||
return Result(
|
||||
Status::disallowed, STR_RIDE_CONSTRUCTION_CANT_REMOVE_THIS, STR_YOU_ARE_NOT_ALLOWED_TO_REMOVE_THIS_SECTION);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include "TrackElement.h"
|
||||
|
||||
#include "../../GameState.h"
|
||||
#include "../../ride/RideData.h"
|
||||
#include "../../ride/Track.h"
|
||||
|
||||
@@ -229,7 +228,7 @@ namespace OpenRCT2
|
||||
|
||||
bool TrackElement::isIndestructible() const
|
||||
{
|
||||
return flags2.has(TrackTileElementFlag::isIndestructible) && !getGameState().cheats.makeAllDestructible;
|
||||
return flags2.has(TrackTileElementFlag::isIndestructible);
|
||||
}
|
||||
|
||||
void TrackElement::setIsIndestructible(bool isIndestructible)
|
||||
|
||||
Reference in new issue
Block a user