forked from rosebudai/OpenRCT2-Web
Fix result.position.z of WallPlaceAction (#26441)
This commit is contained in:
1 parent
911afdbd6e
commit
c34fee484a
1 file changed
+2
-10
@@ -85,11 +85,6 @@ namespace OpenRCT2::GameActions
|
||||
res.position.x += 16;
|
||||
res.position.y += 16;
|
||||
|
||||
if (_loc.z == 0)
|
||||
{
|
||||
res.position.z = TileElementHeight(res.position);
|
||||
}
|
||||
|
||||
if (!LocationValid(_loc))
|
||||
{
|
||||
return Result(Status::invalidParameters, STR_CANT_BUILD_THIS_HERE, STR_OFF_EDGE_OF_MAP);
|
||||
@@ -142,6 +137,7 @@ namespace OpenRCT2::GameActions
|
||||
edgeSlope &= ~EDGE_SLOPE_ELEVATED;
|
||||
}
|
||||
}
|
||||
res.position.z = targetHeight;
|
||||
|
||||
auto* surfaceElement = MapGetSurfaceElementAt(_loc);
|
||||
if (surfaceElement == nullptr)
|
||||
@@ -287,11 +283,6 @@ namespace OpenRCT2::GameActions
|
||||
res.position.x += 16;
|
||||
res.position.y += 16;
|
||||
|
||||
if (res.position.z == 0)
|
||||
{
|
||||
res.position.z = TileElementHeight(res.position);
|
||||
}
|
||||
|
||||
uint8_t edgeSlope = 0;
|
||||
auto targetHeight = _loc.z;
|
||||
if (targetHeight == 0)
|
||||
@@ -312,6 +303,7 @@ namespace OpenRCT2::GameActions
|
||||
edgeSlope &= ~EDGE_SLOPE_ELEVATED;
|
||||
}
|
||||
}
|
||||
res.position.z = targetHeight;
|
||||
auto targetLoc = CoordsXYZ(_loc, targetHeight);
|
||||
|
||||
auto* wallEntry = ObjectEntryManager::GetObjectEntry<WallSceneryEntry>(_wallType);
|
||||
|
||||
Reference in new issue
Block a user