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

Go to the source code of this file.

Functions

void powerups_DropItem_Think (entity this)
 REGISTER_MUTATOR (powerups, true)

Variables

int autocvar_g_powerups
int autocvar_g_powerups_drop
int autocvar_g_powerups_drop_ondeath
bool autocvar_g_powerups_stack
float count
float prevstrengthsound
float prevstrengthsoundattempt

Function Documentation

◆ powerups_DropItem_Think()

void powerups_DropItem_Think ( entity this)

Definition at line 80 of file sv_powerups.qc.

81{
82 // if there is no armor it means the timer of the powerup is running
84 {
85 float timeleft = floor(this.wait - time);
86 if (timeleft)
88 else
90 }
91}
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
float wait
Definition items.qc:17
float time
RES_ARMOR
Definition ent_cs.qc:130
float floor(float f)
void WaypointSprite_Kill(entity wp)
void WaypointSprite_UpdateHealth(entity e, float f)
entity waypointsprite_attached

References entity(), floor(), GetResource(), RES_ARMOR, time, wait, waypointsprite_attached, WaypointSprite_Kill(), and WaypointSprite_UpdateHealth().

Referenced by Item_Think().

◆ REGISTER_MUTATOR()

REGISTER_MUTATOR ( powerups ,
true  )

Variable Documentation

◆ autocvar_g_powerups

◆ autocvar_g_powerups_drop

int autocvar_g_powerups_drop

Definition at line 8 of file sv_powerups.qh.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_powerups_drop_ondeath

int autocvar_g_powerups_drop_ondeath

Definition at line 9 of file sv_powerups.qh.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_powerups_stack

bool autocvar_g_powerups_stack

Definition at line 10 of file sv_powerups.qh.

Referenced by Item_GiveTo().

◆ count

float count

Definition at line 20 of file sv_powerups.qh.

◆ prevstrengthsound

float prevstrengthsound

Definition at line 14 of file sv_powerups.qh.

◆ prevstrengthsoundattempt

float prevstrengthsoundattempt

Definition at line 15 of file sv_powerups.qh.