Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
cl_survival.qh File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void HUD_Mod_Survival (vector myPos, vector mySize, bool should_draw)

Function Documentation

◆ HUD_Mod_Survival()

void HUD_Mod_Survival ( vector myPos,
vector mySize,
bool should_draw )

Definition at line 47 of file cl_survival.qc.

48{
49 if (!should_draw)
50 return;
51
52 mod_active = 1; // survival should always show the mod HUD
53
54 int mystatus = playerslots[player_localnum].survival_status;
55 string player_text = "";
56 vector player_color = '1 1 1';
57 //string player_icon = "";
58
59 if(STAT(GAMESTARTTIME) > time || STAT(ROUNDSTARTTIME) > time || entcs_IsSpectating(player_localnum))
60 return;
61
62 if(mystatus == SURV_STATUS_HUNTER)
63 {
64 player_text = _("Hunter");
65 player_color = '1 0 0';
66 //player_icon = "player_red";
67 }
68 else if(mystatus == SURV_STATUS_PREY)
69 {
70 player_text = _("Survivor");
71 player_color = '0 1 0';
72 //player_icon = "player_neutral";
73 }
74
75 drawstring_aspect(pos, player_text, vec2(mySize.x, mySize.y), player_color, panel_fg_alpha, DRAWFLAG_NORMAL);
76}
void drawstring_aspect(vector pos, string text, vector sz, vector color, float theAlpha, float drawflag)
Definition draw.qc:109
entity playerslots[255]
Definition main.qh:84
const float DRAWFLAG_NORMAL
float player_localnum
float time
#define entcs_IsSpectating(i)
Definition ent_cs.qh:76
float panel_fg_alpha
Definition hud.qh:169
#define STAT(...)
Definition stats.qh:82
bool mod_active
Definition modicons.qh:7
vector
Definition self.qh:92
const int SURV_STATUS_HUNTER
Definition survival.qh:38
const int SURV_STATUS_PREY
Definition survival.qh:37
#define vec2(...)
Definition vector.qh:90

References DRAWFLAG_NORMAL, drawstring_aspect(), entcs_IsSpectating, mod_active, panel_fg_alpha, player_localnum, playerslots, STAT, SURV_STATUS_HUNTER, SURV_STATUS_PREY, time, vec2, and vector.

Referenced by Survival::void().