From: Lyberta Date: Thu, 1 Jun 2017 10:13:24 +0000 (+0300) Subject: Survival: Added no blaster selfdamage option. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=09e293017591a969715636b12a1afdb279f84cd8;p=xonotic%2Fxonotic-data.pk3dir.git Survival: Added no blaster selfdamage option. --- diff --git a/qcsrc/server/mutators/mutator/gamemode_survival.qc b/qcsrc/server/mutators/mutator/gamemode_survival.qc index 91213c8e2..abf0200f2 100644 --- a/qcsrc/server/mutators/mutator/gamemode_survival.qc +++ b/qcsrc/server/mutators/mutator/gamemode_survival.qc @@ -1641,10 +1641,11 @@ MUTATOR_HOOKFUNCTION(surv, Damage_Calculate) { entity frag_attacker = M_ARGV(1, entity); entity frag_target = M_ARGV(2, entity); + float deathtype = M_ARGV(3, float); float damage = M_ARGV(4, float); M_ARGV(4, float) = PlayerTemplate_Damage_Calculate(frag_attacker, Surv_GetPlayerTemplate(frag_attacker), frag_target, - Surv_GetPlayerTemplate(frag_target), damage); + Surv_GetPlayerTemplate(frag_target), deathtype, damage); } /// \brief Hook which is called when the player was damaged. diff --git a/survival.cfg b/survival.cfg index d13d315c7..41c0b210f 100644 --- a/survival.cfg +++ b/survival.cfg @@ -114,12 +114,15 @@ set g_surv_attacker_damage_score 0.025 "How much score attackers gain per 1 poin set g_player_template_surv_attacker_attack_scale "default" "How much attackers damage others. Higher values mean more damage" set g_player_template_surv_attacker_defense_scale "default" "How much attackers get damaged. Higher values mean less damage" +set g_player_template_surv_attacker_blaster_self_damage 0 "Whether attackers get damaged with their own blaster" set g_player_template_surv_defender_attack_scale 1 "How much defenders damage others. Higher values mean more damage" set g_player_template_surv_defender_defense_scale 2 "How much defenders get damaged. Higher values mean less damage" +set g_player_template_surv_defender_blaster_self_damage 0 "Whether defenders get damaged with their own blaster" set g_player_template_surv_cannon_fodder_attack_scale "default" "How much cannon fodder damages others. Higher values mean more damage" set g_player_template_surv_cannon_fodder_defense_scale "default" "How much cannon fodder gets damaged. Higher values mean less damage" +set g_player_template_surv_cannon_fodder_blaster_self_damage 0 "Whether cannon fodder gets damaged with their own blaster" set g_surv_attacker_frag_score 10 "How much score attackers get for fragging defenders"