(svn r6440) -Fix: [YAPF] some YAPF settings were not saved (i misunderstood how save flags work). This probably caused some MP desyncs. Thanks Maedhros for noticing and peter1138 for this patch.
authorKUDr
Mon, 11 Sep 2006 17:28:27 +0000
changeset 4590 3bb61fa03c69
parent 4589 71ecf4d2290c
child 4591 2991bc80a772
(svn r6440) -Fix: [YAPF] some YAPF settings were not saved (i misunderstood how save flags work). This probably caused some MP desyncs. Thanks Maedhros for noticing and peter1138 for this patch.
saveload.c
settings.c
--- a/saveload.c	Mon Sep 11 16:24:58 2006 +0000
+++ b/saveload.c	Mon Sep 11 17:28:27 2006 +0000
@@ -30,7 +30,7 @@
 #include "variables.h"
 #include <setjmp.h>
 
-const uint16 SAVEGAME_VERSION = 32;
+const uint16 SAVEGAME_VERSION = 33;
 uint16 _sl_version;       /// the major savegame version identifier
 byte   _sl_minor_version; /// the minor savegame version, DO NOT USE!
 
--- a/settings.c	Mon Sep 11 16:24:58 2006 +0000
+++ b/settings.c	Mon Sep 11 17:28:27 2006 +0000
@@ -1429,15 +1429,15 @@
 	SDT_CONDVAR (Patches, yapf.rail_look_ahead_signal_p0  , SLE_INT , 28, SL_MAX_VERSION, 0, 0,   500                   , -1000000, 1000000, 0, STR_NULL, NULL),
 	SDT_CONDVAR (Patches, yapf.rail_look_ahead_signal_p1  , SLE_INT , 28, SL_MAX_VERSION, 0, 0,  -100                   , -1000000, 1000000, 0, STR_NULL, NULL),
 	SDT_CONDVAR (Patches, yapf.rail_look_ahead_signal_p2  , SLE_INT , 28, SL_MAX_VERSION, 0, 0,     5                   , -1000000, 1000000, 0, STR_NULL, NULL),
-	// penalties for too long or too short station platforms (TODO: NS flag or higher revision?)
-	SDT_VAR     (Patches, yapf.rail_longer_platform_penalty,           SLE_UINT,         NS, 0,     8 * YAPF_TILE_LENGTH,        0,   20000, 0, STR_NULL, NULL),
-	SDT_VAR     (Patches, yapf.rail_longer_platform_per_tile_penalty,  SLE_UINT,         NS, 0,     0 * YAPF_TILE_LENGTH,        0,   20000, 0, STR_NULL, NULL),
-	SDT_VAR     (Patches, yapf.rail_shorter_platform_penalty,          SLE_UINT,         NS, 0,    40 * YAPF_TILE_LENGTH,        0,   20000, 0, STR_NULL, NULL),
-	SDT_VAR     (Patches, yapf.rail_shorter_platform_per_tile_penalty, SLE_UINT,         NS, 0,     0 * YAPF_TILE_LENGTH,        0,   20000, 0, STR_NULL, NULL),
+	// penalties for too long or too short station platforms
+	SDT_CONDVAR (Patches, yapf.rail_longer_platform_penalty,           SLE_UINT, 33, SL_MAX_VERSION, 0, 0,  8 * YAPF_TILE_LENGTH, 0,   20000, 0, STR_NULL, NULL),
+	SDT_CONDVAR (Patches, yapf.rail_longer_platform_per_tile_penalty,  SLE_UINT, 33, SL_MAX_VERSION, 0, 0,  0 * YAPF_TILE_LENGTH, 0,   20000, 0, STR_NULL, NULL),
+	SDT_CONDVAR (Patches, yapf.rail_shorter_platform_penalty,          SLE_UINT, 33, SL_MAX_VERSION, 0, 0, 40 * YAPF_TILE_LENGTH, 0,   20000, 0, STR_NULL, NULL),
+	SDT_CONDVAR (Patches, yapf.rail_shorter_platform_per_tile_penalty, SLE_UINT, 33, SL_MAX_VERSION, 0, 0,  0 * YAPF_TILE_LENGTH, 0,   20000, 0, STR_NULL, NULL),
 	// road vehicles - penalties
-	SDT_VAR     (Patches, yapf.road_slope_penalty                    , SLE_UINT,         NS, 0,     2 * YAPF_TILE_LENGTH,        0, 1000000, 0, STR_NULL, NULL),
-	SDT_VAR     (Patches, yapf.road_curve_penalty                    , SLE_UINT,         NS, 0,     1 * YAPF_TILE_LENGTH,        0, 1000000, 0, STR_NULL, NULL),
-	SDT_VAR     (Patches, yapf.road_crossing_penalty                 , SLE_UINT,         NS, 0,     3 * YAPF_TILE_LENGTH,        0, 1000000, 0, STR_NULL, NULL),
+	SDT_CONDVAR (Patches, yapf.road_slope_penalty                    , SLE_UINT, 33, SL_MAX_VERSION, 0, 0,  2 * YAPF_TILE_LENGTH, 0, 1000000, 0, STR_NULL, NULL),
+	SDT_CONDVAR (Patches, yapf.road_curve_penalty                    , SLE_UINT, 33, SL_MAX_VERSION, 0, 0,  1 * YAPF_TILE_LENGTH, 0, 1000000, 0, STR_NULL, NULL),
+	SDT_CONDVAR (Patches, yapf.road_crossing_penalty                 , SLE_UINT, 33, SL_MAX_VERSION, 0, 0,  3 * YAPF_TILE_LENGTH, 0, 1000000, 0, STR_NULL, NULL),
 
 	/***************************************************************************/
 	/* Terrain genation related patch options */