Xonotic
sv_rocketflying.qc
Go to the documentation of this file.
1 #include "sv_rocketflying.qh"
2 
6 
7 MUTATOR_HOOKFUNCTION(rocketflying, EditProjectile)
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 }
17 
18 MUTATOR_HOOKFUNCTION(rocketflying, AllowRocketJumping)
19 {
20  M_ARGV(0, bool) = true; // force rocket jumping
21 }
22 
23 MUTATOR_HOOKFUNCTION(rocketflying, BuildMutatorsString)
24 {
25  M_ARGV(0, string) = strcat(M_ARGV(0, string), ":RocketFlying");
26 }
27 
28 MUTATOR_HOOKFUNCTION(rocketflying, BuildMutatorsPrettyString)
29 {
30  M_ARGV(0, string) = strcat(M_ARGV(0, string), ", Rocket Flying");
31 }
string autocvar_g_rocket_flying
entity() spawn
bool autocvar_g_rocket_flying_disabledelays
REGISTER_MUTATOR(rocketflying, expr_evaluate(autocvar_g_rocket_flying))
MUTATOR_HOOKFUNCTION(rocketflying, EditProjectile)
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
float time
Definition: csprogsdefs.qc:16
ERASEABLE bool expr_evaluate(string s)
Evaluate an expression of the form: [+ | -]? [var[op]val | [op]var | val | var] ...
Definition: cvar.qh:48