summaryrefslogtreecommitdiff
path: root/src/saveload
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-01-22 13:54:02 +0000
committerfrosch <frosch@openttd.org>2012-01-22 13:54:02 +0000
commit5bf1710a28021f7eef8dcc91cbfe08dd1ad0c215 (patch)
treecfeedeaa0ef1f8efa0fd2442fec3ac9f591db3b2 /src/saveload
parentb9192ac432bf915d3020c6d23e6368903b805061 (diff)
downloadopenttd-5bf1710a28021f7eef8dcc91cbfe08dd1ad0c215.tar.xz
(svn r23835) -Change [FS#4999]: Make signs placed in scenario editor belong to the GS. That way they are always shown in game and are not editable.
Diffstat (limited to 'src/saveload')
-rw-r--r--src/saveload/saveload.cpp3
-rw-r--r--src/saveload/signs_sl.cpp6
2 files changed, 8 insertions, 1 deletions
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index 1eb6da59c..eb9c38a28 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -234,8 +234,9 @@
* 168 23637
* 169 23816
* 170 23826
+ * 171 23835
*/
-extern const uint16 SAVEGAME_VERSION = 170; ///< Current savegame version of OpenTTD.
+extern const uint16 SAVEGAME_VERSION = 171; ///< Current savegame version of OpenTTD.
SavegameType _savegame_type; ///< type of savegame we are loading
diff --git a/src/saveload/signs_sl.cpp b/src/saveload/signs_sl.cpp
index 918f9e213..d5ea26d65 100644
--- a/src/saveload/signs_sl.cpp
+++ b/src/saveload/signs_sl.cpp
@@ -11,6 +11,7 @@
#include "../stdafx.h"
#include "../signs_base.h"
+#include "../fios.h"
#include "saveload.h"
@@ -55,6 +56,11 @@ static void Load_SIGN()
if (IsSavegameVersionBefore(6, 1) || (IsSavegameVersionBefore(83) && si->owner == INVALID_OWNER)) {
si->owner = OWNER_NONE;
}
+
+ /* Signs placed in scenario editor shall now be OWNER_DEITY */
+ if (IsSavegameVersionBefore(171) && si->owner == OWNER_NONE && _saveload_mode == SLD_LOAD_SCENARIO) {
+ si->owner = OWNER_DEITY;
+ }
}
}