~ubuntu-branches/debian/squeeze/openttd/squeeze

« back to all changes in this revision

Viewing changes to src/aircraft_cmd.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Matthijs Kooijman, Matthijs Kooijman
  • Date: 2009-10-01 22:52:59 UTC
  • mfrom: (1.1.8 upstream) (2.1.6 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091001225259-5kpkp4sthbszpyif
[ Matthijs Kooijman ]
* New upstream release
* Use printf instead of echo -en in openttd-wrapper to make it POSIX
  compatible (Closes: #547758).
* Remove three patches that are now included in upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: aircraft_cmd.cpp 16482 2009-05-31 12:22:53Z rubidium $ */
 
1
/* $Id: aircraft_cmd.cpp 17598 2009-09-21 15:41:58Z rubidium $ */
2
2
 
3
3
/** @file aircraft_cmd.cpp
4
4
 * This file deals with aircraft and airport movements functionalities */
706
706
        v->y_pos = y;
707
707
        v->z_pos = z;
708
708
 
709
 
        v->cur_image = v->GetImage(v->direction);
 
709
        v->UpdateViewport(true, false);
710
710
        if (v->subtype == AIR_HELICOPTER) v->Next()->Next()->cur_image = GetRotorImage(v);
711
711
 
712
 
        VehicleMove(v, true);
713
 
 
714
712
        Vehicle *u = v->Next();
715
713
 
716
714
        int safe_x = Clamp(x, 0, MapMaxX() * TILE_SIZE);
1293
1291
 
1294
1292
void Aircraft::MarkDirty()
1295
1293
{
1296
 
        this->cur_image = this->GetImage(this->direction);
 
1294
        this->UpdateViewport(false, false);
1297
1295
        if (this->subtype == AIR_HELICOPTER) this->Next()->Next()->cur_image = GetRotorImage(this);
1298
 
        MarkSingleVehicleDirty(this);
1299
1296
}
1300
1297
 
1301
1298
static void CrashAirplane(Vehicle *v)
1306
1303
        CreateEffectVehicleRel(v, 4, 4, 8, EV_EXPLOSION_LARGE);
1307
1304
 
1308
1305
        InvalidateWindow(WC_VEHICLE_VIEW, v->index);
 
1306
        v->MarkDirty();
1309
1307
 
1310
1308
        uint amt = 2;
1311
1309
        if (IsCargoInClass(v->cargo_type, CC_PASSENGERS)) amt += v->cargo.Count();