]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_damage.qc
Make sure a vote is actually running before trying to count it when a client leaves
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_damage.qc
index f064e152b409dc55d0224fd3c6532faea0d102d6..23897720e3ecf75492058975180c5a4643cd0626 100644 (file)
@@ -163,6 +163,9 @@ void Obituary_SpecialDeath(
                entity deathent = Deathtypes_from(deathtype - DT_FIRST);
                if (!deathent) { backtrace("Obituary_SpecialDeath: Could not find deathtype entity!\n"); return; }
 
+               if(g_cts && deathtype == DEATH_KILL.m_id)
+                       return; // TODO: somehow put this in CTS gamemode file!
+
                if(murder)
                {
                        if(deathent.death_msgmurder)
@@ -259,7 +262,7 @@ float Obituary_WeaponDeath(
 }
 
 .int buffs = _STAT(BUFFS); // TODO: remove
-
+entity buff_FirstFromFlags(int _buffs);
 void Obituary(entity attacker, entity inflictor, entity targ, int deathtype)
 {
        // Sanity check
@@ -430,9 +433,9 @@ void Obituary(entity attacker, entity inflictor, entity targ, int deathtype)
                                );
                        }
 
-                       float f3 = 0;
+                       int f3 = 0;
                        if(deathtype == DEATH_BUFF.m_id)
-                               f3 = attacker.buffs;
+                               f3 = buff_FirstFromFlags(attacker.buffs).m_id;
 
                        if (!Obituary_WeaponDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker))
                                Obituary_SpecialDeath(targ, true, deathtype, targ.netname, attacker.netname, deathlocation, targ.killcount, kill_count_to_attacker, f3);