From 836105864c840469cbaea7776fe376a2008d72fc Mon Sep 17 00:00:00 2001 From: rubidium Date: Fri, 3 Aug 2007 19:36:00 +0000 Subject: (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. --- src/articulated_vehicles.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/articulated_vehicles.cpp') 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; -- cgit v1.2.3-54-g00ecf