]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/player.qc
Merge branch 'DefaultUser/more_damagetext' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / player.qc
index 7dfcf4c3f7696fa97d4cb306f14de49c327c3d93..904447c218418c936f5f933cce7cf13062813c61 100644 (file)
@@ -128,6 +128,8 @@ void CopyBody(entity this, float keepvelocity)
        animdecide_load_if_needed(clone);
        animdecide_setframes(clone, false, frame, frame1time, frame2, frame2time);
 
+       IL_PUSH(g_clones, clone);
+
        MUTATOR_CALLHOOK(CopyBody, this, clone, keepvelocity);
 }
 
@@ -507,9 +509,9 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage,
        {
                WeaponStats_LogDamage(awep.m_id, abot, PS(this).m_weapon.m_id, vbot, dh + da);
        }
-       if (dh + da)
+       if (damage)
        {
-               MUTATOR_CALLHOOK(PlayerDamaged, attacker, this, dh, da, hitloc, deathtype);
+               MUTATOR_CALLHOOK(PlayerDamaged, attacker, this, dh, da, hitloc, deathtype, damage);
        }
 
        if (this.health < 1)
@@ -557,9 +559,8 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage,
 
         // increment frag counter for used weapon type
         Weapon w = DEATH_WEAPONOF(deathtype);
-        if(w != WEP_Null)
-       if(accuracy_isgooddamage(attacker, this))
-        attacker.accuracy.(accuracy_frags[w.m_id-1]) += 1;
+               if(w != WEP_Null && accuracy_isgooddamage(attacker, this))
+                       attacker.accuracy.(accuracy_frags[w.m_id-1]) += 1;
 
                MUTATOR_CALLHOOK(PlayerDies, inflictor, attacker, this, deathtype, damage);
                excess = M_ARGV(4, float);
@@ -687,7 +688,7 @@ void dedicated_print(string input)
  */
 int Say(entity source, int teamsay, entity privatesay, string msgin, bool floodcontrol)
 {
-       if (!teamsay && !privatesay) if (substring(msgin, 0, 1) == " ")
+       if (!teamsay && !privatesay && substring(msgin, 0, 1) == " ")
         msgin = substring(msgin, 1, -1); // work around DP say bug (say_team does not have this!)
 
        msgin = formatmessage(source, msgin);