From 4c53365c16362156529c7669079e31845384589f Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 7 Mar 2009 13:57:09 +0000 Subject: renamed Entity::eventstate() to Entity::state(), introduced Destroyed state --- src/client/playerview.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/client/playerview.cc') diff --git a/src/client/playerview.cc b/src/client/playerview.cc index f129a1e..54d444d 100644 --- a/src/client/playerview.cc +++ b/src/client/playerview.cc @@ -144,6 +144,9 @@ void PlayerView::draw() { if (core::localplayer()->view()) { + // hide hide when a view is set + view_hud->hide(); + // docking view if (core::localplayer()->view()->menus().size()) { @@ -154,11 +157,13 @@ void PlayerView::draw() label_zonename->show(); if (view_lastentity != core::localplayer()->view()) { - // initialy show the menu + // initially show the menu show_menu("main"); map()->hide(); chat()->hide(); audio::play("ui/menu"); + + view_lastentity = core::localplayer()->view(); } else if (!view_menu->visible() && !map()->visible() && (!chat()->visible() || chat()->small_view()) ) { // show the menu if there's no other window open menu()->show(); @@ -167,13 +172,12 @@ void PlayerView::draw() } else { // entity without menus, plain view + view_lastentity = 0; + this->hide(); return; } - view_hud->hide(); - view_lastentity = core::localplayer()->view(); - } else { if (view_menu->visible()) { view_menu->hide(); -- cgit v1.2.3