diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-11-18 22:20:35 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2007-11-18 22:20:35 +0000 |
| commit | d66a2a46efd9369d918a60d5483c23ed39e8dd58 (patch) | |
| tree | 4e3e1ef791cd3f73d2a2a333aeb3608c130ea92d /src/game/client/game_client.cpp | |
| parent | b44a3edfe9363163ab129594cba51a989c042644 (diff) | |
| download | zcatch-d66a2a46efd9369d918a60d5483c23ed39e8dd58.tar.gz zcatch-d66a2a46efd9369d918a60d5483c23ed39e8dd58.zip | |
fixed menu switching problems and some compile errors
Diffstat (limited to 'src/game/client/game_client.cpp')
| -rw-r--r-- | src/game/client/game_client.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/game/client/game_client.cpp b/src/game/client/game_client.cpp index 4d81c344..d8a20fa1 100644 --- a/src/game/client/game_client.cpp +++ b/src/game/client/game_client.cpp @@ -41,6 +41,7 @@ enum static int chat_mode = CHATMODE_NONE; bool menu_active = false; +bool menu_game_active = false; static bool emoticon_selector_active = false; static vec2 mouse_pos; @@ -959,7 +960,7 @@ static void render_flag(const obj_flag *prev, const obj_flag *current) vec2 pos = mix(vec2(prev->x, prev->y), vec2(current->x, current->y), client_intratick()); - if(current->local_carry) + if(local_info && current->carried_by == local_info->clientid) pos = local_character_pos; gfx_setcolor(current->team ? 0 : 1,0,current->team ? 1 : 0,1); @@ -1989,7 +1990,11 @@ void render_game() if (chat_mode) chat_mode = CHATMODE_NONE; else + { menu_active = !menu_active; + if(menu_active) + menu_game_active = true; + } } // handle chat input @@ -2610,11 +2615,18 @@ void menu_do_connected(); extern "C" void modc_statechange(int state, int old) { if(state == CLIENTSTATE_OFFLINE) + { menu_do_disconnected(); + menu_game_active = false; + } if(state == CLIENTSTATE_CONNECTING) menu_do_connecting(); if (state == CLIENTSTATE_ONLINE) + { + menu_active = false; + menu_game_active = true; menu_do_connected(); + } } extern "C" void modc_message(int msg) @@ -2703,8 +2715,6 @@ extern "C" void modc_connected() killmsgs[i].tick = -100000; send_info(true); - - config.ui_page = 5; } extern "C" const char *modc_net_version() { return TEEWARS_NETVERSION; } |