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 pos, vector mySize)

Function Documentation

◆ HUD_Mod_Survival()

void HUD_Mod_Survival ( vector pos,
vector mySize )

Definition at line 49 of file cl_survival.qc.

50{
51 mod_active = 1; // survival should always show the mod HUD
52
53 int mystatus = playerslots[player_localnum].survival_status;
54 string player_text = "";
55 vector player_color = '1 1 1';
56 //string player_icon = "";
57
58 if(STAT(GAMESTARTTIME) > time || STAT(ROUNDSTARTTIME) > time || entcs_IsSpectating(player_localnum))
59 return;
60
61 if(mystatus == SURV_STATUS_HUNTER)
62 {
63 player_text = _("Hunter");
64 player_color = '1 0 0';
65 //player_icon = "player_red";
66 }
67 else if(mystatus == SURV_STATUS_PREY)
68 {
69 player_text = _("Survivor");
70 player_color = '0 1 0';
71 //player_icon = "player_neutral";
72 }
73
74 drawstring_aspect(pos, player_text, vec2(mySize.x, mySize.y), player_color, panel_fg_alpha, DRAWFLAG_NORMAL);
75}
void drawstring_aspect(vector pos, string text, vector sz, vector color, float theAlpha, float drawflag)
Definition draw.qc:110
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