summaryrefslogtreecommitdiff
path: root/src/train_cmd.cpp
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2011-11-04 15:04:29 +0000
committermichi_cc <michi_cc@openttd.org>2011-11-04 15:04:29 +0000
commita3e6e113fe1f5a00d2d62ddac207a3bc12dec97c (patch)
tree20f5ed8eebb1b2d7108ad823c611db923832449a /src/train_cmd.cpp
parentad2fdd8d6fefe8cde63aa4147ae5cd77ebae49d5 (diff)
downloadopenttd-a3e6e113fe1f5a00d2d62ddac207a3bc12dec97c.tar.xz
(svn r23112) -Codechange: Check if vehicle chain lengths stays constant when auto-refitting.
Diffstat (limited to 'src/train_cmd.cpp')
-rw-r--r--src/train_cmd.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 576bd9a15..7f06d6adb 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -84,22 +84,6 @@ byte FreightWagonMult(CargoID cargo)
return _settings_game.vehicle.freight_trains;
}
-/**
- * Logs a bug in GRF and shows a warning message if this
- * is for the first time this happened.
- * @param u first vehicle of chain
- */
-static void RailVehicleLengthChanged(const Train *u)
-{
- /* show a warning once for each engine in whole game and once for each GRF after each game load */
- const Engine *engine = u->GetEngine();
- uint32 grfid = engine->grf_prop.grffile->grfid;
- GRFConfig *grfconfig = GetGRFConfig(grfid);
- if (GamelogGRFBugReverse(grfid, engine->grf_prop.local_id) || !HasBit(grfconfig->grf_bugs, GBUG_VEH_LENGTH)) {
- ShowNewGrfVehicleError(u->engine_type, STR_NEWGRF_BROKEN, STR_NEWGRF_BROKEN_VEHICLE_LENGTH, GBUG_VEH_LENGTH, true);
- }
-}
-
/** Checks if lengths of all rail vehicles are valid. If not, shows an error message. */
void CheckTrainsLengths()
{
@@ -244,7 +228,7 @@ void Train::ConsistChanged(bool same_length)
veh_len = VEHICLE_LENGTH - Clamp(veh_len, 0, VEHICLE_LENGTH - 1);
/* verify length hasn't changed */
- if (same_length && veh_len != u->gcache.cached_veh_length) RailVehicleLengthChanged(u);
+ if (same_length && veh_len != u->gcache.cached_veh_length) VehicleLengthChanged(u);
/* update vehicle length? */
if (!same_length) u->gcache.cached_veh_length = veh_len;