return !autocvar_g_duel_with_powerups;
}
}
+
+MUTATOR_HOOKFUNCTION(duel, FragCenterMessage)
+{
+ // Use normal notifications in warmup
+ if(warmup_stage) return false;
+
+ entity attacker = M_ARGV(0, entity);
+ entity targ = M_ARGV(1, entity);
+ string tie_str;
+ int kill_count_to_attacker = M_ARGV(3, int);
+ int kill_count_to_target = M_ARGV(4, int);
+
+ WinningConditionHelper(NULL);
+
+ if(WinningConditionHelper_equality)
+ tie_str = "^3Tied";
+ else if(attacker == WinningConditionHelper_winner)
+ tie_str = "^2Leads";
+ else
+ tie_str = "^1Trails";
+
+ Send_Notification(
+ NOTIF_ONE,
+ attacker,
+ MSG_CENTER,
+ CENTER_DEATH_MURDER_DUEL,
+ targ.netname,
+ tie_str,
+ kill_count_to_attacker,
+ GameRules_scoring_add(attacker, SCORE, 0)
+ );
+ Send_Notification(
+ NOTIF_ONE,
+ targ,
+ MSG_CHOICE,
+ CHOICE_FRAGGED,
+ attacker.netname,
+ kill_count_to_target,
+ GetResource(attacker, RES_HEALTH),
+ GetResource(attacker, RES_ARMOR),
+ (IS_BOT_CLIENT(attacker) ? -1 : CS(attacker).ping)
+ );
+
+ return true;
+}
#define MURDER_FRAG strcat(BOLD_OPERATOR, _("^K3%sYou fragged ^BG%s"))
#define MURDER_FRAG2 strcat(BOLD_OPERATOR, _("^K3%sYou scored against ^BG%s"))
#define MURDER_FRAG3 strcat(BOLD_OPERATOR, _("^K3%sYou fragged ^BG%s"), "\n", "%s^BG place with %s")
+ #define MURDER_FRAG4 strcat(BOLD_OPERATOR, _("^K3%sYou fragged ^BG%s"), "\n", "%s^BG with %s")
#define MURDER_FRAGGED _("^K1%sYou were fragged by ^BG%s")
#define MURDER_FRAGGED2 _("^K1%sYou were scored against by ^BG%s")
MSG_CENTER_NOTIF(DEATH_MURDER_FRAG, N_ENABLE, 1, 1, "spree_cen s1", CPID_Null, "0 0", MURDER_FRAG, MURDER_FRAG2 )
MSG_CENTER_NOTIF(DEATH_MURDER_DM, N_ENABLE, 1, 2, "spree_cen s1 frag_pos f2", CPID_Null, "0 0", MURDER_FRAG3, "")
+ MSG_CENTER_NOTIF(DEATH_MURDER_DUEL, N_ENABLE, 2, 2, "spree_cen s1 s2 f2", CPID_Null, "0 0", MURDER_FRAG4, "")
MSG_CENTER_NOTIF(DEATH_MURDER_FRAGGED, N_ENABLE, 1, 1, "spree_cen s1", CPID_Null, "0 0", MURDER_FRAGGED, MURDER_FRAGGED2 )
MSG_CENTER_NOTIF(DEATH_MURDER_FRAGGED_VERBOSE, N_ENABLE, 1, 4, "spree_cen s1 frag_stats", CPID_Null, "0 0", VERBOSE_MURDER(FRAGGED), VERBOSE_MURDER(FRAGGED2) )
MSG_CENTER_NOTIF(DEATH_MURDER_FRAG_VERBOSE, N_ENABLE, 1, 2, "spree_cen s1 frag_ping", CPID_Null, "0 0", VERBOSE_MURDER(FRAG), VERBOSE_MURDER(FRAG2) )
SPREE_ITEM(15, 15, _("MAYHEM! "), _("%s^K1 executed MAYHEM! %s^BG"), _("%s^K1 made FIFTEEN SCORES IN A ROW! %s^BG")) \
#ifdef CSQC
+// z411 TODO : This actually doesn't work very well.
+// This gets run before the client gets score updates so it works
+// fine when you're playing (because frags get updated first)
+// but it breaks a lot when you're spectating because
+// we sometimes get the new frag info at different times
+// (before or after we run this). A suggested fix would
+// be to do this sorting and comparison in the server.
string notif_arg_frag_pos(int score)
{
entity pl;