if (targ == attacker)
{
- if(g_ca || (g_cts && !autocvar_g_cts_selfdamage))
+ if(g_cts && !autocvar_g_cts_selfdamage)
damage = 0;
else
damage = damage * autocvar_g_balance_selfdamagepercent; // Partial damage if the attacker hits himself
return 0;
}
+MUTATOR_HOOKFUNCTION(ca_PlayerDamage)
+{
+ if(IS_PLAYER(frag_attacker))
+ if(frag_target == frag_attacker)
+ frag_damage = 0;
+
+ return FALSE;
+}
+
// scoreboard setup
void ca_ScoreRules()
{
MUTATOR_HOOK(ForbidThrowCurrentWeapon, ca_ForbidThrowCurrentWeapon, CBC_ORDER_ANY);
MUTATOR_HOOK(GiveFragsForKill, ca_GiveFragsForKill, CBC_ORDER_FIRST);
MUTATOR_HOOK(SetStartItems, ca_SetStartItems, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PlayerDamage_Calculate, ca_PlayerDamage, CBC_ORDER_ANY);
MUTATOR_ONADD
{