summaryrefslogtreecommitdiff
path: root/src/articulated_vehicles.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-03 19:36:00 +0000
committerrubidium <rubidium@openttd.org>2007-08-03 19:36:00 +0000
commitb21f29c38fc1629a1c03991b217d0a96d205a159 (patch)
treeea92676733322e0fc10f54254112dd92b294ebfb /src/articulated_vehicles.cpp
parent7e9594e0a506f00951db4c3c654bb819b89d0d66 (diff)
downloadopenttd-b21f29c38fc1629a1c03991b217d0a96d205a159.tar.xz
(svn r10770) -Codechange: use the pool item class as super class for the vehicle struct.
-Codechange: do not force "special" vehicles to be allocated in the low 1024 vehicle slots and non "special" vehicles in the rest of the slots.
Diffstat (limited to 'src/articulated_vehicles.cpp')
-rw-r--r--src/articulated_vehicles.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/articulated_vehicles.cpp b/src/articulated_vehicles.cpp
index 9ae398f4d..2fad99769 100644
--- a/src/articulated_vehicles.cpp
+++ b/src/articulated_vehicles.cpp
@@ -42,7 +42,7 @@ void AddArticulatedParts(Vehicle **vl, VehicleType type)
/* Attempt to use pre-allocated vehicles until they run out. This can happen
* if the callback returns different values depending on the cargo type. */
u->next = vl[i];
- if (u->next == NULL) u->next = AllocateVehicle();
+ if (u->next == NULL) u->next = new InvalidVehicle();
if (u->next == NULL) return;
u = u->next;