summaryrefslogtreecommitdiff
path: root/src/newgrf_storage.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2013-12-23 18:09:29 +0000
committerfrosch <frosch@openttd.org>2013-12-23 18:09:29 +0000
commit49852e3dac0e59377b440a23c514608e714846f2 (patch)
treeba094a330655085516bd75bd560973ae29cd64b3 /src/newgrf_storage.cpp
parenteca86d1baf5f374d25dcc9bf0ff2bad328bdffab (diff)
downloadopenttd-49852e3dac0e59377b440a23c514608e714846f2.tar.xz
(svn r26175) -Add: Log in desync output when persistent storage is discarded.
Diffstat (limited to 'src/newgrf_storage.cpp')
-rw-r--r--src/newgrf_storage.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/newgrf_storage.cpp b/src/newgrf_storage.cpp
index 0c6ea9fcd..9fd0885c8 100644
--- a/src/newgrf_storage.cpp
+++ b/src/newgrf_storage.cpp
@@ -12,6 +12,8 @@
#include "stdafx.h"
#include "newgrf_storage.h"
#include "core/pool_func.hpp"
+#include "core/endian_func.hpp"
+#include "debug.h"
#include <set>
PersistentStoragePool _persistent_storage_pool("PersistentStorage");
@@ -53,6 +55,9 @@ void ClearPersistentStorageChanges(bool keep_changes)
{
/* Loop over all changes arrays */
for (std::set<BasePersistentStorageArray*>::iterator it = _changed_storage_arrays->begin(); it != _changed_storage_arrays->end(); it++) {
+ if (!keep_changes) {
+ DEBUG(desync, 1, "Discarding persistent storage changes: Feature %d, GrfID %08X, Tile %d", (*it)->feature, BSWAP32((*it)->grfid), (*it)->tile);
+ }
(*it)->ClearChanges(keep_changes);
}