Changeset - r2830:cfdf8709560d
[Not reviewed]
master
0 2 0
peter1138 - 19 years ago 2006-01-06 22:49:00
peter1138@openttd.org
(svn r3378) - NewGRF Fix: Use order status to determine whether a vehicle is loading instead
of speed, and get that state from first vehicle in a train consist.
2 files changed with 7 insertions and 2 deletions:
0 comments (0 inline, 0 general)
engine.c
Show inline comments
 
@@ -605,13 +605,18 @@ int GetCustomEngineSprite(EngineID engin
 

	
 
		cargo = _global_cargo_id[_opt.landscape][v->cargo_type];
 
		assert(cargo != GC_INVALID);
 

	
 
		if (capacity == 0) capacity = 1;
 
		loaded = (v->cargo_count * 100) / capacity;
 
		in_motion = (v->cur_speed != 0);
 

	
 
		if (v->type == VEH_Train) {
 
			in_motion = GetFirstVehicleInChain(v)->current_order.type != OT_LOADING;
 
		} else {
 
			in_motion = v->current_order.type != OT_LOADING;
 
		}
 
	}
 

	
 
	group = GetVehicleSpriteGroup(engine, v);
 
	group = ResolveVehicleSpriteGroup(group, v, 0, (resolve_callback) ResolveVehicleSpriteGroup);
 

	
 
	if (group == NULL && cargo != GC_DEFAULT) {
train_cmd.c
Show inline comments
 
@@ -2560,16 +2560,16 @@ static void TrainEnterStation(Vehicle *v
 
	}
 
	v->current_order.station = 0;
 

	
 
	SET_EXPENSES_TYPE(EXPENSES_TRAIN_INC);
 
	if (LoadUnloadVehicle(v) != 0) {
 
		InvalidateWindow(WC_TRAINS_LIST, v->owner);
 
		MarkTrainDirty(v);
 
		TrainCargoChanged(v);
 
		UpdateTrainAcceleration(v);
 
	}
 
	MarkTrainDirty(v);
 
	InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
 
}
 

	
 
static byte AfterSetTrainPos(Vehicle *v, bool new_tile)
 
{
 
	byte new_z, old_z;
0 comments (0 inline, 0 general)