if(complainteamdamage > 0 && !g_ca) // FIXME why is g_ca ruled out here? Why not just g_mirrordamage 0 on CA servers?
mirrordamage = autocvar_g_mirrordamage * complainteamdamage;
mirrorforce = autocvar_g_mirrordamage * vlen(force);
- if(g_minstagib)
- {
- if(autocvar_g_friendlyfire == 0)
- damage = 0;
- }
- else if(g_ca)
+ if(g_ca)
damage = 0;
else
damage = autocvar_g_friendlyfire * damage;
attacker.lms_traveled_distance = autocvar_g_lms_campcheck_distance;
}
- if(targ.classname == "player")
- if (g_minstagib)
- {
- if ((deathtype == DEATH_FALL) ||
- (deathtype == DEATH_DROWN) ||
- (deathtype == DEATH_SLIME) ||
- (deathtype == DEATH_LAVA) ||
- (!DEATH_ISWEAPON(deathtype, WEP_LASER) && damage > 0 && damage < 100))
- {
- self = oldself;
- return;
- }
- if(damage > 0)
- damage = 10000;
- if (targ.armorvalue && (deathtype == WEP_MINSTANEX) && damage)
- {
- targ.armorvalue -= 1;
- centerprint(targ, strcat("^3Remaining extra lives: ",ftos(targ.armorvalue)));
- damage = 0;
- targ.hitsound += 1;
- attacker.hitsound += 1; // TODO change this to a future specific hitsound for armor hit
- }
- if (DEATH_ISWEAPON(deathtype, WEP_LASER))
- {
- damage = 0;
- mirrordamage = 0;
- complainteamdamage = 0;
- if (targ != attacker)
- {
- if ((targ.health >= 1) && (targ.classname == "player"))
- centerprint(attacker, "Secondary fire inflicts no damage!");
- force = '0 0 0';
- // keep mirrorforce
- attacker = targ;
- }
- }
- }
-
if not(DEATH_ISSPECIAL(deathtype))
{
damage *= g_weapondamagefactor;
frag_damage = damage;
frag_force = force;
frag_deathtype = deathtype;
+ frag_mirrordamage = mirrordamage;
MUTATOR_CALLHOOK(PlayerDamage_Calculate);
damage = frag_damage;
+ mirrordamage = frag_mirrordamage;
force = frag_force;
- // apply strength multiplier
- if ((attacker.items & IT_STRENGTH) && !g_minstagib)
+ if not(g_minstagib)
{
- if(targ == attacker)
- {
- damage = damage * autocvar_g_balance_powerup_strength_selfdamage;
- force = force * autocvar_g_balance_powerup_strength_selfforce;
- }
- else
+ // apply strength multiplier
+ if (attacker.items & IT_STRENGTH)
{
- damage = damage * autocvar_g_balance_powerup_strength_damage;
- force = force * autocvar_g_balance_powerup_strength_force;
+ if(targ == attacker)
+ {
+ damage = damage * autocvar_g_balance_powerup_strength_selfdamage;
+ force = force * autocvar_g_balance_powerup_strength_selfforce;
+ }
+ else
+ {
+ damage = damage * autocvar_g_balance_powerup_strength_damage;
+ force = force * autocvar_g_balance_powerup_strength_force;
+ }
}
- }
- // apply invincibility multiplier
- if (targ.items & IT_INVINCIBLE && !g_minstagib)
- damage = damage * autocvar_g_balance_powerup_invincible_takedamage;
+ // apply invincibility multiplier
+ if (targ.items & IT_INVINCIBLE)
+ damage = damage * autocvar_g_balance_powerup_invincible_takedamage;
+ }
if (targ == attacker)
{
if not(DEATH_ISSPECIAL(deathtype))
{
if(targ.classname == "player") // don't do this for vehicles
- if(!g_minstagib)
if(IsFlying(victim))
yoda = 1;
+<<<<<<< HEAD
+ if(deathtype & HITTYPE_HEADSHOT)
+ headshot = 1;
+=======
if(g_minstagib)
if(victim.items & IT_STRENGTH)
yoda = 1;
+>>>>>>> master
}
}
}
if(mirrordamage > 0 || mirrorforce > 0)
{
attacker = attacker_save;
- if(g_minstagib)
- if(mirrordamage > 0)
- {
- // just lose extra LIVES, don't kill the player for mirror damage
- if(attacker.armorvalue > 0)
- {
- attacker.armorvalue = attacker.armorvalue - 1;
- centerprint(attacker, strcat("^3Remaining extra lives: ",ftos(attacker.armorvalue)));
- attacker.hitsound += 1;
- }
- mirrordamage = 0;
- }
force = normalize(attacker.origin + attacker.view_ofs - hitloc) * mirrorforce;
Damage(attacker, inflictor, attacker, mirrordamage, DEATH_MIRRORDAMAGE, attacker.origin, force);