From 825e258bbbb853e94f2c15542526b033cc580b13 Mon Sep 17 00:00:00 2001 From: Lyberta Date: Thu, 1 Jun 2017 15:01:48 +0300 Subject: [PATCH] Player templates: Added support for InstaGib. --- .../mutator/playertemplates/sv_playertemplates.qc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/qcsrc/common/mutators/mutator/playertemplates/sv_playertemplates.qc b/qcsrc/common/mutators/mutator/playertemplates/sv_playertemplates.qc index b8142494f8..c3a742b570 100644 --- a/qcsrc/common/mutators/mutator/playertemplates/sv_playertemplates.qc +++ b/qcsrc/common/mutators/mutator/playertemplates/sv_playertemplates.qc @@ -244,6 +244,10 @@ void PlayerTemplate_PlayerSpawn(entity player, string template) player.ammo_cells = PlayerTemplate_GetFloatValue(template, "start_ammo_cells"); } + if (autocvar_g_instagib == 1) + { + return; + } // Give weapons. if (PlayerTemplate_GetFloatValue(template, "default_start_weapons")) { @@ -987,6 +991,10 @@ float PlayerTemplate_ItemTouch(entity player, entity item, string template) float PlayerTemplate_Damage_Calculate(entity attacker, string attackertemplate, entity victim, string victimtemplate, float deathtype, float damage) { + if (autocvar_g_instagib == 1) + { + return damage; + } if ((attacker == victim) && (DEATH_ISWEAPON(deathtype, WEP_BLASTER)) && (PlayerTemplate_GetFloatValue(victimtemplate, "blaster_self_damage") == 0)) -- 2.39.5