break;
}
- case "nextmap": // TODO: replicate the old behaviour of being able to vote for maps from different modes on multimode servers (possibly support it in gotomap too), maybe fallback instead of aborting if map name is invalid?
+ // TODO: replicate the old behaviour of being able to vote for maps from different modes on multimode servers (possibly support it in gotomap too)
+ // maybe fallback instead of aborting if map name is invalid?
+ case "nextmap":
{
vote_command = ValidateMap(argv(startpos + 1), caller);
if (!vote_command) return -1;
break;
}
+ case "timelimit": // include restrictions on the maximum votable time limit
+ {
+ float timelimit_vote = stof(argv(startpos + 1));
+ if(timelimit_vote <= 0 || timelimit_vote > autocvar_timelimit_max || timelimit_vote < autocvar_timelimit_min)
+ {
+ print_to(caller, strcat("Invalid timelimit vote, accepted values are between ", ftos(autocvar_timelimit_min), " and ", ftos(autocvar_timelimit_max), "."));
+ return -1;
+ }
+ timelimit_vote = bound(autocvar_timelimit_min, timelimit_vote, autocvar_timelimit_max);
+ vote_parsed_command = strcat("timelimit ", ftos(timelimit_vote));
+ vote_parsed_display = strzone(strcat("^1", vote_parsed_command));
+
+ break;
+ }
+
case "restart":
{
// add a delay so that vote result can be seen and announcer can be heard
// useful vote aliases
set timelimit_increment 5 "number of minutes added to the timer when voting for extendmatchtime"
set timelimit_decrement 5 "number of minutes removed from the timer when voting for reducematchtime"
-set timelimit_min 5 "shortest match time achieveable with reducematchtime votes"
-set timelimit_max 60 "maximum match time achieveable with extendmatchtime votes"
+set timelimit_min 5 "shortest match time achieveable with reducematchtime and timelimit votes"
+set timelimit_max 60 "maximum match time achieveable with extendmatchtime and timelimit votes"
sv_gameplayfix_delayprojectiles 0
sv_gameplayfix_q2airaccelerate 1