openttd updated to 1.5.0-beta2

--HG--
branch : openttd
This commit is contained in:
Pavel Stupnikov
2015-03-01 00:30:53 +03:00
parent 0abb47ce90
commit d201932121
682 changed files with 26103 additions and 16553 deletions

View File

@@ -1,4 +1,4 @@
/* $Id: order_sl.cpp 25041 2013-02-24 16:41:51Z frosch $ */
/* $Id: order_sl.cpp 26819 2014-09-14 15:11:33Z rubidium $ */
/*
* This file is part of OpenTTD.
@@ -16,6 +16,8 @@
#include "saveload_internal.h"
#include "../safeguards.h"
/**
* Converts this order from an old savegame's version;
* it moves all bits to the new location.
@@ -184,6 +186,10 @@ static void Load_ORDR()
while ((index = SlIterateArray()) != -1) {
Order *order = new (index) Order();
SlObject(order, GetOrderDescription());
if (IsSavegameVersionBefore(190)) {
order->SetTravelTimetabled(order->GetTravelTime() > 0);
order->SetWaitTimetabled(order->GetWaitTime() > 0);
}
}
}
}
@@ -247,9 +253,11 @@ const SaveLoad *GetOrderBackupDescription()
SLE_VAR(OrderBackup, user, SLE_UINT32),
SLE_VAR(OrderBackup, tile, SLE_UINT32),
SLE_VAR(OrderBackup, group, SLE_UINT16),
SLE_VAR(OrderBackup, service_interval, SLE_UINT32),
SLE_CONDVAR(OrderBackup, service_interval, SLE_FILE_U32 | SLE_VAR_U16, 0, 191),
SLE_CONDVAR(OrderBackup, service_interval, SLE_UINT16, 192, SL_MAX_VERSION),
SLE_STR(OrderBackup, name, SLE_STR, 0),
SLE_VAR(OrderBackup, clone, SLE_UINT16),
SLE_CONDNULL(2, 0, 191), // clone (2 bytes of pointer, i.e. garbage)
SLE_CONDREF(OrderBackup, clone, REF_VEHICLE, 192, SL_MAX_VERSION),
SLE_VAR(OrderBackup, cur_real_order_index, SLE_UINT8),
SLE_CONDVAR(OrderBackup, cur_implicit_order_index, SLE_UINT8, 176, SL_MAX_VERSION),
SLE_CONDVAR(OrderBackup, current_order_time, SLE_UINT32, 176, SL_MAX_VERSION),
@@ -287,14 +295,6 @@ void Load_BKOR()
OrderBackup *ob = new (index) OrderBackup();
SlObject(ob, GetOrderBackupDescription());
}
/* Only load order-backups for network clients.
* If we are a network server or not networking, then we just loaded
* a previously saved-by-server savegame. There are
* no clients with a backup anymore, so clear it. */
if (!_networking || _network_server) {
_order_backup_pool.CleanPool();
}
}
static void Ptrs_BKOR()