1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 09:09:09 +00:00

(svn r1776) -Add: Dynamic stations. You can now have up to 64k of stations

This commit is contained in:
truelight
2005-02-03 17:22:35 +00:00
parent f1d4a85f59
commit 1938a73c90
6 changed files with 72 additions and 39 deletions

View File

@@ -943,7 +943,11 @@ static void *IntToReference(uint r, uint t)
switch (t) {
case REF_ORDER: return GetOrder(r - 1);
case REF_VEHICLE: return GetVehicle(r - 1);
case REF_STATION: return GetStation(r - 1);
case REF_STATION: {
if (!AddBlockIfNeeded(&_station_pool, r - 1))
error("Stations: failed loading savegame: too many stations");
return GetStation(r - 1);
}
case REF_TOWN: {
if (!AddBlockIfNeeded(&_town_pool, r - 1))
error("Towns: failed loading savegame: too many towns");