From: Mircea Kitsune Date: Wed, 4 Jan 2012 14:05:17 +0000 (+0200) Subject: Send an ent_DamageInfo for each player in the radius of a splash damage blast. This... X-Git-Tag: xonotic-v0.6.0~110^2^2~79 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=fc077331241296eb409563333bb0b60d76241a18;p=xonotic%2Fxonotic-data.pk3dir.git Send an ent_DamageInfo for each player in the radius of a splash damage blast. This should allow damage effects to work again, but will currently cause effects to show at the origin of each player too (eg: A rocket hitting the ground will also cause explosions to show on all players who are damaged). Do we want this? --- diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index ad3332adf..c38ba28a6 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -1011,6 +1011,20 @@ float RadiusDamage (entity inflictor, entity attacker, float coredamage, float e if (targ != inflictor) if (ignore != targ) if(targ.takedamage) { + if(deathtype != (WEP_HOOK | HITTYPE_SECONDARY | HITTYPE_BOUNCE)) // only send gravity bomb damage once + if(DEATH_WEAPONOF(deathtype) != WEP_TUBA) // do not send tuba damage (bandwidth hog) + { + force = inflictor.velocity; + if(vlen(force) == 0) + force = '0 0 -1'; + else + force = normalize(force); + if(forceintensity >= 0) + Damage_DamageInfo(targ.origin, coredamage, edgedamage, rad, forceintensity * force, deathtype, targ.species, attacker); + else + Damage_DamageInfo(targ.origin, coredamage, edgedamage, -rad, (-forceintensity) * force, deathtype, targ.species, attacker); + } + // LordHavoc: measure distance to nearest point on target (not origin) // (this guarentees 100% damage on a touch impact) nearest = targ.WarpZone_findradius_nearest;