X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmutators%2Fmutator%2Finstagib%2Finstagib.qc;h=f8f2e5a7dfb41ec821f611b8f8573a784e97d01c;hb=3cfb64730d883ae9ccf0315f365da19345270890;hp=947fcec122db584953dbaca3a28e2006a4918a9d;hpb=6ba37d06b4afe2b08882f5cc5b211441227586b2;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mutators/mutator/instagib/instagib.qc b/qcsrc/common/mutators/mutator/instagib/instagib.qc index 947fcec12..f8f2e5a7d 100644 --- a/qcsrc/common/mutators/mutator/instagib/instagib.qc +++ b/qcsrc/common/mutators/mutator/instagib/instagib.qc @@ -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() @@ -62,7 +62,7 @@ void instagib_ammocheck() if(!IS_PLAYER(self)) return; // not a player - if(self.deadflag || gameover) + if(IS_DEAD(self) || gameover) instagib_stop_countdown(self); else if (self.ammo_cells > 0 || (self.items & IT_UNLIMITED_WEAPON_AMMO) || (self.flags & FL_GODMODE)) instagib_stop_countdown(self); @@ -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; }