From: Lyberta Date: Thu, 1 Jun 2017 12:01:48 +0000 (+0300) Subject: Player templates: Added support for InstaGib. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=825e258bbbb853e94f2c15542526b033cc580b13;p=xonotic%2Fxonotic-data.pk3dir.git Player templates: Added support for InstaGib. --- 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))