mirror of https://github.com/OpenTTD/OpenTTD
(svn r2991) Reset vehicle images on game load. Allows savegames with NewGRFs saved prior to r2868 to load.
parent
fbf06041ca
commit
50f1a93664
|
@ -187,6 +187,14 @@ void AfterLoadVehicles(void)
|
||||||
FOR_ALL_VEHICLES(v) {
|
FOR_ALL_VEHICLES(v) {
|
||||||
v->first = NULL;
|
v->first = NULL;
|
||||||
if (v->type != 0) {
|
if (v->type != 0) {
|
||||||
|
switch (v->type) {
|
||||||
|
case VEH_Train: v->cur_image = GetTrainImage(v, v->direction); break;
|
||||||
|
case VEH_Road: v->cur_image = GetRoadVehImage(v, v->direction); break;
|
||||||
|
case VEH_Ship: v->cur_image = GetShipImage(v, v->direction); break;
|
||||||
|
case VEH_Aircraft: v->cur_image = GetAircraftImage(v, v->direction); break;
|
||||||
|
default: break;
|
||||||
|
}
|
||||||
|
|
||||||
v->left_coord = INVALID_COORD;
|
v->left_coord = INVALID_COORD;
|
||||||
VehiclePositionChanged(v);
|
VehiclePositionChanged(v);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue