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

Go to the source code of this file.

Classes

class  SpeedItem
class  SpeedStatusEffect

Functions

void powerup_speed_init (Pickup def, entity item)
 REGISTER_ITEM (Speed, NEW(SpeedItem))
 REGISTER_STATUSEFFECT (Speed, NEW(SpeedStatusEffect))
 SOUND (Speed, Item_Sound("powerup_shield"))

Variables

float autocvar_g_balance_powerup_speed_attack_time_multiplier
float autocvar_g_balance_powerup_speed_highspeed
float autocvar_g_balance_powerup_speed_time
bool autocvar_g_powerups_speed
float speed_finished

Function Documentation

◆ powerup_speed_init()

void powerup_speed_init ( Pickup def,
entity item )

Definition at line 23 of file speed.qh.

24{
26 def.spawnflags |= ITEM_FLAG_MUTATORBLOCKED;
27
28 if(!item.speed_finished)
29 item.speed_finished = (item.count) ? item.count : autocvar_g_balance_powerup_speed_time;
30}
@ ITEM_FLAG_MUTATORBLOCKED
Definition item.qh:121
float autocvar_g_balance_powerup_speed_time
Definition speed.qh:22
bool autocvar_g_powerups_speed
Definition speed.qh:19
int autocvar_g_powerups
Definition sv_powerups.qh:7

References autocvar_g_balance_powerup_speed_time, autocvar_g_powerups, autocvar_g_powerups_speed, entity(), and ITEM_FLAG_MUTATORBLOCKED.

Referenced by SpeedItem::void().

◆ REGISTER_ITEM()

REGISTER_ITEM ( Speed ,
NEW(SpeedItem)  )

References NEW, REGISTER_ITEM, and SPAWNFUNC_ITEM.

◆ REGISTER_STATUSEFFECT()

REGISTER_STATUSEFFECT ( Speed ,
NEW(SpeedStatusEffect)  )

References NEW, and REGISTER_STATUSEFFECT.

◆ SOUND()

SOUND ( Speed ,
Item_Sound("powerup_shield")  )

Variable Documentation

◆ autocvar_g_balance_powerup_speed_attack_time_multiplier

float autocvar_g_balance_powerup_speed_attack_time_multiplier

Definition at line 20 of file speed.qh.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_balance_powerup_speed_highspeed

float autocvar_g_balance_powerup_speed_highspeed

Definition at line 21 of file speed.qh.

Referenced by MUTATOR_HOOKFUNCTION().

◆ autocvar_g_balance_powerup_speed_time

float autocvar_g_balance_powerup_speed_time

Definition at line 22 of file speed.qh.

Referenced by powerup_speed_init(), powerups_DropItem(), and spawnfunc().

◆ autocvar_g_powerups_speed

bool autocvar_g_powerups_speed

Definition at line 19 of file speed.qh.

Referenced by powerup_speed_init().

◆ speed_finished

float speed_finished

Definition at line 17 of file speed.qh.

Referenced by Item_Touch(), and spawnfunc().