From e68efb9e719a028f14da9965d4e3795252b2cbad Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 14 Dec 2010 14:57:51 +0000 Subject: (svn r21512) -Change/Feature: make the delay of the chat messages timing out unrelated to the number of passed game days, i.e. don't stop aging chat messages when the server is paused --- src/openttd.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/openttd.cpp') 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 */ -- cgit v1.2.3-54-g00ecf