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

« back to all changes in this revision

Viewing changes to src/vehicle.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: vehicle.cpp 16539 2009-06-08 22:53:39Z rubidium $ */
 
1
/* $Id: vehicle.cpp 17598 2009-09-21 15:41:58Z rubidium $ */
2
2
 
3
3
/** @file vehicle.cpp Base implementations of all vehicles. */
4
4
 
38
38
#include "settings_type.h"
39
39
#include "network/network.h"
40
40
 
 
41
#include "economy_base.h"
41
42
#include "table/sprites.h"
42
43
#include "table/strings.h"
43
44
 
481
482
        _Vehicle_pool.CleanPool();
482
483
        _Vehicle_pool.AddBlockToPool();
483
484
 
 
485
        _CargoPayment_pool.CleanPool();
 
486
        _CargoPayment_pool.AddBlockToPool();
 
487
 
 
488
        _cargo_payment_savegame = false;
 
489
 
484
490
        _vehicles_to_autoreplace.Reset();
485
491
        ResetVehiclePosHash();
486
492
}
529
535
                GetStation(this->last_station_visited)->loading_vehicles.remove(this);
530
536
 
531
537
                HideFillingPercent(&this->fill_percent_te_id);
 
538
 
 
539
                delete this->cargo_payment;
532
540
        }
533
541
 
534
542
        if (IsEngineCountable(this)) {
1514
1522
 
1515
1523
        GetStation(this->last_station_visited)->loading_vehicles.push_back(this);
1516
1524
 
1517
 
        VehiclePayment(this);
 
1525
        PrepareUnload(this);
1518
1526
 
1519
1527
        InvalidateWindow(GetWindowClassForVehicleType(this->type), this->owner);
1520
1528
        InvalidateWindowWidget(WC_VEHICLE_VIEW, this->index, VVW_WIDGET_START_STOP_VEH);
1530
1538
{
1531
1539
        assert(current_order.IsType(OT_LOADING));
1532
1540
 
 
1541
        delete this->cargo_payment;
 
1542
 
1533
1543
        /* Only update the timetable if the vehicle was supposed to stop here. */
1534
1544
        if (current_order.GetNonStopType() != ONSF_STOP_EVERYWHERE) UpdateVehicleTimetable(this, false);
1535
1545
 
1724
1734
                v->vehstatus |= VS_STOPPED;
1725
1735
                InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, VVW_WIDGET_START_STOP_VEH);
1726
1736
                InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
 
1737
                v->MarkDirty();
1727
1738
        }
1728
1739
}
1729
1740