changeset 14238:4e1b1256b52f draft

(svn r18789) -Codechange: when we're not in a network game we don't even need to consider undrawing the chat messages
author rubidium <rubidium@openttd.org>
date Tue, 12 Jan 2010 00:10:38 +0000
parents eb3340ea843f
children 91a77924c2f3
files src/gfx.cpp
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -20,6 +20,7 @@
 #include "strings_func.h"
 #include "settings_type.h"
 #include "landscape_type.h"
+#include "network/network.h"
 #include "network/network_func.h"
 #include "thread/thread.h"
 #include "window_func.h"
@@ -88,7 +89,7 @@
 	if (_cursor.visible) UndrawMouseCursor();
 
 #ifdef ENABLE_NETWORK
-	NetworkUndrawChatMessage();
+	if (_networking) NetworkUndrawChatMessage();
 #endif /* ENABLE_NETWORK */
 
 	blitter->ScrollBuffer(_screen.dst_ptr, left, top, width, height, xo, yo);
@@ -1422,7 +1423,7 @@
 	}
 
 #ifdef ENABLE_NETWORK
-	NetworkUndrawChatMessage();
+	if (_networking) NetworkUndrawChatMessage();
 #endif /* ENABLE_NETWORK */
 
 	DrawOverlappedWindowForAll(left, top, right, bottom);