Changeset - r14256:9ace16ac1559
[Not reviewed]
master
0 3 0
rubidium - 15 years ago 2010-01-15 22:21:50
rubidium@openttd.org
(svn r18818) -Fix [FS#3526] (r18766): some train acceleration type conversions were missed
3 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/build_vehicle_gui.cpp
Show inline comments
 
@@ -476,13 +476,13 @@ static int DrawRailEnginePurchaseInfo(in
 
	SetDParam(0, e->GetDisplayMaxSpeed());
 
	SetDParam(1, e->GetPower());
 
	DrawString(left, right, y, STR_PURCHASE_INFO_SPEED_POWER);
 
	y += FONT_HEIGHT_NORMAL;
 

	
 
	/* Max tractive effort - not applicable if old acceleration or maglev */
 
	if (_settings_game.vehicle.train_acceleration_model != TAM_ORIGINAL && rvi->railtype != RAILTYPE_MAGLEV) {
 
	if (_settings_game.vehicle.train_acceleration_model != TAM_ORIGINAL && GetRailTypeInfo(rvi->railtype)->acceleration_type != 2) {
 
		SetDParam(0, e->GetDisplayMaxTractiveEffort());
 
		DrawString(left, right, y, STR_PURCHASE_INFO_MAX_TE);
 
		y += FONT_HEIGHT_NORMAL;
 
	}
 

	
 
	/* Running cost */
src/engine_gui.cpp
Show inline comments
 
@@ -158,13 +158,13 @@ static StringID GetTrainEngineInfoString
 
	if (capacity != 0) {
 
		SetDParam(5, e->GetDefaultCargoType());
 
		SetDParam(6, capacity);
 
	} else {
 
		SetDParam(5, CT_INVALID);
 
	}
 
	return (_settings_game.vehicle.train_acceleration_model != TAM_ORIGINAL && e->u.rail.railtype != RAILTYPE_MAGLEV) ? STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER_MAX_TE : STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER;
 
	return (_settings_game.vehicle.train_acceleration_model != TAM_ORIGINAL && GetRailTypeInfo(e->u.rail.railtype)->acceleration_type != 2) ? STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER_MAX_TE : STR_ENGINE_PREVIEW_COST_WEIGHT_SPEED_POWER;
 
}
 

	
 
static StringID GetAircraftEngineInfoString(const Engine *e)
 
{
 
	CargoID cargo = e->GetDefaultCargoType();
 
	uint16 mail_capacity;
src/vehicle_gui.cpp
Show inline comments
 
@@ -1529,13 +1529,13 @@ struct VehicleDetailsWindow : Window {
 
				switch (v->type) {
 
					case VEH_TRAIN:
 
						SetDParam(2, v->GetDisplayMaxSpeed());
 
						SetDParam(1, Train::From(v)->tcache.cached_power);
 
						SetDParam(0, Train::From(v)->tcache.cached_weight);
 
						SetDParam(3, Train::From(v)->tcache.cached_max_te / 1000);
 
						DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, (_settings_game.vehicle.train_acceleration_model != TAM_ORIGINAL && Train::From(v)->railtype != RAILTYPE_MAGLEV) ?
 
						DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_RIGHT, y, (_settings_game.vehicle.train_acceleration_model != TAM_ORIGINAL && GetRailTypeInfo(Train::From(v)->railtype)->acceleration_type != 2) ?
 
								STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED_MAX_TE : STR_VEHICLE_INFO_WEIGHT_POWER_MAX_SPEED);
 
						break;
 

	
 
					case VEH_ROAD:
 
					case VEH_SHIP:
 
					case VEH_AIRCRAFT:
0 comments (0 inline, 0 general)