diff options
author | smatz <smatz@openttd.org> | 2009-06-06 16:54:22 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-06-06 16:54:22 +0000 |
commit | 0c10006907b7d149f91d277a0c28a79b40eaa4c0 (patch) | |
tree | dc8cb6a7a9315a10688af00187db94be8911acef /src/aircraft_gui.cpp | |
parent | c90819ff6d8d49ac25aa9194bdf04e8dfd7149ea (diff) | |
download | openttd-0c10006907b7d149f91d277a0c28a79b40eaa4c0.tar.xz |
(svn r16527) -Codechange: use static member functions instead of simple casts when converting Vehicle to specialised vehicle types. Includes safety check
Diffstat (limited to 'src/aircraft_gui.cpp')
-rw-r--r-- | src/aircraft_gui.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/aircraft_gui.cpp b/src/aircraft_gui.cpp index f2c0bf771..ccc04490b 100644 --- a/src/aircraft_gui.cpp +++ b/src/aircraft_gui.cpp @@ -67,7 +67,7 @@ void DrawAircraftImage(const Vehicle *v, int x, int y, VehicleID selection) SpriteID pal = (v->vehstatus & VS_CRASHED) ? PALETTE_CRASH : GetVehiclePalette(v); DrawSprite(v->GetImage(DIR_W), pal, x + 25, y + 10); if (v->subtype == AIR_HELICOPTER) { - const Aircraft *a = (const Aircraft *)v; + const Aircraft *a = Aircraft::From(v); SpriteID rotor_sprite = GetCustomRotorSprite(a, true); if (rotor_sprite == 0) rotor_sprite = SPR_ROTOR_STOPPED; DrawSprite(rotor_sprite, PAL_NONE, x + 25, y + 5); |