diff options
author | rubidium <rubidium@openttd.org> | 2010-04-14 16:12:54 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-04-14 16:12:54 +0000 |
commit | 5eb54ac434205382edb9ca93fbd0aab024edee08 (patch) | |
tree | e515428761f1a53854f4ac51209a2075455c1510 | |
parent | 51ea33f92fa43b2061385463c1db32d9be7eaaf0 (diff) | |
download | openttd-5eb54ac434205382edb9ca93fbd0aab024edee08.tar.xz |
(svn r19629) -Fix [FS#3757]: chat message caused glitch when rejoining a network game
-rw-r--r-- | src/network/network_chat_gui.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp index e9f92b784..10ed4e20c 100644 --- a/src/network/network_chat_gui.cpp +++ b/src/network/network_chat_gui.cpp @@ -116,14 +116,15 @@ void CDECL NetworkAddChatMessage(TextColour colour, uint8 duration, const char * void NetworkInitChatMessage() { - MAX_CHAT_MESSAGES = _settings_client.gui.network_chat_box_height; - - _chatmsg_list = ReallocT(_chatmsg_list, _settings_client.gui.network_chat_box_height); - _chatmsg_box.x = 10; - _chatmsg_box.y = 3 * FONT_HEIGHT_NORMAL; - _chatmsg_box.width = _settings_client.gui.network_chat_box_width; - _chatmsg_box.height = _settings_client.gui.network_chat_box_height * (FONT_HEIGHT_NORMAL + NETWORK_CHAT_LINE_SPACING) + 2; - _chatmessage_backup = ReallocT(_chatmessage_backup, _chatmsg_box.width * _chatmsg_box.height * BlitterFactoryBase::GetCurrentBlitter()->GetBytesPerPixel()); + MAX_CHAT_MESSAGES = _settings_client.gui.network_chat_box_height; + + _chatmsg_list = ReallocT(_chatmsg_list, _settings_client.gui.network_chat_box_height); + _chatmsg_box.x = 10; + _chatmsg_box.y = 3 * FONT_HEIGHT_NORMAL; + _chatmsg_box.width = _settings_client.gui.network_chat_box_width; + _chatmsg_box.height = _settings_client.gui.network_chat_box_height * (FONT_HEIGHT_NORMAL + NETWORK_CHAT_LINE_SPACING) + 2; + _chatmessage_backup = ReallocT(_chatmessage_backup, _chatmsg_box.width * _chatmsg_box.height * BlitterFactoryBase::GetCurrentBlitter()->GetBytesPerPixel()); + _chatmessage_visible = false; for (uint i = 0; i < MAX_CHAT_MESSAGES; i++) { _chatmsg_list[i].message[0] = '\0'; |