diff options
author | dominik <dominik@openttd.org> | 2004-08-23 07:50:01 +0000 |
---|---|---|
committer | dominik <dominik@openttd.org> | 2004-08-23 07:50:01 +0000 |
commit | d15aa143346cb7564dad13cef32e8b32df63901c (patch) | |
tree | 1f6183efe867795203fa032aa0a42d3d5a247b73 | |
parent | efb7c3863ff07975490988b64943a129b446e57e (diff) | |
download | openttd-d15aa143346cb7564dad13cef32e8b32df63901c.tar.xz |
(svn r115) Fix: monorail/maglev became available around 1927
-rw-r--r-- | engine.c | 16 | ||||
-rw-r--r-- | table/engines.h | 2 |
2 files changed, 13 insertions, 5 deletions
@@ -404,15 +404,25 @@ void NewVehicleAvailable(Engine *e) } } + e->flags = (e->flags & ~ENGINE_INTRODUCING) | ENGINE_AVAILABLE; + InvalidateWindowClasses(WC_BUILD_VEHICLE); + // Now available for all players e->player_avail = (byte)-1; + + // Do not introduce new rail wagons + if ((byte)index < NUM_TRAIN_ENGINES) { + const RailVehicleInfo *rvi = &_rail_vehicle_info[index]; + if(rvi->flags & RVI_WAGON) + return; + } + + // make maglev / monorail available FOR_ALL_PLAYERS(p) { if (p->is_active) UPDATE_PLAYER_RAILTYPE(e,p); } - e->flags = (e->flags & ~ENGINE_INTRODUCING) | ENGINE_AVAILABLE; - if ((byte)index < NUM_TRAIN_ENGINES) { AddNewsItem(index, NEWS_FLAGS(NM_CALLBACK, 0, NT_NEW_VEHICLES, DNC_TRAINAVAIL), 0, 0); } else if ((byte)index < NUM_TRAIN_ENGINES + NUM_ROAD_ENGINES) { @@ -422,8 +432,6 @@ void NewVehicleAvailable(Engine *e) } else { AddNewsItem(index, NEWS_FLAGS(NM_CALLBACK, 0, NT_NEW_VEHICLES, DNC_AIRCRAFTAVAIL), 0, 0); } - - InvalidateWindowClasses(WC_BUILD_VEHICLE); } void EnginesMonthlyLoop() diff --git a/table/engines.h b/table/engines.h index 70339af35..bbfa266dd 100644 --- a/table/engines.h +++ b/table/engines.h @@ -2,7 +2,7 @@ #define MW(a,b,c,d,e,f) {a,b|0x80,c,d,((e)<<4)|(f)} EngineInfo _engine_info[TOTAL_NUM_ENGINES] = { - MK( 4809, 20, 15, 30, 0, 1), /* 0 */ + MK( 1827, 20, 15, 30, 0, 1), /* 0 */ MK( 12784, 20, 22, 30, 0, 6), /* 1 */ MK( 9497, 20, 20, 50, 0, 8), /* 2 */ MK( 11688, 20, 20, 30, 0, 8), /* 3 */ |