From: Mario Date: Sat, 17 Aug 2019 17:11:13 +0000 (+1000) Subject: Add a note to zscale and default it to 1 in RadiusDamage X-Git-Tag: xonotic-v0.8.5~1388^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F684%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git Add a note to zscale and default it to 1 in RadiusDamage --- diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 00a198a20..e14ecd6ce 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -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)