]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Give kill credit to the monster's owner if they're a player
authorMario <mario.mario@y7mail.com>
Thu, 5 Sep 2024 10:36:48 +0000 (20:36 +1000)
committerMario <mario.mario@y7mail.com>
Thu, 5 Sep 2024 10:36:48 +0000 (20:36 +1000)
qcsrc/server/player.qc

index da2c48ded9b295bf640f309d0dfe9b6c87f7369e..060f68541ecc4dd23efff50b1ac6e8a8715a90d4 100644 (file)
@@ -309,6 +309,11 @@ void PlayerDamage(entity this, entity inflictor, entity attacker, float damage,
                attacker = this.pusher;
                this.pushltime = max(this.pushltime, time + 0.6);
        }
+       else if(IS_MONSTER(attacker) && IS_PLAYER(attacker.realowner))
+       {
+               attacker = attacker.realowner;
+               this.istypefrag = 0;
+       }
        else
        {
                this.pushltime = 0;