]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Send an ent_DamageInfo for each player in the radius of a splash damage blast. This...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 4 Jan 2012 14:05:17 +0000 (16:05 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 4 Jan 2012 14:05:17 +0000 (16:05 +0200)
qcsrc/server/g_damage.qc

index ad3332adf6a42806eb4e6a64c825ed4657535286..c38ba28a650387447f71c374cdd184007ed6258a 100644 (file)
@@ -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;