Add a note to zscale and default it to 1 in RadiusDamage 684/head
authorMario <mario@smbclan.net>
Sat, 17 Aug 2019 17:11:13 +0000 (03:11 +1000)
committerMario <mario@smbclan.net>
Sat, 17 Aug 2019 17:11:13 +0000 (03:11 +1000)
qcsrc/server/g_damage.qc

index 00a198a..e14ecd6 100644 (file)
@@ -949,6 +949,8 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in
                                        force = force * (finaldmg / coredamage) * forceintensity;
                                        hitloc = nearest;
 
+                                       // apply special scaling along the z axis if set
+                                       // NOTE: 0 value is not allowed for compatibility, in the case of weapon cvars not being set
                                        if(forcezscale)
                                                force.z *= forcezscale;
 
@@ -1054,7 +1056,7 @@ float RadiusDamageForSource (entity inflictor, vector inflictororigin, vector in
 float RadiusDamage(entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype, .entity weaponentity, entity directhitentity)
 {
        return RadiusDamageForSource(inflictor, (inflictor.origin + (inflictor.mins + inflictor.maxs) * 0.5), inflictor.velocity, attacker, coredamage, edgedamage, rad, 
-                                                                       cantbe, mustbe, false, forceintensity, 0, deathtype, weaponentity, directhitentity);
+                                                                       cantbe, mustbe, false, forceintensity, 1, deathtype, weaponentity, directhitentity);
 }
 
 bool Heal(entity targ, entity inflictor, float amount, float limit)