]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Clean up old remote jump feature, no longer consumes extra CPU time whenever a rocket...
authorMario <mario@smbclan.net>
Tue, 4 Oct 2016 17:59:55 +0000 (03:59 +1000)
committerMario <mario@smbclan.net>
Tue, 4 Oct 2016 17:59:55 +0000 (03:59 +1000)
bal-wep-mario.cfg
bal-wep-nexuiz25.cfg
bal-wep-overkill.cfg
bal-wep-samual.cfg
bal-wep-xdf.cfg
bal-wep-xonotic.cfg
bal-wep-xpm.cfg
qcsrc/common/weapons/weapon/devastator.qc

index 1470c3326bc1783f662b95e6aeb127771491b04a..2b8bcce9331068f069ec6ea7d5f622ff6543c3fe 100644 (file)
@@ -397,10 +397,11 @@ set g_balance_devastator_reload_ammo 0
 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 450
+set g_balance_devastator_remote_force 300
 set g_balance_devastator_remote_jump_damage 70
-set g_balance_devastator_remote_jump_radius 0
-set g_balance_devastator_remote_jump_velocity_z_add 400
+set g_balance_devastator_remote_jump_force 650
+set g_balance_devastator_remote_jump_radius 100
+set g_balance_devastator_remote_jump_velocity_z_add 0
 set g_balance_devastator_remote_jump_velocity_z_max 1500
 set g_balance_devastator_remote_jump_velocity_z_min 400
 set g_balance_devastator_remote_radius 110
index d4b47594d7061462769246cb79af1a180c4b84d1..41c9081b92d80a0df3b7252dbf1a65fa7c385e83 100644 (file)
@@ -399,6 +399,7 @@ 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_damage 70
+set g_balance_devastator_remote_jump_force 0
 set g_balance_devastator_remote_jump_radius 0
 set g_balance_devastator_remote_jump_velocity_z_add 400
 set g_balance_devastator_remote_jump_velocity_z_max 1500
index 2cf9b754e54197452af132e132b51be209028e8e..82609a76ca5ed4158e0c210b839025792de15e96 100644 (file)
@@ -399,6 +399,7 @@ 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_damage 70
+set g_balance_devastator_remote_jump_force 0
 set g_balance_devastator_remote_jump_radius 0
 set g_balance_devastator_remote_jump_velocity_z_add 400
 set g_balance_devastator_remote_jump_velocity_z_max 1500
index fe3b9ed8711e62bb64ba564310ae573008677f6c..99edec78b8da1c543470adffdd3a155e967f6a5a 100644 (file)
@@ -465,6 +465,7 @@ 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_damage 40
+set g_balance_devastator_remote_jump_force 0
 set g_balance_devastator_remote_jump_radius 200
 set g_balance_devastator_remote_jump_velocity_z_add 500
 set g_balance_devastator_remote_jump_velocity_z_max 1500
index c9bdb2aa367e5b11629c5778825d3c895e4f0539..95ac919b6a9e5d3c5d74e4a92771d47d1c9a5768 100644 (file)
@@ -399,6 +399,7 @@ 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_damage 70
+set g_balance_devastator_remote_jump_force 0
 set g_balance_devastator_remote_jump_radius 0
 set g_balance_devastator_remote_jump_velocity_z_add 400
 set g_balance_devastator_remote_jump_velocity_z_max 1500
index 2578d6fccd009b440c0ecf0b03e1abe037254733..87a00b110cce40ae96ac534b42f640ddf8954d36 100644 (file)
@@ -399,6 +399,7 @@ 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_damage 70
+set g_balance_devastator_remote_jump_force 0
 set g_balance_devastator_remote_jump_radius 0
 set g_balance_devastator_remote_jump_velocity_z_add 400
 set g_balance_devastator_remote_jump_velocity_z_max 1500
index 2578d6fccd009b440c0ecf0b03e1abe037254733..87a00b110cce40ae96ac534b42f640ddf8954d36 100644 (file)
@@ -399,6 +399,7 @@ 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_damage 70
+set g_balance_devastator_remote_jump_force 0
 set g_balance_devastator_remote_jump_radius 0
 set g_balance_devastator_remote_jump_velocity_z_add 400
 set g_balance_devastator_remote_jump_velocity_z_max 1500
index 1fdb8d6ad6773a78cba7a24b428b15c389193357..df9bd470a31b9fe70caaf68cde8a2d4ff6aebf7f 100644 (file)
@@ -40,6 +40,7 @@ CLASS(Devastator, Weapon)
         P(class, prefix, remote_edgedamage, float, NONE) \
         P(class, prefix, remote_force, 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) \
         P(class, prefix, remote_jump_velocity_z_add, float, NONE) \
         P(class, prefix, remote_jump_velocity_z_max, float, NONE) \
@@ -141,50 +142,56 @@ void W_Devastator_DoRemoteExplode(entity this, .entity weaponentity)
        this.event_damage = func_null;
        this.takedamage = DAMAGE_NO;
 
-       float handled_as_rocketjump = false;
+       bool handled_as_rocketjump = false;
+       entity head = NULL;
 
-       entity head = WarpZone_FindRadius(
-               this.origin,
-               WEP_CVAR(devastator, remote_jump_radius),
-               false
-       );
-
-       while(head)
+       if(WEP_CVAR(devastator, remote_jump_radius))
        {
-               if(head.takedamage && (head == this.realowner))
+               head = WarpZone_FindRadius(
+                       this.origin,
+                       WEP_CVAR(devastator, remote_jump_radius),
+                       false
+               );
+
+               while(head)
                {
-                       float distance_to_head = vlen(this.origin - head.WarpZone_findradius_nearest);
-                       if(distance_to_head <= WEP_CVAR(devastator, remote_jump_radius))
+                       if(head.takedamage && (head == this.realowner))
                        {
-                               // we handled this as a rocketjump :)
-                               handled_as_rocketjump = true;
-
-                               // modify velocity
-                               head.velocity_x *= 0.9;
-                               head.velocity_y *= 0.9;
-                               head.velocity_z = bound(
-                                       WEP_CVAR(devastator, remote_jump_velocity_z_min),
-                                       head.velocity.z + WEP_CVAR(devastator, remote_jump_velocity_z_add),
-                                       WEP_CVAR(devastator, remote_jump_velocity_z_max)
-                               );
-
-                               // now do the damage
-                               RadiusDamage(
-                                       this,
-                                       head,
-                                       WEP_CVAR(devastator, remote_jump_damage),
-                                       WEP_CVAR(devastator, remote_jump_damage),
-                                       WEP_CVAR(devastator, remote_jump_radius),
-                                       NULL,
-                                       head,
-                                       0,
-                                       this.projectiledeathtype | HITTYPE_BOUNCE,
-                                       NULL
-                               );
-                               break;
+                               if(vdist(this.origin - head.WarpZone_findradius_nearest, <=, WEP_CVAR(devastator, remote_jump_radius)))
+                               {
+                                       // we handled this as a rocketjump :)
+                                       handled_as_rocketjump = true;
+
+                                       // modify velocity
+                                       if(WEP_CVAR(devastator, remote_jump_velocity_z_add))
+                                       {
+                                               head.velocity_x *= 0.9;
+                                               head.velocity_y *= 0.9;
+                                               head.velocity_z = bound(
+                                                       WEP_CVAR(devastator, remote_jump_velocity_z_min),
+                                                       head.velocity.z + WEP_CVAR(devastator, remote_jump_velocity_z_add),
+                                                       WEP_CVAR(devastator, remote_jump_velocity_z_max)
+                                               );
+                                       }
+
+                                       // now do the damage
+                                       RadiusDamage(
+                                               this,
+                                               head,
+                                               WEP_CVAR(devastator, remote_jump_damage),
+                                               WEP_CVAR(devastator, remote_jump_damage),
+                                               WEP_CVAR(devastator, remote_jump_radius),
+                                               NULL,
+                                               head,
+                                               (WEP_CVAR(devastator, remote_jump_force) ? WEP_CVAR(devastator, remote_jump_force) : 0),
+                                               this.projectiledeathtype | HITTYPE_BOUNCE,
+                                               NULL
+                                       );
+                                       break;
+                               }
                        }
+                       head = head.chain;
                }
-               head = head.chain;
        }
 
        RadiusDamage(