]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 00a198a2032bd8c769cd1cf3066aa4c2b826c49b..e14ecd6ce7808ebeeca7dd436dc1aa4d41db2127 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)