summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/aircraft_cmd.cpp3
-rw-r--r--src/openttd.cpp51
-rw-r--r--src/train_cmd.cpp6
3 files changed, 0 insertions, 60 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index 1ea69d5c6..c9264d165 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -2038,10 +2038,7 @@ bool Aircraft::Tick()
for (uint i = 0; i != 2; i++) {
/* stop if the aircraft was deleted */
- VehicleID index = this->index;
if (!AircraftEventHandler(this, i)) return false;
- assert(Vehicle::Get(index) == this);
- assert(IsNormalAircraft(this));
}
return true;
diff --git a/src/openttd.cpp b/src/openttd.cpp
index e60325c8d..4c2576400 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1046,55 +1046,6 @@ void SwitchToMode(SwitchMode new_mode)
}
-#include "depot_base.h"
-#include "autoreplace_base.h"
-#include "waypoint.h"
-#include "network/core/tcp_game.h"
-#include "network/network_base.h"
-/** Make sure everything is valid. Will be removed in future. */
-static void CheckPools()
-{
- const Depot *d;
- FOR_ALL_DEPOTS(d) assert(IsRoadDepotTile(d->xy) || IsRailDepotTile(d->xy) || IsShipDepotTile(d->xy) || IsHangarTile(d->xy));
- const Industry *i;
- FOR_ALL_INDUSTRIES(i) assert(IsValidTile(i->xy));
- const Engine *e;
- FOR_ALL_ENGINES(e) assert(e->info.climates != 0);
- const Order *o;
- FOR_ALL_ORDERS(o) assert(!o->IsType(OT_NOTHING));
- const OrderList *ol;
- FOR_ALL_ORDER_LISTS(ol) assert(ol->GetNumOrders() != INVALID_VEH_ORDER_ID && ol->GetNumVehicles() != 0);
- const Town *t;
- FOR_ALL_TOWNS(t) assert(IsValidTile(t->xy));
- const Group *g;
- FOR_ALL_GROUPS(g) assert(g->owner != INVALID_OWNER);
- const EngineRenew *er;
- FOR_ALL_ENGINE_RENEWS(er) assert(er->from != INVALID_ENGINE);
- const Waypoint *wp;
- FOR_ALL_WAYPOINTS(wp) assert(IsValidTile(wp->xy));
- const Company *c;
- FOR_ALL_COMPANIES(c) assert(c->name_1 != 0);
- const CargoPacket *cp;
- FOR_ALL_CARGOPACKETS(cp) assert(cp->count != 0);
-#ifdef ENABLE_NETWORK
- const NetworkClientSocket *ncs;
- FOR_ALL_CLIENT_SOCKETS(ncs) assert(ncs->IsConnected());
- const NetworkClientInfo *nci;
- FOR_ALL_CLIENT_INFOS(nci) assert(nci->client_id != INVALID_CLIENT_ID);
-#endif
- const Station *st;
- FOR_ALL_STATIONS(st) assert(IsValidTile(st->xy));
- const RoadStop *rs;
- FOR_ALL_ROADSTOPS(rs) assert(IsValidTile(rs->xy));
- const Sign *si;
- FOR_ALL_SIGNS(si) assert(si->owner != INVALID_OWNER);
- const Vehicle *v;
- FOR_ALL_VEHICLES(v) assert(v->type != VEH_INVALID);
-
- FOR_ALL_ORDER_LISTS(ol) ol->DebugCheckSanity();
-}
-
-
/**
* State controlling game loop.
* The state must not be changed from anywhere but here.
@@ -1109,8 +1060,6 @@ void StateGameLoop()
}
if (IsGeneratingWorld()) return;
- CheckPools();
-
ClearStorageChanges(false);
if (_game_mode == GM_EDITOR) {
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index 8769f3aab..7462e91ef 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -4446,14 +4446,8 @@ bool Train::Tick()
this->current_order_time++;
- VehicleID index = this->index;
-
if (!TrainLocoHandler(this, false)) return false;
- /* make sure vehicle wasn't deleted. */
- assert(Vehicle::Get(index) == this);
- assert(IsFrontEngine(this));
-
return TrainLocoHandler(this, true);
} else if (IsFreeWagon(this) && (this->vehstatus & VS_CRASHED)) {
/* Delete flooded standalone wagon chain */