1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-09-02 11:29:10 +00:00

(svn r9917) -Codechange: prepare some more areas for more road types.

This commit is contained in:
rubidium
2007-05-25 08:13:01 +00:00
parent d5d94e230f
commit 0819f3a9a0
9 changed files with 42 additions and 12 deletions

View File

@@ -178,14 +178,16 @@ void StartupEngines()
static void AcceptEnginePreview(EngineID eid, PlayerID player)
{
Engine *e = GetEngine(eid);
Player *p = GetPlayer(player);
SETBIT(e->player_avail, player);
if (e->type == VEH_TRAIN) {
const RailVehicleInfo *rvi = RailVehInfo(eid);
Player *p = GetPlayer(player);
assert(rvi->railtype < RAILTYPE_END);
SETBIT(p->avail_railtypes, rvi->railtype);
} else if (e->type == VEH_ROAD) {
SETBIT(p->avail_roadtypes, HASBIT(EngInfo(eid)->misc_flags, EF_ROAD_TRAM) ? ROADTYPE_TRAM : ROADTYPE_ROAD);
}
e->preview_player = INVALID_PLAYER;