Revert place park entrance change

Incorrectly changed. ParkEntrances can go nearer to the edge.
This commit is contained in:
duncanspumpkin 2021-06-15 07:55:55 +01:00 committed by Gymnasiast
parent ae6657dcdc
commit 6116b490eb
No known key found for this signature in database
GPG Key ID: DBFFF47AB2CA3EDD
1 changed files with 2 additions and 1 deletions

View File

@ -50,7 +50,8 @@ GameActions::Result::Ptr PlaceParkEntranceAction::Query() const
res->Expenditure = ExpenditureType::LandPurchase;
res->Position = { _loc.x, _loc.y, _loc.z };
if (!LocationValid(_loc) || map_is_edge(_loc))
if (!LocationValid(_loc) || _loc.x <= 32 || _loc.y <= 32 || _loc.x >= (gMapSizeUnits - 32)
|| _loc.y >= (gMapSizeUnits - 32))
{
return std::make_unique<GameActions::Result>(
GameActions::Status::InvalidParameters, STR_CANT_BUILD_THIS_HERE, STR_TOO_CLOSE_TO_EDGE_OF_MAP);