mirror of https://github.com/OpenRCT2/OpenRCT2.git
Integrate loc_68BAE6
This commit is contained in:
parent
a39ee0cadc
commit
95fa0e34e0
|
@ -1361,7 +1361,19 @@ std::unique_ptr<GameActions::ConstructClearResult> MapCanConstructWithClearAt(
|
|||
res->GroundFlags |= ELEMENT_IS_UNDERWATER;
|
||||
if (water_height < pos.clearanceZ)
|
||||
{
|
||||
goto loc_68BAE6;
|
||||
if (clearFunc != nullptr)
|
||||
{
|
||||
if (!clearFunc(&tileElement, pos, flags, &res->Cost))
|
||||
{
|
||||
goto loc_68B9B7;
|
||||
}
|
||||
}
|
||||
if (tileElement != nullptr)
|
||||
{
|
||||
res->Error = GameActions::Status::NoClearance;
|
||||
res->ErrorMessage = STR_CANNOT_BUILD_PARTLY_ABOVE_AND_PARTLY_BELOW_WATER;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
loc_68B9B7:
|
||||
|
@ -1469,21 +1481,6 @@ std::unique_ptr<GameActions::ConstructClearResult> MapCanConstructWithClearAt(
|
|||
res->Error = GameActions::Status::NoClearance;
|
||||
}
|
||||
return res;
|
||||
|
||||
loc_68BAE6:
|
||||
if (clearFunc != nullptr)
|
||||
{
|
||||
if (!clearFunc(&tileElement, pos, flags, &res->Cost))
|
||||
{
|
||||
goto loc_68B9B7;
|
||||
}
|
||||
}
|
||||
if (tileElement != nullptr)
|
||||
{
|
||||
res->Error = GameActions::Status::NoClearance;
|
||||
res->ErrorMessage = STR_CANNOT_BUILD_PARTLY_ABOVE_AND_PARTLY_BELOW_WATER;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
} while (!(tileElement++)->IsLastForTile());
|
||||
|
|
Loading…
Reference in New Issue