Road stops: Add inferred one way road state to var 50/roadstop_misc_info

This commit is contained in:
Jonathan G Rennison
2023-03-15 19:10:34 +00:00
parent eebb427b42
commit 48d602962f
5 changed files with 29 additions and 4 deletions

View File

@@ -159,7 +159,11 @@ uint32 RoadStopScopeResolver::GetVariable(uint16 variable, uint32 parameter, Get
case 0x50: {
uint32 result = 0;
if (this->tile != INVALID_TILE) {
if (IsDriveThroughStopTile(this->tile)) result |= GetDriveThroughStopDisallowedRoadDirections(this->tile);
if (IsDriveThroughStopTile(this->tile)) {
result |= GetDriveThroughStopDisallowedRoadDirections(this->tile);
RoadCachedOneWayState rcows = GetRoadCachedOneWayState(this->tile);
if (rcows <= RCOWS_NO_ACCESS) result |= (rcows << 2);
}
}
return result;
}