mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-12 09:09:09 +00:00
(svn r1818) -Add: Dynamic orders (up to 64k orders)
This commit is contained in:
@@ -941,7 +941,11 @@ static void *IntToReference(uint r, uint t)
|
||||
return NULL;
|
||||
|
||||
switch (t) {
|
||||
case REF_ORDER: return GetOrder(r - 1);
|
||||
case REF_ORDER: {
|
||||
if (!AddBlockIfNeeded(&_order_pool, r - 1))
|
||||
error("Orders: failed loading savegame: too many orders");
|
||||
return GetOrder(r - 1);
|
||||
}
|
||||
case REF_VEHICLE: {
|
||||
if (!AddBlockIfNeeded(&_vehicle_pool, r - 1))
|
||||
error("Vehicles: failed loading savegame: too many vehicles");
|
||||
@@ -959,7 +963,7 @@ static void *IntToReference(uint r, uint t)
|
||||
}
|
||||
case REF_ROADSTOPS: {
|
||||
if (!AddBlockIfNeeded(&_roadstop_pool, r - 1))
|
||||
error("RoadStop: failed loading savegame: too many RoadStops");
|
||||
error("RoadStops: failed loading savegame: too many RoadStops");
|
||||
return GetRoadStop(r - 1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user