summaryrefslogtreecommitdiff
path: root/vehicle.h
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2005-10-31 12:59:47 +0000
committerbjarni <bjarni@openttd.org>2005-10-31 12:59:47 +0000
commit682b9ee8e4e594b4737528ff769bbe526aee2f8e (patch)
tree27e67e4ab96bd9ad2c2eea8092cd15b2d09de93c /vehicle.h
parent95d1c43565402743d5cf6f215886ba028a54bb93 (diff)
downloadopenttd-682b9ee8e4e594b4737528ff769bbe526aee2f8e.tar.xz
(svn r3111) -Fix: [autoreplace] [ 1341783 ] Assertion failure in vehicle.c line 378
running MaybeReplaceVehicle() is now delayed until after the loop in CallVehicleTicks() This avoids selling the vehicle the loop currently works with (and continues to work with afterwards)
Diffstat (limited to 'vehicle.h')
-rw-r--r--vehicle.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/vehicle.h b/vehicle.h
index ef0646b5f..b1d3d81fe 100644
--- a/vehicle.h
+++ b/vehicle.h
@@ -153,6 +153,7 @@ struct Vehicle {
Vehicle *next; // next
Vehicle *first; // NOSAVE: pointer to the first vehicle in the chain
+ Vehicle *depot_list; //NOSAVE: linked list to tell what vehicles entered a depot during the last tick. Used by autoreplace
StringID string_id; // Displayed string
@@ -164,6 +165,7 @@ struct Vehicle {
int32 x_pos; // coordinates
int32 y_pos;
+
byte z_pos;
byte direction; // facing
@@ -240,6 +242,8 @@ struct Vehicle {
int32 profit_last_year;
uint32 value;
+
+
union {
VehicleRail rail;
VehicleAir air;
@@ -309,7 +313,7 @@ Vehicle *CheckClickOnVehicle(const ViewPort *vp, int x, int y);
void DecreaseVehicleValue(Vehicle *v);
void CheckVehicleBreakdown(Vehicle *v);
void AgeVehicle(Vehicle *v);
-Vehicle * MaybeReplaceVehicle(Vehicle *v);
+void VehicleEnteredDepotThisTick(Vehicle *v);
void BeginVehicleMove(Vehicle *v);
void EndVehicleMove(Vehicle *v);