case "fps": if (!mode) return CTX(_("SCO^fps")); else LOG_HELP(strcat("^3", "fps", " ^7", _("FPS")));
case "frags": if (!mode) return CTX(_("SCO^frags")); else LOG_HELP(strcat("^3", "frags", " ^7", _("Number of kills minus suicides")));
case "goals": if (!mode) return CTX(_("SCO^goals")); else LOG_HELP(strcat("^3", "goals", " ^7", _("Number of goals scored")));
+ case "hunts": if (!mode) return CTX(_("SCO^hunts")); else LOG_HELP(strcat("^3", "hunts", " ^7", _("Number of successful hunter rounds (Survival)")));
case "kckills": if (!mode) return CTX(_("SCO^kckills")); else LOG_HELP(strcat("^3", "kckills", " ^7", _("Number of keys carrier kills")));
case "kd": if (!mode) return CTX(_("SCO^k/d")); else LOG_HELP(strcat("^3", "kd", " ^7", _("The kill-death ratio")));
case "kdr": if (!mode) return CTX(_("SCO^kdr")); else LOG_HELP(strcat("^3", "kdr", " ^7", _("The kill-death ratio")));
case "score": if (!mode) return CTX(_("SCO^score")); else LOG_HELP(strcat("^3", "score", " ^7", _("Total score")));
case "suicides": if (!mode) return CTX(_("SCO^suicides")); else LOG_HELP(strcat("^3", "suicides", " ^7", _("Number of suicides")));
case "sum": if (!mode) return CTX(_("SCO^sum")); else LOG_HELP(strcat("^3", "sum", " ^7", _("Number of kills minus deaths")));
+ case "survivals": if (!mode) return CTX(_("SCO^survivals")); else LOG_HELP(strcat("^3", "survivals", " ^7", _("Number of rounds survived (Survival)")));
case "takes": if (!mode) return CTX(_("SCO^takes")); else LOG_HELP(strcat("^3", "takes", " ^7", _("Number of domination points taken (Domination)")));
case "teamkills": if (!mode) return CTX(_("SCO^teamkills")); else LOG_HELP(strcat("^3", "teamkills", " ^7", _("Number of teamkills")));
case "ticks": if (!mode) return CTX(_("SCO^ticks")); else LOG_HELP(strcat("^3", "ticks", " ^7", _("Number of ticks (Domination)")));
" +as/objectives +nb/faults +nb/goals" \
" +ka/pickups +ka/bckills +ka/bctime +ft/revivals" \
" +dom/ticks +dom/takes" \
+" +surv/survivals +surv/hunts" \
" -lms,rc,cts,inv,nb/score"
void Cmd_Scoreboard_SetFields(int argc)
if(it.survival_validkills)
GameRules_scoring_add(it, SCORE, it.survival_validkills);
it.survival_validkills = 0;
- if(autocvar_g_survival_reward_survival && timed_out && IS_PLAYER(it) && !IS_DEAD(it) && it.survival_status == SURV_STATUS_PREY)
- GameRules_scoring_add(it, SCORE, 1); // reward survivors who make it to the end of the round time limit
+ // player survived the round
+ if(IS_PLAYER(it) && !IS_DEAD(it))
+ {
+ if(autocvar_g_survival_reward_survival && timed_out && it.survival_status == SURV_STATUS_PREY)
+ GameRules_scoring_add(it, SCORE, 1); // reward survivors who make it to the end of the round time limit
+ if(it.survival_status == SURV_STATUS_PREY)
+ GameRules_scoring_add(it, SURV_SURVIVALS, 1);
+ else if(it.survival_status == SURV_STATUS_HUNTER)
+ GameRules_scoring_add(it, SURV_HUNTS, 1);
+ }
});
}
void surv_Initialize() // run at the start of a match, initiates game mode
{
+ GameRules_scoring(0, SFL_SORT_PRIO_PRIMARY, 0, {
+ field(SP_SURV_SURVIVALS, "survivals", 0);
+ field(SP_SURV_HUNTS, "hunts", SFL_SORT_PRIO_SECONDARY);
+ });
+
allowed_to_spawn = true;
round_handler_Spawn(Surv_CheckPlayers, Surv_CheckWinner, Surv_RoundStart);
round_handler_Init(5, autocvar_g_survival_warmup, autocvar_g_survival_round_timelimit);