]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/instagib/instagib.qc
Merge branch 'master' into Mario/hagar_notfixed
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / instagib / instagib.qc
index 640e3d5b61cdd83ecc2505b9115cbc9773be3e80..f8f2e5a7dfb41ec821f611b8f8573a784e97d01c 100644 (file)
@@ -52,7 +52,7 @@ void instagib_stop_countdown(entity e)
 {
        if (!e.instagib_needammo)
                return;
-       Kill_Notification(NOTIF_ONE_ONLY, e, MSG_CENTER_CPID, CPID_INSTAGIB_FINDAMMO);
+       Kill_Notification(NOTIF_ONE_ONLY, e, MSG_CENTER, CPID_INSTAGIB_FINDAMMO);
        e.instagib_needammo = false;
 }
 void instagib_ammocheck()
@@ -198,7 +198,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerPowerups)
 
        if (self.items & ITEM_Invisibility.m_itemid)
        {
-               play_countdown(self.strength_finished, SND(POWEROFF));
+               play_countdown(self.strength_finished, SND_POWEROFF);
                if (time > self.strength_finished)
                {
                        self.alpha = default_player_alpha;
@@ -221,7 +221,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerPowerups)
 
        if (self.items & ITEM_Speed.m_itemid)
        {
-               play_countdown(self.invincible_finished, SND(POWEROFF));
+               play_countdown(self.invincible_finished, SND_POWEROFF);
                if (time > self.invincible_finished)
                {
                        self.items &= ~ITEM_Speed.m_itemid;
@@ -293,7 +293,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDamage_Calculate)
                                frag_target.armorvalue -= 1;
                                frag_damage = 0;
                                frag_target.damage_dealt += 1;
-                               frag_attacker.damage_dealt += 1; // TODO: change this to a specific hitsound for armor hit
+                               frag_attacker.damage_dealt += 1;
                                Send_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CENTER_INSTAGIB_LIVES_REMAINING, frag_target.armorvalue);
                        }
                }
@@ -302,7 +302,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDamage_Calculate)
                {
                        if(frag_deathtype & HITTYPE_SECONDARY)
                        {
-                               if(!autocvar_g_instagib_blaster_keepdamage)
+                               if(!autocvar_g_instagib_blaster_keepdamage || frag_attacker == frag_target)
                                        frag_damage = frag_mirrordamage = 0;
 
                                if(frag_target != frag_attacker)
@@ -371,7 +371,7 @@ MUTATOR_HOOKFUNCTION(mutator_instagib, FilterItem)
         e.cnt = self.cnt;
         e.team = self.team;
         e.spawnfunc_checked = true;
-               WITH(entity, self, e, spawnfunc_item_minst_cells(e));
+               WITHSELF(e, spawnfunc_item_minst_cells(e));
                return true;
        }