mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-05-10 04:27:10 +03:00
**CG_DrawStopwatch** Refactor
This commit is contained in:
parent
c4aca55b1a
commit
9a6e7f23f9
1 changed files with 26 additions and 8 deletions
|
@ -982,14 +982,32 @@ void CG_DrawStopwatch()
|
||||||
{
|
{
|
||||||
int iFraction;
|
int iFraction;
|
||||||
|
|
||||||
if (!cg_hud->integer || !cgi.stopWatch->iStartTime
|
if (!cg_hud->integer) {
|
||||||
|| cgi.stopWatch->iStartTime >= cgi.stopWatch->iEndTime
|
cgi.Cmd_Execute(EXEC_NOW, "ui_removehud hud_stopwatch\n");
|
||||||
|| cgi.stopWatch->iEndTime <= cg.time
|
return;
|
||||||
// don't draw the stopwatch with the objective menu
|
}
|
||||||
|| cg.ObjectivesCurrentAlpha >= 0.02
|
|
||||||
// the player isn't alive
|
if (!cgi.stopWatch->iStartTime) {
|
||||||
|| cg.snap && cg.snap->ps.stats[STAT_HEALTH] <= 0)
|
cgi.Cmd_Execute(EXEC_NOW, "ui_removehud hud_stopwatch\n");
|
||||||
{
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cgi.stopWatch->iStartTime >= cgi.stopWatch->iEndTime) {
|
||||||
|
cgi.Cmd_Execute(EXEC_NOW, "ui_removehud hud_stopwatch\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cgi.stopWatch->iEndTime <= cg.time) {
|
||||||
|
cgi.Cmd_Execute(EXEC_NOW, "ui_removehud hud_stopwatch\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cg.ObjectivesCurrentAlpha >= 0.02) {
|
||||||
|
cgi.Cmd_Execute(EXEC_NOW, "ui_removehud hud_stopwatch\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cg.snap && cg.snap->ps.stats[STAT_HEALTH] <= 0) {
|
||||||
cgi.Cmd_Execute(EXEC_NOW, "ui_removehud hud_stopwatch\n");
|
cgi.Cmd_Execute(EXEC_NOW, "ui_removehud hud_stopwatch\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue