From 824a7ee2a8a4129679aa7e93133f35739538d053 Mon Sep 17 00:00:00 2001 From: driAn Date: Sat, 23 Aug 2008 10:53:03 +0000 Subject: [PATCH] respawn ui fixes git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2359 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/clientgame.cpp | 9 ++++----- source/src/renderhud.cpp | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/source/src/clientgame.cpp b/source/src/clientgame.cpp index d1b589d7..6cb73938 100644 --- a/source/src/clientgame.cpp +++ b/source/src/clientgame.cpp @@ -395,26 +395,25 @@ bool tryrespawn() { if(player1->state==CS_DEAD) { - int respawnmillis = player1->respawnoffset+(m_ctf ? 5000 : 2000); - // set min wait time when in spectate mode (avoid unfair specting) if(player1->isspectating() && player1->spectatemode!=SM_DEATHCAM) { spectate(SM_DEATHCAM); player1->respawnoffset = lastmillis; // count again - return false; } + int respawnmillis = player1->respawnoffset+(m_ctf ? 5000 : 2000); + if(lastmillis>respawnmillis) { player1->attacking = false; - if(m_arena) { conoutf("waiting for new round to start..."); return false; } + if(m_arena) { hudoutf("waiting for new round to start..."); return false; } respawnself(); player1->weaponswitch(player1->primweap); player1->lastaction -= weapon::weaponchangetime/2; return true; } - else hudoutf("waiting %3.1f seconds for respawning", (respawnmillis-lastmillis)/(float)1000); + else hudoutf("waiting %3.1f seconds to respawn", (respawnmillis-lastmillis)/(float)1000); } return false; } diff --git a/source/src/renderhud.cpp b/source/src/renderhud.cpp index bb77e89b..b96553f7 100644 --- a/source/src/renderhud.cpp +++ b/source/src/renderhud.cpp @@ -485,7 +485,7 @@ void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwat draw_textf("SCROLL to change player", left, top+80); } - if(!hidespecthud && spectating) + if(!hidespecthud && spectating && player1->spectatemode!=SM_DEATHCAM) { glLoadIdentity(); glOrtho(0, VIRTW, VIRTH, 0, -1, 1);