]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_player.qc
Merge branch 'master' into Mario/entcs
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_player.qc
index 098a176c8cc1919eb8a2bfedaef7394cbc12a2e4..b6c258b046e49fb04d0f76f0272720cc246d1f74 100644 (file)
@@ -1,6 +1,6 @@
 #include "cl_player.qh"
 
-#include "bot/bot.qh"
+#include "bot/api.qh"
 #include "cheats.qh"
 #include "g_damage.qh"
 #include "g_subs.qh"
@@ -125,6 +125,8 @@ void CopyBody(entity this, float keepvelocity)
        // "bake" the current animation frame for clones (they don't get clientside animation)
        animdecide_load_if_needed(clone);
        animdecide_setframes(clone, false, frame, frame1time, frame2, frame2time);
+
+       MUTATOR_CALLHOOK(CopyBody, this, clone, keepvelocity);
 }
 
 void player_setupanimsformodel(entity this)
@@ -532,7 +534,7 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage,
                // get rid of kill indicator
                if(this.killindicator)
                {
-                       remove(this.killindicator);
+                       delete(this.killindicator);
                        this.killindicator = NULL;
                        if(this.killindicator_teamchange)
                                defer_ClientKill_Now_TeamChange = true;
@@ -559,7 +561,13 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage,
                excess = M_ARGV(4, float);
 
                Weapon wep = PS(this).m_weapon;
-               wep.wr_playerdeath(wep, this);
+               /*for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+               {
+                       .entity weaponentity = weaponentities[slot];
+                       wep.wr_playerdeath(wep, this, weaponentity);
+               }*/
+               .entity weaponentity = weaponentities[0]; // TODO: unhardcode
+               wep.wr_playerdeath(wep, this, weaponentity);
 
                RemoveGrapplingHook(this);