Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
nexball.qh File Reference
#include <common/mapinfo.qh>
Include dependency graph for nexball.qh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  NexBall

Macros

#define g_nexball   IS_GAMETYPE(NEXBALL)

Functions

void HUD_Mod_NexBall (vector pos, vector mySize)
 REGISTER_GAMETYPE (NEXBALL, NEW(NexBall))

Variables

const int NB_CARRYING = BIT(0)

Macro Definition Documentation

◆ g_nexball

#define g_nexball   IS_GAMETYPE(NEXBALL)

Definition at line 33 of file nexball.qh.

Referenced by nb_DropBall(), SpawnBall(), spawnfunc(), and SpawnGoal().

Function Documentation

◆ HUD_Mod_NexBall()

void HUD_Mod_NexBall ( vector pos,
vector mySize )

Definition at line 7 of file cl_nexball.qc.

8{
9 int stat_items = STAT(OBJECTIVE_STATUS);
10 float nb_pb_starttime = STAT(NB_METERSTART);
11
12 mod_active = (stat_items & NB_CARRYING);
13
14 //Manage the progress bar if any
15 if (nb_pb_starttime > 0)
16 {
17 float dt = (time - nb_pb_starttime) % nb_pb_period;
18 // one period of positive triangle
19 float p = 2 * dt / nb_pb_period;
20 if (p > 1)
21 p = 2 - p;
22
24 }
25
26 if (stat_items & NB_CARRYING)
27 drawpic_aspect_skin(pos, "nexball_carrying", eX * mySize.x + eY * mySize.y, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
28}
vector autocvar_hud_progressbar_nexball_color
Definition cl_nexball.qh:3
float nb_pb_period
Definition cl_nexball.qh:7
#define drawpic_aspect_skin(pos, pic, sz, color, theAlpha, drawflag)
Definition draw.qh:78
const float DRAWFLAG_NORMAL
float time
void HUD_Panel_DrawProgressBar(vector theOrigin, vector theSize, string pic, float length_ratio, bool vertical, float baralign, vector theColor, float theAlpha, int drawflag)
Definition hud.qc:269
float autocvar_hud_progressbar_alpha
Definition hud.qh:204
float panel_fg_alpha
Definition hud.qh:169
#define STAT(...)
Definition stats.qh:82
bool mod_active
Definition modicons.qh:7
const int NB_CARRYING
Definition nexball.qh:36
const vector eY
Definition vector.qh:45
const vector eX
Definition vector.qh:44

References autocvar_hud_progressbar_alpha, autocvar_hud_progressbar_nexball_color, DRAWFLAG_NORMAL, drawpic_aspect_skin, eX, eY, HUD_Panel_DrawProgressBar(), mod_active, NB_CARRYING, nb_pb_period, panel_fg_alpha, STAT, time, and vector.

Referenced by NexBall::void().

◆ REGISTER_GAMETYPE()

REGISTER_GAMETYPE ( NEXBALL ,
NEW(NexBall)  )

References NEW, and REGISTER_GAMETYPE.

Variable Documentation

◆ NB_CARRYING

const int NB_CARRYING = BIT(0)

Definition at line 36 of file nexball.qh.

Referenced by HUD_Mod_NexBall(), and nexball_setstatus().