From 0830da6f5b999a1b90144eddeb5f9379628728ce Mon Sep 17 00:00:00 2001 From: Dusan Durech Date: Sat, 18 Apr 2009 14:01:58 +0200 Subject: fix bug with chat in nonetgame mode --- src/client/chat.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/client/chat.c b/src/client/chat.c index 40296da..9d35519 100644 --- a/src/client/chat.c +++ b/src/client/chat.c @@ -68,7 +68,10 @@ void chat_init() strcpy(line, ""); chat_active = FALSE; - hot_key_register(SDLK_RETURN, hotkey_chat_enter); + if( net_multiplayer_get_game_type() != NET_GAME_TYPE_NONE ) + { + hot_key_register(SDLK_RETURN, hotkey_chat_enter); + } receivedNewMsg = FALSE; line_time = 0; @@ -253,6 +256,10 @@ void chat_quit() { assert(listText != NULL); - //hot_key_unregister(SDLK_RETURN); + if( net_multiplayer_get_game_type() != NET_GAME_TYPE_NONE ) + { + hot_key_unregister(SDLK_RETURN); + } + list_destroy_item(listText, free); } -- cgit v1.2.3