Changeset - r18318:92d9cd1764c7
[Not reviewed]
master
0 1 0
frosch - 13 years ago 2011-11-08 18:21:56
frosch@openttd.org
(svn r23164) -Fix (r23149): Default roadvehicles became somewhat short.
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/roadveh_cmd.cpp
Show inline comments
 
@@ -163,7 +163,7 @@ void DrawRoadVehEngine(int left, int rig
 
static uint GetRoadVehLength(const RoadVehicle *v)
 
{
 
	const Engine *e = v->GetEngine();
 
	uint length = e->u.road.shorten_factor;
 
	uint length = VEHICLE_LENGTH;
 

	
 
	uint16 veh_len = CALLBACK_FAILED;
 
	if (e->GetGRF() != NULL && e->GetGRF()->grf_version >= 8) {
 
@@ -173,7 +173,8 @@ static uint GetRoadVehLength(const RoadV
 
		/* Use callback 11 */
 
		veh_len = GetVehicleCallback(CBID_VEHICLE_LENGTH, 0, 0, v->engine_type, v);
 
	}
 
	if (veh_len != CALLBACK_FAILED) {
 
	if (veh_len == CALLBACK_FAILED) veh_len = e->u.road.shorten_factor;
 
	if (veh_len != 0) {
 
		if (veh_len >= VEHICLE_LENGTH) ErrorUnknownCallbackResult(e->GetGRFID(), CBID_VEHICLE_LENGTH, veh_len);
 
		length -= Clamp(veh_len, 0, VEHICLE_LENGTH - 1);
 
	}
0 comments (0 inline, 0 general)