Xonotic
sv_domination.qh File Reference
+ Include dependency graph for sv_domination.qh:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define autocvar_g_domination_point_limit   cvar("g_domination_point_limit")
 

Functions

void AnimateDomPoint (entity this)
 
void dom_Initialize ()
 
 REGISTER_MUTATOR (dom, false)
 

Variables

int autocvar_g_domination_point_leadlimit
 
bool autocvar_g_domination_roundbased
 
int autocvar_g_domination_roundbased_point_limit
 
float captime
 
float domination_roundbased
 
float domination_teams
 
float enemy_playerid
 
IntrusiveList g_dompoints
 
float pps_blue
 
float pps_pink
 
float pps_red
 
float pps_yellow
 
entity sprite
 
const float ST_DOM_CAPS = 1
 
const float ST_DOM_TICKS = 1
 
float total_pps
 

Macro Definition Documentation

◆ autocvar_g_domination_point_limit

#define autocvar_g_domination_point_limit   cvar("g_domination_point_limit")

Definition at line 4 of file sv_domination.qh.

Referenced by REGISTER_MUTATOR().

Function Documentation

◆ AnimateDomPoint()

void AnimateDomPoint ( entity  this)

Definition at line 140 of file sv_domination.qc.

References frame, nextthink, pain_finished, t_length, t_width, and time.

Referenced by dompointthink().

141 {
142  if(this.pain_finished > time)
143  return;
144  this.pain_finished = time + this.t_width;
145  if(this.nextthink > this.pain_finished)
146  this.nextthink = this.pain_finished;
147 
148  this.frame = this.frame + 1;
149  if(this.frame > this.t_length)
150  this.frame = 0;
151 }
float nextthink
Definition: csprogsdefs.qc:121
float t_width
Definition: subs.qh:33
float pain_finished
float frame
primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4)
Definition: anim.qh:6
float t_length
Definition: subs.qh:33
float time
Definition: csprogsdefs.qc:16
+ Here is the caller graph for this function:

◆ dom_Initialize()

void dom_Initialize ( )

Definition at line 637 of file sv_domination.qc.

References dom_DelayedInit(), g_domination, g_dompoints, IL_NEW, InitializeEntity(), and NULL.

Referenced by REGISTER_MUTATOR().

638 {
639  g_domination = true;
640  g_dompoints = IL_NEW();
641 
642  InitializeEntity(NULL, dom_DelayedInit, INITPRIO_GAMETYPE);
643 }
IntrusiveList g_dompoints
Definition: sv_domination.qh:9
#define IL_NEW()
bool g_domination
#define NULL
Definition: post.qh:17
void InitializeEntity(entity e, void(entity this) func, int order)
Definition: world.qc:2146
void dom_DelayedInit(entity this)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ REGISTER_MUTATOR()

REGISTER_MUTATOR ( dom  ,
false   
)

Definition at line 12 of file sv_domination.qh.

References autocvar_g_domination_point_leadlimit, autocvar_g_domination_point_limit, autocvar_g_domination_roundbased, autocvar_g_domination_roundbased_point_limit, dom_Initialize(), GameRules_limit_lead(), GameRules_limit_score(), GameRules_teams(), MUTATOR_ONADD, and MUTATOR_STATIC.

13 {
16  {
17  int fraglimit_override = autocvar_g_domination_point_limit;
20 
21  GameRules_teams(true);
22  GameRules_limit_score(fraglimit_override);
24 
26  }
27  return 0;
28 }
#define MUTATOR_STATIC()
Definition: base.qh:288
bool autocvar_g_domination_roundbased
Definition: sv_domination.qh:5
int autocvar_g_domination_point_leadlimit
Definition: sv_domination.qh:7
void GameRules_limit_score(int limit)
Definition: sv_rules.qc:34
int autocvar_g_domination_roundbased_point_limit
Definition: sv_domination.qh:6
void GameRules_teams(bool value)
Definition: sv_rules.qc:6
void GameRules_limit_lead(int limit)
Definition: sv_rules.qc:44
void dom_Initialize()
#define MUTATOR_ONADD
Definition: base.qh:284
#define autocvar_g_domination_point_limit
Definition: sv_domination.qh:4
+ Here is the call graph for this function:

Variable Documentation

◆ autocvar_g_domination_point_leadlimit

int autocvar_g_domination_point_leadlimit

Definition at line 7 of file sv_domination.qh.

Referenced by REGISTER_MUTATOR().

◆ autocvar_g_domination_roundbased

bool autocvar_g_domination_roundbased

Definition at line 5 of file sv_domination.qh.

Referenced by dom_DelayedInit(), and REGISTER_MUTATOR().

◆ autocvar_g_domination_roundbased_point_limit

int autocvar_g_domination_roundbased_point_limit

Definition at line 6 of file sv_domination.qh.

Referenced by REGISTER_MUTATOR().

◆ captime

float captime

Definition at line 44 of file sv_domination.qh.

Referenced by dompoint_captured(), and dompointtouch().

◆ domination_roundbased

float domination_roundbased

◆ domination_teams

float domination_teams

Definition at line 48 of file sv_domination.qh.

Referenced by dom_DelayedInit(), MUTATOR_HOOKFUNCTION(), and set_dom_state().

◆ enemy_playerid

float enemy_playerid

Definition at line 42 of file sv_domination.qh.

Referenced by dompointtouch().

◆ g_dompoints

◆ pps_blue

float pps_blue

Definition at line 37 of file sv_domination.qh.

Referenced by dompoint_captured(), MUTATOR_HOOKFUNCTION(), and set_dom_state().

◆ pps_pink

float pps_pink

Definition at line 39 of file sv_domination.qh.

Referenced by dompoint_captured(), MUTATOR_HOOKFUNCTION(), and set_dom_state().

◆ pps_red

float pps_red

Definition at line 36 of file sv_domination.qh.

Referenced by dompoint_captured(), MUTATOR_HOOKFUNCTION(), and set_dom_state().

◆ pps_yellow

float pps_yellow

Definition at line 38 of file sv_domination.qh.

Referenced by dompoint_captured(), MUTATOR_HOOKFUNCTION(), and set_dom_state().

◆ sprite

entity sprite

Definition at line 43 of file sv_domination.qh.

◆ ST_DOM_CAPS

const float ST_DOM_CAPS = 1

Definition at line 32 of file sv_domination.qh.

Referenced by Domination_CheckWinner(), and ScoreRules_dom().

◆ ST_DOM_TICKS

const float ST_DOM_TICKS = 1

Definition at line 31 of file sv_domination.qh.

Referenced by dompointthink(), and ScoreRules_dom().

◆ total_pps