]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_damage.qc
Merge branch 'master' into TimePath/issues/1490
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index e9ec417412ce9355d8ef2280880547251517a47d..f8e6cc00f9dd9d838d714bf020a1ab9cca909feb 100644 (file)
@@ -147,10 +147,7 @@ void GiveFrags (entity attacker, entity targ, float f, int deathtype)
        entity oldself;
        oldself = self;
        self = attacker;
-       frag_attacker = attacker;
-       frag_target = targ;
-       frag_score = f;
-       if(MUTATOR_CALLHOOK(GiveFragsForKill))
+       if(MUTATOR_CALLHOOK(GiveFragsForKill, attacker, targ, f))
        {
                f = frag_score;
                self = oldself;
@@ -749,13 +746,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
                }
 
                // should this be changed at all? If so, in what way?
-               frag_attacker = attacker;
-               frag_target = targ;
-               frag_damage = damage;
-               frag_force = force;
-               frag_deathtype = deathtype;
-               frag_mirrordamage = mirrordamage;
-               MUTATOR_CALLHOOK(PlayerDamage_Calculate);
+               MUTATOR_CALLHOOK(PlayerDamage_Calculate, attacker, targ, deathtype, damage, mirrordamage, force);
                damage = frag_damage;
                mirrordamage = frag_mirrordamage;
                force = frag_force;
@@ -769,7 +760,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
                        {
                                Unfreeze(targ);
                                targ.health = autocvar_g_freezetag_revive_falldamage_health;
-                               pointparticles(particleeffectnum("iceorglass"), targ.origin, '0 0 0', 3);
+                               Send_Effect("iceorglass", targ.origin, '0 0 0', 3);
                                Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_FREEZETAG_REVIVED_FALL, targ.netname);
                                Send_Notification(NOTIF_ONE, targ, MSG_CENTER, CENTER_FREEZETAG_REVIVE_SELF);
                        }
@@ -780,7 +771,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
 
                if(targ.frozen && deathtype == DEATH_HURTTRIGGER && !autocvar_g_freezetag_frozen_damage_trigger)
                {
-                       pointparticles(particleeffectnum("teleport"), targ.origin, '0 0 0', 1);
+                       Send_Effect("teleport", targ.origin, '0 0 0', 1);
 
                        entity oldself = self;
                        self = targ;
@@ -810,7 +801,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, int d
                                self.oldorigin = self.origin;
                                self.prevorigin = self.origin;
 
-                               pointparticles(particleeffectnum("teleport"), self.origin, '0 0 0', 1);
+                               Send_Effect("teleport", self.origin, '0 0 0', 1);
                        }
 
                        self = oldself;