applied changes since last release

--HG--
branch : novattd150
This commit is contained in:
Pavel Stupnikov
2015-03-17 02:58:23 +03:00
parent 955119d25d
commit d43187997f
14 changed files with 253 additions and 26 deletions

View File

@@ -19,6 +19,7 @@
#include "news_func.h"
#include "aircraft.h"
#include "vehiclelist.h"
#include "town.h"
#include "core/pool_func.hpp"
#include "station_base.h"
#include "roadstop_base.h"
@@ -75,6 +76,15 @@ Station::Station(TileIndex tile) :
*/
Station::~Station()
{
Town *t;
FOR_ALL_TOWNS(t) {
// Using poiter comparison instead of cycling cargos
if (t->ad_ref_goods_entry >= this->goods &&
t->ad_ref_goods_entry < this->goods + NUM_CARGO) {
t->ad_ref_goods_entry = NULL;
}
}
if (CleaningPool()) {
for (CargoID c = 0; c < NUM_CARGO; c++) {
this->goods[c].cargo.OnCleanPool();