diff options
| author | Dusan Durech <dusan@debian.debian> | 2009-04-18 14:01:58 +0200 |
|---|---|---|
| committer | Dusan Durech <dusan@debian.debian> | 2009-04-18 14:01:58 +0200 |
| commit | 0830da6f5b999a1b90144eddeb5f9379628728ce (patch) | |
| tree | 587c802d8fe8767193cf2e2cbaa480d2fd121b3c /src | |
| parent | d902c78327acdc5ec4a35119be2eb92399fdb43d (diff) | |
fix bug with chat in nonetgame mode
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/chat.c | 11 |
1 files changed, 9 insertions, 2 deletions
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); } |