summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 1e6df5f60..8b4e01363 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -1359,6 +1359,13 @@ void GameLoop()
/* Singleplayer */
StateGameLoop();
}
+
+ /* Check chat messages roughly once a second. */
+ static uint check_message = 0;
+ if (++check_message > 1000 / MILLISECONDS_PER_TICK) {
+ check_message = 0;
+ NetworkChatMessageLoop();
+ }
#else
StateGameLoop();
#endif /* ENABLE_NETWORK */