1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 04:53:12 +01:00

master server list

This commit is contained in:
zsilencer
2015-11-03 16:31:09 -07:00
committed by IntelOrca
parent 9acfd27735
commit 1e9381ef97
12 changed files with 436 additions and 114 deletions

View File

@@ -60,7 +60,8 @@ void chat_update()
void chat_draw()
{
if (network_get_mode() == NETWORK_MODE_NONE) {
if (network_get_mode() == NETWORK_MODE_NONE || network_get_status() != NETWORK_STATUS_CONNECTED || network_get_authstatus() != NETWORK_AUTH_OK) {
gChatOpen = false;
return;
}
rct_drawpixelinfo *dpi = (rct_drawpixelinfo*)RCT2_ADDRESS_SCREEN_DPI;
@@ -102,7 +103,7 @@ void chat_history_add(const char *src)
{
int index = _chatHistoryIndex % CHAT_HISTORY_SIZE;
memset(_chatHistory[index], 0, CHAT_INPUT_SIZE);
memcpy(_chatHistory[index], src, min(strlen(src), CHAT_INPUT_SIZE));
memcpy(_chatHistory[index], src, min(strlen(src), CHAT_INPUT_SIZE - 1));
_chatHistoryTime[index] = SDL_GetTicks();
_chatHistoryIndex++;
Mixer_Play_Effect(SOUND_NEWS_ITEM, 0, SDL_MIX_MAXVOLUME, 0, 1.5f, true);