vehicle.h
changeset 2147 eb6ba42fd216
parent 2116 23031555ff54
child 2153 ecfc674410b4
--- a/vehicle.h	Wed Jul 20 19:15:23 2005 +0000
+++ b/vehicle.h	Wed Jul 20 22:02:58 2005 +0000
@@ -435,7 +435,7 @@
 }
 
 /* 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];