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

Go to the source code of this file.

Functions

void counter_reset (entity this)
 STATIC_INIT (g_counters)

Variables

float counter_cnt
const int COUNTER_FIRE_AT_COUNT = BIT(2)
const int COUNTER_PER_PLAYER = BIT(3)
IntrusiveList g_counters

Function Documentation

◆ counter_reset()

void counter_reset ( entity this)

Definition at line 66 of file counter.qc.

67{
68 setthink(this, func_null);
69 this.nextthink = 0;
70 this.counter_cnt = 0;
71 this.active = ACTIVE_ACTIVE;
72
73 // remove any per-player counters
74 IL_EACH(g_counters, it.owner == this,
75 {
76 delete(it);
77 });
78}
float counter_cnt
Definition counter.qh:6
IntrusiveList g_counters
Definition counter.qh:8
float nextthink
int active
Definition defs.qh:34
const int ACTIVE_ACTIVE
Definition defs.qh:37
#define IL_EACH(this, cond, body)
var void func_null()
#define setthink(e, f)

References active, ACTIVE_ACTIVE, counter_cnt, entity(), func_null(), g_counters, IL_EACH, nextthink, and setthink.

Referenced by counter_use(), and spawnfunc().

◆ STATIC_INIT()

STATIC_INIT ( g_counters )

Definition at line 9 of file counter.qh.

9{ g_counters = IL_NEW(); }
#define IL_NEW()

References g_counters, and IL_NEW.

Variable Documentation

◆ counter_cnt

float counter_cnt

Definition at line 6 of file counter.qh.

Referenced by counter_reset(), PutPlayerInServer(), and spawnfunc().

◆ COUNTER_FIRE_AT_COUNT

const int COUNTER_FIRE_AT_COUNT = BIT(2)

Definition at line 12 of file counter.qh.

Referenced by counter_use().

◆ COUNTER_PER_PLAYER

const int COUNTER_PER_PLAYER = BIT(3)

Definition at line 13 of file counter.qh.

Referenced by counter_use().

◆ g_counters

IntrusiveList g_counters