Add road/tram type flag to disallow collisions with trains

This commit is contained in:
Jonathan G Rennison
2023-02-19 15:57:21 +00:00
parent 663a3969a0
commit f7d62a1767
13 changed files with 65 additions and 13 deletions

View File

@@ -155,6 +155,7 @@ struct RoadVehicle FINAL : public GroundVehicle<RoadVehicle, VEH_ROAD> {
inline bool IsRoadVehicleOnLevelCrossing() const
{
if (HasBit(_roadtypes_non_train_colliding, this->roadtype)) return false;
for (const RoadVehicle *u = this; u != nullptr; u = u->Next()) {
if (IsLevelCrossingTile(u->tile)) return true;
}