/// \brief How much score attackers gain per 1 point of damage.
float autocvar_g_surv_attacker_damage_score;
-/// \brief How much score attackers get for killing defenders.
-float autocvar_g_surv_attacker_frag_score;
/// \brief How much defenders damage others. Higher values mean more damage.
float autocvar_g_surv_defender_attack_scale;
/// \brief How much defenders get damaged. High values mean less damage.
/// \brief How much cannon fodder gets damaged. Higher values mean less damage.
float autocvar_g_surv_cannon_fodder_defense_scale;
+/// \brief How much score attackers get for fragging defenders.
+float autocvar_g_surv_attacker_frag_score;
+/// \brief How much health do defenders get when they frag an attacker.
+int autocvar_g_surv_defender_attacker_frag_health;
+/// \brief How much armor do defenders get when they frag an attacker.
+int autocvar_g_surv_defender_attacker_frag_armor;
+/// \brief How many shells do defenders get when they frag an attacker.
+int autocvar_g_surv_defender_attacker_frag_shells;
+/// \brief How many bullets do defenders get when they frag an attacker.
+int autocvar_g_surv_defender_attacker_frag_bullets;
+/// \brief How many rockets do defenders get when they frag an attacker.
+int autocvar_g_surv_defender_attacker_frag_rockets;
+/// \brief How many cells do defenders get when they frag an attacker.
+int autocvar_g_surv_defender_attacker_frag_cells;
+/// \brief How much health do defenders get when they frag cannon fodder.
+int autocvar_g_surv_defender_cannon_fodder_frag_health;
+/// \brief How much armor do defenders get when they frag cannon fodder.
+int autocvar_g_surv_defender_cannon_fodder_frag_armor;
+/// \brief How many shells do defenders get when they frag cannon fodder.
+int autocvar_g_surv_defender_cannon_fodder_frag_shells;
+/// \brief How many bullets do defenders get when they frag cannon fodder.
+int autocvar_g_surv_defender_cannon_fodder_frag_bullets;
+/// \brief How many rockets do defenders get when they frag cannon fodder.
+int autocvar_g_surv_defender_cannon_fodder_frag_rockets;
+/// \brief How many cells do defenders get when they frag cannon fodder.
+int autocvar_g_surv_defender_cannon_fodder_frag_cells;
+
/// \brief Whether defenders drop weapons after death.
int autocvar_g_surv_defender_drop_weapons;
MUTATOR_HOOKFUNCTION(surv, PlayerDies)
{
//DebugPrintToChatAll("PlayerDies");
+ entity attacker = M_ARGV(1, entity);
entity victim = M_ARGV(2, entity);
+ if ((attacker.team == surv_defenderteam) &&
+ (victim.team == surv_attackerteam))
+ {
+ switch (victim.surv_role)
+ {
+ case SURVIVAL_ROLE_PLAYER:
+ {
+ GivePlayerHealth(attacker,
+ autocvar_g_surv_defender_attacker_frag_health);
+ GivePlayerArmor(attacker,
+ autocvar_g_surv_defender_attacker_frag_armor);
+ GivePlayerShells(attacker,
+ autocvar_g_surv_defender_attacker_frag_shells);
+ GivePlayerBullets(attacker,
+ autocvar_g_surv_defender_attacker_frag_bullets);
+ GivePlayerRockets(attacker,
+ autocvar_g_surv_defender_attacker_frag_rockets);
+ GivePlayerCells(attacker,
+ autocvar_g_surv_defender_attacker_frag_cells);
+ break;
+ }
+ case SURVIVAL_ROLE_CANNON_FODDER:
+ {
+ GivePlayerHealth(attacker,
+ autocvar_g_surv_defender_cannon_fodder_frag_health);
+ GivePlayerArmor(attacker,
+ autocvar_g_surv_defender_cannon_fodder_frag_armor);
+ GivePlayerShells(attacker,
+ autocvar_g_surv_defender_cannon_fodder_frag_shells);
+ GivePlayerBullets(attacker,
+ autocvar_g_surv_defender_cannon_fodder_frag_bullets);
+ GivePlayerRockets(attacker,
+ autocvar_g_surv_defender_cannon_fodder_frag_rockets);
+ GivePlayerCells(attacker,
+ autocvar_g_surv_defender_cannon_fodder_frag_cells);
+ break;
+ }
+ }
+ }
if ((victim.team == surv_defenderteam) &&
(autocvar_g_surv_defender_drop_weapons == false))
{
set g_surv_defender_pickup_cells_mega 50 "How many cells do defenders get when they pickup mega health/armor"
set g_surv_attacker_damage_score 0.025 "How much score attackers gain per 1 point of damage"
-set g_surv_attacker_frag_score 10 "How much score attackers get for killing defenders"
set g_surv_defender_attack_scale 1 "How much defenders damage others. Higher values mean more damage"
set g_surv_defender_defense_scale 2 "How much defenders get damaged. Higher values mean less damage"
set g_surv_cannon_fodder_attack_scale 1 "How much cannon fodder damages others. Higher values mean more damage"
set g_surv_cannon_fodder_defense_scale 1 "How much cannon fodder gets damaged. Higher values mean less damage"
+set g_surv_attacker_frag_score 10 "How much score attackers get for fragging defenders"
+set g_surv_defender_attacker_frag_health 0 "How much health do defenders get when they frag an attacker"
+set g_surv_defender_attacker_frag_armor 0 "How much armor do defenders get when they frag an attacker"
+set g_surv_defender_attacker_frag_shells 0 "How many shells do defenders get when they frag an attacker"
+set g_surv_defender_attacker_frag_bullets 0 "How many bullets do defenders get when they frag an attacker"
+set g_surv_defender_attacker_frag_rockets 0 "How many rockets do defenders get when they frag an attacker"
+set g_surv_defender_attacker_frag_cells 0 "How many cells do defenders get when they frag an attacker"
+set g_surv_defender_cannon_fodder_frag_health 0 "How much health do defenders get when they frag cannon fodder"
+set g_surv_defender_cannon_fodder_frag_armor 0 "How much armor do defenders get when they frag cannon fodder"
+set g_surv_defender_cannon_fodder_frag_shells 0 "How many shells do defenders get when they frag cannon fodder"
+set g_surv_defender_cannon_fodder_frag_bullets 0 "How many bullets do defenders get when they frag cannon fodder"
+set g_surv_defender_cannon_fodder_frag_rockets 0 "How many rockets do defenders get when they frag cannon fodder"
+set g_surv_defender_cannon_fodder_frag_cells 0 "How many cells do defenders get when they frag cannon fodder"
+
+
set g_surv_defender_drop_weapons 0 "Whether defenders drop weapons after death"