- wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints\r
- wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache\r
- make\r
- - EXPECT=ae4d27dd465e976cd5afa35365eea0d7\r
+ - EXPECT=028dcf7335482c5bf83e4a8835f2d66b\r
- HASH=$(${ENGINE} -noconfig -nohome +timestamps 1 +exec serverbench.cfg\r
| tee /dev/stderr\r
| sed -e 's,^\[[^]]*\] ,,'\r
case "revivals": if (!mode) return CTX(_("SCO^revivals")); else LOG_HELP(strcat("^3", "revivals", " ^7", _("Number of revivals")));
case "rounds": if (!mode) return CTX(_("SCO^rounds won")); else LOG_HELP(strcat("^3", "rounds", " ^7", _("Number of rounds won")));
case "score": if (!mode) return CTX(_("SCO^score")); else LOG_HELP(strcat("^3", "score", " ^7", _("Total score")));
+ case "startspeed": if (!mode) return CTX(_("SCO^start speed")); else LOG_HELP(strcat("^3", "startspeed", " ^7", _("Start speed (CTS)")));
case "strafe": if (!mode) return CTX(_("SCO^strafe")); else LOG_HELP(strcat("^3", "strafe", " ^7", _("Strafe efficiency (CTS)")));
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")));
" +ctf/pickups +ctf/fckills +ctf/returns +ctf/caps +ons/takes +ons/caps" \
" +lms/lives +lms/rank" \
" +kh/kckills +kh/losses +kh/caps" \
-" ?+rc/laps ?+rc/time ?+cts/strafe +rc,cts/fastest" \
+" ?+rc/laps ?+rc/time ?+cts/strafe ?+cts/startspeed +rc,cts/fastest" \
" +as/objectives +nb/faults +nb/goals" \
" +ka/pickups +ka/bckills +ka/bctime +ft/revivals" \
" +dom/ticks +dom/takes" \
return sprintf("%.2f%%", strafe_efficiency * 100);
}
+ case SP_CTS_STARTSPEED:
+ {
+ float startspeed = pl.(scores(field)) / 100;
+ if(startspeed < 0) return "";
+ return sprintf("%.2f qu/s", startspeed);
+ }
+
default: case SP_SCORE:
tmp = pl.(scores(field));
f = scores_flags(field);
// legacy bot roles
.float race_checkpoint;
+.float race_oldcheckpoint;
+.bool startspeed_recorded;
+.float startspeed;
void havocbot_role_cts(entity this)
{
if(IS_DEAD(this))
GameRules_scoring(0, 0, 0, {
if (g_race_qualifying) {
field(SP_CTS_STRAFE, "strafe", 0);
+ field(SP_CTS_STARTSPEED, "startspeed", 0);
field(SP_RACE_FASTEST, "fastest", SFL_SORT_PRIO_PRIMARY | SFL_LOWER_IS_BETTER | SFL_TIME);
} else {
field(SP_RACE_LAPS, "laps", SFL_SORT_PRIO_PRIMARY);
}
}
player.strafe_efficiency_sum += calculate_strafe_efficiency(player, CS(player).movement);
+ if(!player.race_started) player.startspeed_recorded = false;
+ if(player.race_started && !player.startspeed_recorded && player.race_checkpoint != 0 && player.race_oldcheckpoint == 0)
+ {
+ float new_startspeed = vlen(vec2(player.velocity));
+ player.startspeed_recorded = true;
+ if(new_startspeed > player.startspeed)
+ {
+ player.startspeed = new_startspeed;
+ PlayerScore_Set(player, SP_CTS_STARTSPEED, player.startspeed * 100);
+ }
+ }
+ player.race_oldcheckpoint = player.race_checkpoint;
}
MUTATOR_HOOKFUNCTION(cts, reset_map_global)
FOREACH_CLIENT(true, {
it.strafe_efficiency_best = -2;
PlayerScore_Set(it, SP_CTS_STRAFE, -20000);
+ it.startspeed_recorded = false;
+ it.race_oldcheckpoint = 0;
+ PlayerScore_Set(it, SP_CTS_STARTSPEED, -1);
if(it.race_place)
{
player.strafe_efficiency_sum = player.strafe_efficiency_tics = 0;
player.strafe_efficiency_best = -2;
PlayerScore_Set(player, SP_CTS_STRAFE, -20000);
+ player.startspeed_recorded = false;
+ player.race_oldcheckpoint = 0;
+ PlayerScore_Set(player, SP_CTS_STARTSPEED, -1);
race_SendAll(player, false);
}
race_AbandonRaceCheck(frag_target);
frag_target.strafe_efficiency_sum = frag_target.strafe_efficiency_tics = 0;
+ frag_target.startspeed_recorded = false;
if(autocvar_g_cts_removeprojectiles)
{