]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add g_balance_devastator_remote_jump as a controller cvar for rocket flying, force...
authorMario <mario@smbclan.net>
Sat, 7 Sep 2019 08:55:57 +0000 (18:55 +1000)
committerMario <mario@smbclan.net>
Sat, 7 Sep 2019 08:55:57 +0000 (18:55 +1000)
13 files changed:
bal-wep-mario.cfg
bal-wep-nexuiz25.cfg
bal-wep-samual.cfg
bal-wep-testing.cfg
bal-wep-testingxpm.cfg
bal-wep-xdf.cfg
bal-wep-xonotic.cfg
bal-wep-xpm.cfg
mutators.cfg
qcsrc/common/mutators/mutator/rocketflying/sv_rocketflying.qc
qcsrc/common/weapons/weapon/devastator.qc
qcsrc/common/weapons/weapon/devastator.qh
qcsrc/server/mutators/events.qh

index d579cb2e879ea70739048cded99033cec199ceec..3b2a3a88098856d2311f3064324b0bec3f15b396 100644 (file)
@@ -401,6 +401,7 @@ set g_balance_devastator_reload_time 2
 set g_balance_devastator_remote_damage 70
 set g_balance_devastator_remote_edgedamage 35
 set g_balance_devastator_remote_force 300
+set g_balance_devastator_remote_jump 0
 set g_balance_devastator_remote_jump_damage 70
 set g_balance_devastator_remote_jump_force 450
 set g_balance_devastator_remote_jump_radius 100
index eacfe27c74bbb17294fc8c3778c3e01a6128f3c8..16544fa76fb0e1144cd5bc609b40126c70ac14e3 100644 (file)
@@ -401,6 +401,7 @@ set g_balance_devastator_reload_time 2
 set g_balance_devastator_remote_damage 105
 set g_balance_devastator_remote_edgedamage 40
 set g_balance_devastator_remote_force 600
+set g_balance_devastator_remote_jump 0
 set g_balance_devastator_remote_jump_damage 70
 set g_balance_devastator_remote_jump_force 0
 set g_balance_devastator_remote_jump_radius 0
index 4591267a8c457267737b3b342bf1f81bc9741645..e32b54ff4b17e3851896ec7a40839484b1be136c 100644 (file)
@@ -401,6 +401,7 @@ set g_balance_devastator_reload_time 2
 set g_balance_devastator_remote_damage 70
 set g_balance_devastator_remote_edgedamage 35
 set g_balance_devastator_remote_force 400
+set g_balance_devastator_remote_jump 0
 set g_balance_devastator_remote_jump_damage 40
 set g_balance_devastator_remote_jump_force 0
 set g_balance_devastator_remote_jump_radius 200
index 983ff060482adfc1a1c7859efc6b0727d0de18f3..e3dd685961f3450944459d3585ef5279a2dceb15 100644 (file)
@@ -401,6 +401,7 @@ set g_balance_devastator_reload_time 2
 set g_balance_devastator_remote_damage 70
 set g_balance_devastator_remote_edgedamage 35
 set g_balance_devastator_remote_force 300
+set g_balance_devastator_remote_jump 0
 set g_balance_devastator_remote_jump_damage 70
 set g_balance_devastator_remote_jump_force 450
 set g_balance_devastator_remote_jump_radius 100
index d7ffcb5c5a179737dfbba8f4edcf47f3bed986b0..d56926fa5289f625a90f01142090c9f90cd591de 100644 (file)
@@ -401,6 +401,7 @@ set g_balance_devastator_reload_time 2
 set g_balance_devastator_remote_damage 70
 set g_balance_devastator_remote_edgedamage 35
 set g_balance_devastator_remote_force 300
+set g_balance_devastator_remote_jump 0
 set g_balance_devastator_remote_jump_damage 70
 set g_balance_devastator_remote_jump_force 450
 set g_balance_devastator_remote_jump_radius 100
index 0043c7e4b0317c708012284e8ac02c9323c915c1..a3f36a85fb01bec8785b3fa4f442cd4784c4ad1e 100644 (file)
@@ -401,6 +401,7 @@ set g_balance_devastator_reload_time 2
 set g_balance_devastator_remote_damage 70
 set g_balance_devastator_remote_edgedamage 35
 set g_balance_devastator_remote_force 350
+set g_balance_devastator_remote_jump 0
 set g_balance_devastator_remote_jump_damage 70
 set g_balance_devastator_remote_jump_force 450
 set g_balance_devastator_remote_jump_radius 0
index b7de169b30ef98f6b16a7d755fef89213db5b4d8..dcdd07c4ba0dba57306fa086586c9c14828b36f1 100644 (file)
@@ -401,6 +401,7 @@ set g_balance_devastator_reload_time 2
 set g_balance_devastator_remote_damage 70
 set g_balance_devastator_remote_edgedamage 35
 set g_balance_devastator_remote_force 300
+set g_balance_devastator_remote_jump 0
 set g_balance_devastator_remote_jump_damage 70
 set g_balance_devastator_remote_jump_force 450
 set g_balance_devastator_remote_jump_radius 0
index 5117bc2accd3c278790adf8a80b094c899d67af4..4a57f2e4c97e2f4e99d95a57bf839d9c5f55b059 100644 (file)
@@ -401,6 +401,7 @@ set g_balance_devastator_reload_time 2
 set g_balance_devastator_remote_damage 70
 set g_balance_devastator_remote_edgedamage 35
 set g_balance_devastator_remote_force 300
+set g_balance_devastator_remote_jump 0
 set g_balance_devastator_remote_jump_damage 70
 set g_balance_devastator_remote_jump_force 450
 set g_balance_devastator_remote_jump_radius 0
index f49b8a7c422396c8e8c29dac38a823e9f7cd92d8..b4b6eeb83fbaeb5826c5282fbad450e7f8b170da 100644 (file)
@@ -111,6 +111,7 @@ set g_invincible_projectiles 0 "set to 1 to disable any damage to projectiles in
 //  rocket flying
 // ===============
 set g_rocket_flying 0 "set to 1 to enable rocket flying in all balance configs"
+set g_rocket_flying_disabledelays 1 "disable detonation delays on rockets and mines"
 
 
 // =====================
index d3c1922b997c9437ab82ba9f9c27603d1ed14e1f..58e20568eddf02d9d1ddd90616af3890d2e9ceb8 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");
index 5654488ddb065d4e9aeb49b8f95cda1889de2132..a77136b397f874bdd56f1b615125cc8d4f43f415 100644 (file)
@@ -71,8 +71,11 @@ void W_Devastator_DoRemoteExplode(entity this, .entity weaponentity)
 
        bool handled_as_rocketjump = false;
        entity head = NULL;
+       bool allow_rocketjump = WEP_CVAR(devastator, remote_jump);
+       MUTATOR_CALLHOOK(AllowRocketJumping, allow_rocketjump);
+       allow_rocketjump = M_ARGV(0, bool);
 
-       if(WEP_CVAR(devastator, remote_jump_radius))
+       if(allow_rocketjump && WEP_CVAR(devastator, remote_jump_radius))
        {
                head = WarpZone_FindRadius(
                        this.origin,
index 33814a5e1e0c3c3cda5b384e3fb272e08ee4d3e7..679f75499a3dfd1f4abaf82c64dfb19f4ea276ed 100644 (file)
@@ -40,6 +40,7 @@ CLASS(Devastator, Weapon)
         P(class, prefix, remote_damage, float, NONE) \
         P(class, prefix, remote_edgedamage, float, NONE) \
         P(class, prefix, remote_force, float, NONE) \
+        P(class, prefix, remote_jump, float, NONE) \
         P(class, prefix, remote_jump_damage, float, NONE) \
         P(class, prefix, remote_jump_force, float, NONE) \
         P(class, prefix, remote_jump_radius, float, NONE) \
index 1ca629078e4a99d27076c5292e1aade918bf5996..a310c6ccadb294c25aad77a6f3900cbb1a96a19a 100644 (file)
@@ -1231,3 +1231,10 @@ MUTATOR_HOOKABLE(GetPlayerLimit, EV_GetPlayerLimit);
     /**/                  o(string, MUTATOR_ARGV_1_string) \
     /**/
 MUTATOR_HOOKABLE(LogDeath_AppendItemCodes, EV_LogDeath_AppendItemCodes);
+
+/** Allows disabling or enabling rocket jumping independently of balance, use the parameter to force a preferred setting */
+#define EV_AllowRocketJumping(i, o) \
+    /** allow_rocketjump */         i(bool, MUTATOR_ARGV_0_bool) \
+    /**/                            o(bool, MUTATOR_ARGV_0_bool) \
+    /**/
+MUTATOR_HOOKABLE(AllowRocketJumping, EV_AllowRocketJumping);