(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.
This commit is contained in:
rubidium
2007-08-03 19:36:00 +00:00
parent aa9869e2de
commit 836105864c
9 changed files with 122 additions and 229 deletions

View File

@@ -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;