(svn r2657) -Codechange: The available railtypes per player are now a bitmask, so

that railtypes do not be in ascending order of appearance. Allows easier
implementation or more railtypes
This commit is contained in:
celestar
2005-07-20 22:02:58 +00:00
parent 030c37160d
commit 18a93cca3d
10 changed files with 91 additions and 37 deletions

View File

@@ -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];