summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2005-03-28 12:38:02 +0000
committertruelight <truelight@openttd.org>2005-03-28 12:38:02 +0000
commit4573a9f872ca0f384d9db513687fcf35f664863f (patch)
treeb8b2a87a1734b23f0586dde35d303dbc873b9951 /misc.c
parente4cb9dbb77910fc7d2b8c077924ecde3bb3d09c7 (diff)
downloadopenttd-4573a9f872ca0f384d9db513687fcf35f664863f.tar.xz
(svn r2099) -Fix: no longer chat-messages hang when the game wraps around 2090
-Codechange: while trying to find this bug, made texteff.c a bit more readable :)
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/misc.c b/misc.c
index 306921731..79ca42795 100644
--- a/misc.c
+++ b/misc.c
@@ -683,6 +683,10 @@ void IncreaseDate(void)
FOR_ALL_VEHICLES(v) {
v->date_of_last_service -= 365; // 1 year is 365 days long
}
+
+ /* Because the _date wraps here, and text-messages expire by game-days, we have to clean out
+ * all of them if the date is set back, else those messages will hang for ever */
+ InitTextMessage();
}
if (_patches.auto_euro)