Changeset - r20957:6ea9e0403a6e
[Not reviewed]
master
0 1 0
frosch - 11 years ago 2013-11-17 16:02:39
frosch@openttd.org
(svn r26027) -Change [FS#5669-ish]: [NewGRF] Invalidate vehicle colour palette when leaving a station.
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/vehicle.cpp
Show inline comments
 
@@ -2106,24 +2106,26 @@ void Vehicle::LeaveStation()
 

	
 
	HideFillingPercent(&this->fill_percent_te_id);
 

	
 
	if (this->type == VEH_TRAIN && !(this->vehstatus & VS_CRASHED)) {
 
		/* Trigger station animation (trains only) */
 
		if (IsTileType(this->tile, MP_STATION)) {
 
			TriggerStationRandomisation(st, this->tile, SRT_TRAIN_DEPARTS);
 
			TriggerStationAnimation(st, this->tile, SAT_TRAIN_DEPARTS);
 
		}
 

	
 
		SetBit(Train::From(this)->flags, VRF_LEAVING_STATION);
 
	}
 

	
 
	this->MarkDirty();
 
}
 

	
 
/**
 
 * Reset all refit_cap in the consist to cargo_cap.
 
 */
 
void Vehicle::ResetRefitCaps()
 
{
 
	for (Vehicle *v = this; v != NULL; v = v->Next()) v->refit_cap = v->cargo_cap;
 
}
 

	
 
/**
 
 * Handle the loading of the vehicle; when not it skips through dummy
0 comments (0 inline, 0 general)