(svn r16814) -Codechange: make IsNormalAircraft() member of Aircraft

This commit is contained in:
smatz
2009-07-13 16:37:27 +00:00
parent 98b8479f56
commit 64de470917
11 changed files with 33 additions and 32 deletions

View File

@@ -1760,7 +1760,7 @@ bool AfterLoadGame()
Aircraft *a;
FOR_ALL_AIRCRAFT(a) {
/* Set engine_type of shadow and rotor */
if (!IsNormalAircraft(a)) {
if (!a->IsNormalAircraft()) {
a->engine_type = a->First()->engine_type;
}
}

View File

@@ -164,7 +164,7 @@ void UpdateOldAircraft()
FOR_ALL_AIRCRAFT(a) {
/* airplane has another vehicle with subtype 4 (shadow), helicopter also has 3 (rotor)
* skip those */
if (IsNormalAircraft(a)) {
if (a->IsNormalAircraft()) {
/* airplane in terminal stopped doesn't hurt anyone, so goto next */
if ((a->vehstatus & VS_STOPPED) && a->state == 0) {
a->state = HANGAR;
@@ -356,7 +356,7 @@ void AfterLoadVehicles(bool part_of_load)
break;
case VEH_AIRCRAFT:
if (IsNormalAircraft(v)) {
if (Aircraft::From(v)->IsNormalAircraft()) {
v->cur_image = v->GetImage(v->direction);
/* The plane's shadow will have the same image as the plane */