Xonotic
sv_rocketflying.qc File Reference
#include "sv_rocketflying.qh"
+ Include dependency graph for sv_rocketflying.qc:

Go to the source code of this file.

Functions

 MUTATOR_HOOKFUNCTION (rocketflying, EditProjectile)
 
 MUTATOR_HOOKFUNCTION (rocketflying, AllowRocketJumping)
 
 MUTATOR_HOOKFUNCTION (rocketflying, BuildMutatorsString)
 
 MUTATOR_HOOKFUNCTION (rocketflying, BuildMutatorsPrettyString)
 
 REGISTER_MUTATOR (rocketflying, expr_evaluate(autocvar_g_rocket_flying))
 

Variables

string autocvar_g_rocket_flying
 
bool autocvar_g_rocket_flying_disabledelays = true
 

Function Documentation

◆ MUTATOR_HOOKFUNCTION() [1/4]

MUTATOR_HOOKFUNCTION ( rocketflying  ,
EditProjectile   
)

Definition at line 7 of file sv_rocketflying.qc.

References autocvar_g_rocket_flying_disabledelays, entity(), M_ARGV, and time.

8 {
9  entity proj = M_ARGV(1, entity);
10 
11  if(autocvar_g_rocket_flying_disabledelays && (proj.classname == "rocket" || proj.classname == "mine"))
12  {
13  // kill detonate delay of rockets
14  proj.spawnshieldtime = time;
15  }
16 }
entity() spawn
bool autocvar_g_rocket_flying_disabledelays
#define M_ARGV(x, type)
Definition: events.qh:17
float time
Definition: csprogsdefs.qc:16
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [2/4]

MUTATOR_HOOKFUNCTION ( rocketflying  ,
AllowRocketJumping   
)

Definition at line 18 of file sv_rocketflying.qc.

References M_ARGV.

19 {
20  M_ARGV(0, bool) = true; // force rocket jumping
21 }
#define M_ARGV(x, type)
Definition: events.qh:17

◆ MUTATOR_HOOKFUNCTION() [3/4]

MUTATOR_HOOKFUNCTION ( rocketflying  ,
BuildMutatorsString   
)

Definition at line 23 of file sv_rocketflying.qc.

References M_ARGV, and strcat().

24 {
25  M_ARGV(0, string) = strcat(M_ARGV(0, string), ":RocketFlying");
26 }
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
#define M_ARGV(x, type)
Definition: events.qh:17
+ Here is the call graph for this function:

◆ MUTATOR_HOOKFUNCTION() [4/4]

MUTATOR_HOOKFUNCTION ( rocketflying  ,
BuildMutatorsPrettyString   
)

Definition at line 28 of file sv_rocketflying.qc.

References M_ARGV, and strcat().

29 {
30  M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Rocket Flying");
31 }
spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 spree_cen s1 f1 s1 strcat(_("Level %s: "), "^BG%s\3\, _("^BGPress ^F2%s^BG to enter the game"))
#define M_ARGV(x, type)
Definition: events.qh:17
+ Here is the call graph for this function:

◆ REGISTER_MUTATOR()

REGISTER_MUTATOR ( rocketflying  ,
expr_evaluate(autocvar_g_rocket_flying  
)

Variable Documentation

◆ autocvar_g_rocket_flying

string autocvar_g_rocket_flying

Definition at line 3 of file sv_rocketflying.qc.

◆ autocvar_g_rocket_flying_disabledelays

bool autocvar_g_rocket_flying_disabledelays = true

Definition at line 4 of file sv_rocketflying.qc.

Referenced by MUTATOR_HOOKFUNCTION().