From 1f55797fe3c75ec61ea69e6fa38ca2e4d817d30e Mon Sep 17 00:00:00 2001 From: smatz Date: Tue, 3 Jun 2008 18:35:58 +0000 Subject: (svn r13375) -Add: logging of actions that could possibly cause desyncs and crashes to simplify debugging. See readme.txt for details --- src/openttd.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/openttd.cpp') 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(); } -- cgit v1.2.3-54-g00ecf