(svn r23080) -Feature: [NewGRF] Use variable 10 to enable vehicle GRFs to draw different sprites on the map and in various GUIs.

This commit is contained in:
frosch
2011-11-01 16:51:47 +00:00
parent a5ddc39bad
commit 6e61fee028
25 changed files with 124 additions and 111 deletions

View File

@@ -419,12 +419,12 @@ void AfterLoadVehicles(bool part_of_load)
case VEH_TRAIN:
case VEH_SHIP:
v->cur_image = v->GetImage(v->direction);
v->cur_image = v->GetImage(v->direction, EIT_ON_MAP);
break;
case VEH_AIRCRAFT:
if (Aircraft::From(v)->IsNormalAircraft()) {
v->cur_image = v->GetImage(v->direction);
v->cur_image = v->GetImage(v->direction, EIT_ON_MAP);
/* The plane's shadow will have the same image as the plane */
Vehicle *shadow = v->Next();
@@ -433,7 +433,7 @@ void AfterLoadVehicles(bool part_of_load)
/* In the case of a helicopter we will update the rotor sprites */
if (v->subtype == AIR_HELICOPTER) {
Vehicle *rotor = shadow->Next();
rotor->cur_image = GetRotorImage(Aircraft::From(v));
rotor->cur_image = GetRotorImage(Aircraft::From(v), EIT_ON_MAP);
}
UpdateAircraftCache(Aircraft::From(v));