diff options
author | rubidium <rubidium@openttd.org> | 2010-12-14 14:57:51 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-12-14 14:57:51 +0000 |
commit | e68efb9e719a028f14da9965d4e3795252b2cbad (patch) | |
tree | c0b28a52236d51805034fab159a15a305402ca06 /src/openttd.cpp | |
parent | 4045429df6e39fbd020a5feda379177b2d2bc267 (diff) | |
download | openttd-e68efb9e719a028f14da9965d4e3795252b2cbad.tar.xz |
(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
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r-- | src/openttd.cpp | 7 |
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 */ |