Add g_balance_devastator_remote_jump as a controller cvar for rocket flying, force...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / rocketflying / sv_rocketflying.qc
index d3c1922..58e2056 100644 (file)
@@ -1,19 +1,25 @@
 #include "sv_rocketflying.qh"
 
 string autocvar_g_rocket_flying;
+bool autocvar_g_rocket_flying_disabledelays = true;
 REGISTER_MUTATOR(rocketflying, expr_evaluate(autocvar_g_rocket_flying));
 
 MUTATOR_HOOKFUNCTION(rocketflying, EditProjectile)
 {
        entity proj = M_ARGV(1, entity);
 
-       if(proj.classname == "rocket" || proj.classname == "mine")
+       if(autocvar_g_rocket_flying_disabledelays && (proj.classname == "rocket" || proj.classname == "mine"))
        {
                // kill detonate delay of rockets
                proj.spawnshieldtime = time;
        }
 }
 
+MUTATOR_HOOKFUNCTION(rocketflying, AllowRocketJumping)
+{
+       M_ARGV(0, bool) = true; // force rocket jumping
+}
+
 MUTATOR_HOOKFUNCTION(rocketflying, BuildMutatorsString)
 {
        M_ARGV(0, string) = strcat(M_ARGV(0, string), ":RocketFlying");