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
commit1f55797fe3c75ec61ea69e6fa38ca2e4d817d30e (patch)
tree72b7d141fd63dcb880f610a334390bf9c41f97b1 /src/openttd.cpp
parent1b7fcf0171ab4bc39b6cbb6b144ab7433f72ce1e (diff)
downloadopenttd-1f55797fe3c75ec61ea69e6fa38ca2e4d817d30e.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();
}