summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-01-12 00:10:38 +0000
committerrubidium <rubidium@openttd.org>2010-01-12 00:10:38 +0000
commitcb820e3da34509f9960f2309c9451847fc1ab5ce (patch)
treeda8170d98086c0652cf75f56c85139c694e4a318
parent351eb4665ce3b275c847b38cc7f1f928a9e051ac (diff)
downloadopenttd-cb820e3da34509f9960f2309c9451847fc1ab5ce.tar.xz
(svn r18789) -Codechange: when we're not in a network game we don't even need to consider undrawing the chat messages
-rw-r--r--src/gfx.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp
index 4fddd1fba..755097613 100644
--- 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 @@ void GfxScroll(int left, int top, int width, int height, int xo, int yo)
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 @@ void RedrawScreenRect(int left, int top, int right, int bottom)
}
#ifdef ENABLE_NETWORK
- NetworkUndrawChatMessage();
+ if (_networking) NetworkUndrawChatMessage();
#endif /* ENABLE_NETWORK */
DrawOverlappedWindowForAll(left, top, right, bottom);