]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_damage.qc
Accuracy stats: also count damage dealt by projectiles hitting the enemy after the...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index a8f365cbc25e811df1b296c629dbbb095e06e2f3..6be1c7deaabdce0f0f441f4ffcad2ce0d218bbe4 100644 (file)
@@ -375,6 +375,8 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype)
                        attacker.taunt_soundtime = time + 1;
                        attacker.killcount = attacker.killcount + 1;
 
+                       attacker.killsound += 1;
+
                        #define SPREE_ITEM(counta,countb,center,normal,gentle) \
                                case counta: \
                                { \
@@ -528,7 +530,7 @@ void Ice_Think(entity this)
        this.nextthink = time;
 }
 
-void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypoint)
+void Freeze (entity targ, float revivespeed, float frozen_type, float show_waypoint)
 {
        if(!IS_PLAYER(targ) && !IS_MONSTER(targ)) // only specified entities can be freezed
                return;
@@ -541,10 +543,11 @@ void Freeze (entity targ, float freeze_time, float frozen_type, float show_waypo
        STAT(FROZEN, targ) = frozen_type;
        targ.revive_progress = ((frozen_type == 3) ? 1 : 0);
        targ.health = ((frozen_type == 3) ? targ_maxhealth : 1);
-       targ.revive_speed = freeze_time;
+       targ.revive_speed = revivespeed;
        if(targ.bot_attack)
                IL_REMOVE(g_bot_targets, targ);
        targ.bot_attack = false;
+       targ.freeze_time = time;
 
        entity ice = new(ice);
        ice.owner = targ;
@@ -616,20 +619,14 @@ void Unfreeze (entity targ)
 
 void Damage (entity targ, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
-       float mirrordamage;
-       float mirrorforce;
        float complainteamdamage = 0;
-       entity attacker_save;
-       mirrordamage = 0;
-       mirrorforce = 0;
+       float mirrordamage = 0;
+       float mirrorforce = 0;
 
        if (game_stopped || targ.killcount == FRAGS_SPECTATOR)
                return;
 
-    damage_targ = targ;
-    damage_inflictor = inflictor;
-    damage_attacker = attacker;
-       attacker_save = attacker;
+       entity attacker_save = attacker;
 
        // special rule: gravity bomb does not hit team mates (other than for disconnecting the hook)
        if(DEATH_ISWEAPON(deathtype, WEP_HOOK) || DEATH_ISWEAPON(deathtype, WEP_TUBA))