From b0174ab76b93b16fe50edc5b40391c5ebb6babf4 Mon Sep 17 00:00:00 2001 From: tron Date: Sun, 16 Oct 2005 14:12:21 +0000 Subject: (svn r3052) Fix last commit *grml* --- train_cmd.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'train_cmd.c') diff --git a/train_cmd.c b/train_cmd.c index 1e9603f95..b643505c5 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -498,6 +498,24 @@ static void NormalizeTrainVehInDepot(Vehicle *u) } } +static const byte _railveh_unk1[] = { + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 1, 0, + 0, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, +}; + static const byte _railveh_score[] = { 1, 4, 7, 19, 20, 30, 31, 19, 20, 21, 22, 10, 11, 30, 31, 32, @@ -572,6 +590,8 @@ int32 CmdBuildRailVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2) if (!IsTileOwner(tile, _current_player)) return CMD_ERROR; } + _cmd_build_rail_veh_var1 = 0; + SET_EXPENSES_TYPE(EXPENSES_NEW_VEHICLES); rvi = RailVehInfo(p1); @@ -656,6 +676,7 @@ int32 CmdBuildRailVehicle(int x, int y, uint32 flags, uint32 p1, uint32 p2) InvalidateWindow(WC_COMPANY, v->owner); } } + _cmd_build_rail_veh_var1 = _railveh_unk1[p1]; _cmd_build_rail_veh_score = _railveh_score[p1]; InvalidateWindow(WC_REPLACE_VEHICLE, VEH_Train); // updates the replace Train window -- cgit v1.2.3-54-g00ecf