summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2006-03-17 18:54:42 +0000
committerDarkvater <Darkvater@openttd.org>2006-03-17 18:54:42 +0000
commit99d863690286a5158d67cf3bce9e9d233931a745 (patch)
tree1c6014f9adac47c093c8b8a2665566e4d3553b83
parentd3aa2addc2d5df22a93c7e98863c5519616932f5 (diff)
downloadopenttd-99d863690286a5158d67cf3bce9e9d233931a745.tar.xz
(svn r3923) - [Pathces/HACK]: Add 32 empty bytes at the end of the patches chunk in the savegame to not to have to increase the savegame version every time we add one; at least for a while. To not break in-between nightlies a temporary hack is done. So make sure to upgrade to this nightly before you upgrade to newer ones. Releases are unaffected
-rw-r--r--settings.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/settings.c b/settings.c
index 12417189b..30e9ed422 100644
--- a/settings.c
+++ b/settings.c
@@ -1302,6 +1302,7 @@ const SettingDesc _patch_settings[] = {
/* This is the penalty for level crossings, for both road and rail vehicles */
SDT_VAR(Patches, npf_crossing_penalty, SLE_UINT, 0, 0, (3 * NPF_TILE_LENGTH), 0, 100000, STR_NULL, NULL),
+ SDT_CONDNULL(32, 0, SL_MAX_VERSION),
SDT_END()
};
@@ -1563,6 +1564,9 @@ static void Load_PATS(void)
/* Copy over default setting since some might not get loaded in
* a networking environment. This ensures for example that the local
* signal_side stays when joining a network-server */
+ size_t length = SlGetFieldLength();
+ for (; length != 0; length--) SlReadByte();
+ return;
_patches = _patches_newgame;
LoadSettings(_patch_settings, &_patches);
}