summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-06-03 18:35:58 +0000
committersmatz <smatz@openttd.org>2008-06-03 18:35:58 +0000
commitc7a9637834a96722be5a524c4c1e8932a45e3461 (patch)
tree72b7d141fd63dcb880f610a334390bf9c41f97b1 /src/openttd.cpp
parentd58f0558761079552c4c607707dd131a2c5e5397 (diff)
downloadopenttd-c7a9637834a96722be5a524c4c1e8932a45e3461.tar.xz
(svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 5cf5fb6ea..50bebca62 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -54,6 +54,7 @@
#include "strings_func.h"
#include "date_func.h"
#include "vehicle_func.h"
+#include "gamelog.h"
#include "cheat_func.h"
#include "animated_tile_func.h"
#include "functions.h"
@@ -304,6 +305,7 @@ static void ShutdownGame()
UnInitializeAirports();
/* Uninitialize variables that are allocated dynamically */
+ GamelogReset();
_Town_pool.CleanPool();
_Industry_pool.CleanPool();
_Station_pool.CleanPool();
@@ -1257,6 +1259,13 @@ bool AfterLoadGame()
TileIndex map_size = MapSize();
Player *p;
+ if (CheckSavegameVersion(98)) GamelogOldver();
+
+ GamelogTestRevision();
+ GamelogTestMode();
+
+ if (CheckSavegameVersion(98)) GamelogGRFAddList(_grfconfig);
+
/* in version 2.1 of the savegame, town owner was unified. */
if (CheckSavegameVersionOldStyle(2, 1)) ConvertTownOwner();
@@ -2420,6 +2429,8 @@ bool AfterLoadGame()
}
}
+ if (_debug_gamelog_level > 0) GamelogPrintDebug();
+
return InitializeWindowsAndCaches();
}