(svn r1783) -Add: Dynamic vehicles (now up to 64k of vehicles)

This commit is contained in:
truelight
2005-02-04 13:23:29 +00:00
parent 3153924ad1
commit f183ca5cc2
7 changed files with 94 additions and 58 deletions

View File

@@ -79,7 +79,7 @@ void BuildVehicleList(vehiclelist_d *vl, int type, int owner, int station)
if (!(vl->flags & VL_REBUILD)) return;
/* Create array for sorting */
_vehicle_sort = realloc(_vehicle_sort, _vehicles_size * sizeof(_vehicle_sort[0]));
_vehicle_sort = realloc(_vehicle_sort, GetVehiclePoolSize() * sizeof(_vehicle_sort[0]));
if (_vehicle_sort == NULL)
error("Could not allocate memory for the vehicle-sorting-list");