summaryrefslogtreecommitdiff
path: root/vehicle.h
diff options
context:
space:
mode:
Diffstat (limited to 'vehicle.h')
-rw-r--r--vehicle.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/vehicle.h b/vehicle.h
index 4460a890f..a68a234bd 100644
--- a/vehicle.h
+++ b/vehicle.h
@@ -435,7 +435,7 @@ static inline Vehicle *GetFirstVehicleFromSharedList(Vehicle *v)
}
/* Validate functions for rail building */
-static inline bool ValParamRailtype(uint32 rail) { return rail <= GetPlayer(_current_player)->max_railtype;}
+static inline bool ValParamRailtype(uint32 rail) { return HASBIT(GetPlayer(_current_player)->avail_railtypes, rail);}
// NOSAVE: Can be regenerated by inspecting the vehicles.
VARDEF VehicleID _vehicle_position_hash[0x1000];