MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_FALL, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_fall", _("^BG%s%s^K1 was grounded by ^BG%s^K1%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_FIRE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_death", _("^BG%s%s^K1 was burnt up into a crisp by ^BG%s^K1%s%s"), _("^BG%s%s^K1 felt a little hot from ^BG%s^K1's fire^K1%s%s")) \
MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_LAVA, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_lava", _("^BG%s%s^K1 was cooked by ^BG%s^K1%s%s"), "") \
- MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_MONSTER, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 d1", "notify_death", _("^BG%s%s^K1 was pushed infront of a monster by ^BG%s^K1%s%s"), "") \
+ MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_MONSTER, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_death", _("^BG%s%s^K1 was pushed infront of a monster by ^BG%s^K1%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_NADE, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_death", _("^BG%s%s^K1 was blown up by ^BG%s^K1's Nade%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_SHOOTING_STAR, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_shootingstar", _("^BG%s%s^K1 was shot into space by ^BG%s^K1%s%s"), "") \
MSG_INFO_NOTIF(1, INFO_DEATH_MURDER_SLIME, 3, 2, "spree_inf s1 s2 s3loc spree_end", "s2 s1", "notify_slime", _("^BG%s%s^K1 was slimed by ^BG%s^K1%s%s"), "") \
float accuracy_isgooddamage(entity attacker, entity targ)
{
- float targ_isvalid = ((g_invasion) ? (targ.flags & FL_MONSTER) : IS_CLIENT(targ));
+ frag_attacker = attacker;
+ frag_target = targ;
+ float mutator_check = MUTATOR_CALLHOOK(AccuracyTargetValid);
if(!warmup_stage)
- if(targ_isvalid)
if(targ.deadflag == DEAD_NO)
+ if(mutator_check == MUT_ACCADD_INVALID || (mutator_check == MUT_ACCADD_VALID && IS_CLIENT(targ)))
if(DIFF_TEAM(attacker, targ))
return TRUE;
return FALSE;
MUTATOR_HOOKABLE(HavocBot_ChooseRule);
entity self;
+
+MUTATOR_HOOKABLE(AccuracyTargetValid);
+ // called when a target is checked for accuracy
+ entity frag_attacker; // attacker
+ entity frag_target; // target
+ #define MUT_ACCADD_VALID 0 // return this flag to make the function continue if target is a client
+ #define MUT_ACCADD_INVALID 1 // return this flag to make the function always continue
+ #define MUT_ACCADD_INDIFFERENT 2 // return this flag to make the function always return
return FALSE;
}
+MUTATOR_HOOKFUNCTION(invasion_AccuracyTargetValid)
+{
+ if(frag_target.flags & FL_MONSTER)
+ return MUT_ACCADD_INVALID;
+ return MUT_ACCADD_INDIFFERENT;
+}
+
void invasion_ScoreRules()
{
ScoreRules_basics(0, 0, 0, FALSE);
MUTATOR_HOOK(PlayerDamage_Calculate, invasion_PlayerDamage, CBC_ORDER_ANY);
MUTATOR_HOOK(SV_ParseClientCommand, invasion_PlayerCommand, CBC_ORDER_ANY);
MUTATOR_HOOK(SetStartItems, invasion_SetStartItems, CBC_ORDER_ANY);
+ MUTATOR_HOOK(AccuracyTargetValid, invasion_AccuracyTargetValid, CBC_ORDER_ANY);
MUTATOR_ONADD
{