summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-01-13 15:03:34 +0000
committerrubidium <rubidium@openttd.org>2010-01-13 15:03:34 +0000
commitf9d2ccf8db35b50f060ff55d526f0c5982d58536 (patch)
tree2a7292432302a46e3456ef594ad5343b18c2745c
parent2868da2f571eb91bc9f64ba78f88e4674fabf283 (diff)
downloadopenttd-f9d2ccf8db35b50f060ff55d526f0c5982d58536.tar.xz
(svn r18794) -Codechange: add local company and network 'state' to the crash log
-rw-r--r--src/crashlog.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/crashlog.cpp b/src/crashlog.cpp
index f66c1de0d..670d6a8dc 100644
--- a/src/crashlog.cpp
+++ b/src/crashlog.cpp
@@ -24,10 +24,12 @@
#include "saveload/saveload.h"
#include "screenshot.h"
#include "gfx_func.h"
+#include "network/network.h"
#include <squirrel.h>
#include "ai/ai_info.hpp"
#include "company_base.h"
+#include "company_func.h"
#include <time.h>
@@ -88,6 +90,7 @@ char *CrashLog::LogConfiguration(char *buffer, const char *last) const
" Language: %s\n"
" Music driver: %s\n"
" Music set: %s\n"
+ " Network: %s\n"
" Sound driver: %s\n"
" Sound set: %s\n"
" Video driver: %s\n\n",
@@ -96,12 +99,13 @@ char *CrashLog::LogConfiguration(char *buffer, const char *last) const
StrEmpty(_dynlang.curr_file) ? "none" : _dynlang.curr_file,
_music_driver == NULL ? "none" : _music_driver->GetName(),
BaseMusic::GetUsedSet() == NULL ? "none" : BaseMusic::GetUsedSet()->name,
+ _networking ? (_network_server ? "server" : "client") : "no",
_sound_driver == NULL ? "none" : _sound_driver->GetName(),
BaseSounds::GetUsedSet() == NULL ? "none" : BaseSounds::GetUsedSet()->name,
_video_driver == NULL ? "none" : _video_driver->GetName()
);
- buffer += seprintf(buffer, last, "AI Configuration:\n");
+ buffer += seprintf(buffer, last, "AI Configuration (local: %i):\n", (int)_local_company);
const Company *c;
FOR_ALL_COMPANIES(c) {
if (c->ai_info == NULL) {