0x0047AB9B
| 1583 | |
| 1584 | // 0x0047AB9B |
| 1585 | void updateYearly() |
| 1586 | { |
| 1587 | const auto isObjectAnyRoadTypeCompatible = getGameState().roadObjectIdIsAnyRoadTypeCompatible; |
| 1588 | for (const auto& tilePos : getWorldRange()) |
| 1589 | { |
| 1590 | auto tile = get(tilePos); |
| 1591 | for (auto& el : tile) |
| 1592 | { |
| 1593 | auto* elRoad = el.as<RoadElement>(); |
| 1594 | if (elRoad == nullptr) |
| 1595 | { |
| 1596 | continue; |
| 1597 | } |
| 1598 | if (elRoad->isAiAllocated() || elRoad->isGhost()) |
| 1599 | { |
| 1600 | continue; |
| 1601 | } |
| 1602 | // This is a much cheaper tram checker |
| 1603 | // compared to getting the object |
| 1604 | if (isObjectAnyRoadTypeCompatible & (1U << elRoad->roadObjectId())) |
| 1605 | { |
| 1606 | elRoad->setUnk7_80(elRoad->hasUnk7_40()); |
| 1607 | elRoad->setUnk7_40(false); |
| 1608 | } |
| 1609 | } |
| 1610 | } |
| 1611 | } |
| 1612 | } |
nothing calls this directly
no test coverage detected