set sv_vote_majority_factor 0.5 "What percentage of the PLAYERS constitute a majority? (Must be at least 0.5, recommended: 0.5)"
set sv_vote_majority_factor_of_voted 0.5 "What percentage of the VOTERS constitute a majority too? (Must be at least 0.5, recommended: 0.5)"
set sv_vote_gamestart 0 "Allow voting during map change"
+set sv_vote_debug 0 "count votes by bots too for debugging purposes (to get a bot to vote exec this command: bot_cmd 1 cc vote yes)
// when disabled, don't allow game type changes "note: set these two equal to JUST support simple majorities"
set sv_vote_override_mostrecent 0
void VoteCount(float first_count)
{
- // declarations
vote_accept_count = vote_reject_count = vote_abstain_count = 0;
float vote_player_count = 0, notvoters = 0;
Nagger_VoteCountChanged();
// add up all the votes from each connected client
- FOREACH_CLIENT(IS_REAL_CLIENT(it), {
+ FOREACH_CLIENT(IS_REAL_CLIENT(it) || autocvar_sv_vote_debug, {
++vote_player_count;
if (IS_PLAYER(it) || INGAME(it)) ++vote_real_player_count;
switch (it.vote_selection)
FOREACH_CLIENT(IS_REAL_CLIENT(it), { ++tmp_playercount; });
bprint("\{1}^2* ^3", OriginalCallerName(), "^2 calls a vote for ", vote_called_display, "\n");
+ if (autocvar_sv_vote_debug)
+ bprint("\{1}^2* ^3", "^6DEBUG MODE ACTIVE: bots can vote too\n"); // so servers don't forget it on
if (autocvar_sv_eventlog)
GameLogEcho(strcat(":vote:vcall:", ftos(vote_caller.playerid), ":", vote_called_display));
Nagger_VoteChanged();
bool autocvar_sv_vote_call;
bool autocvar_sv_vote_change;
string autocvar_sv_vote_commands;
+bool autocvar_sv_vote_debug;
+bool autocvar_sv_vote_gamestart;
int autocvar_sv_vote_limit;
float autocvar_sv_vote_majority_factor;
float autocvar_sv_vote_majority_factor_of_voted;
float autocvar_sv_vote_stop;
float autocvar_sv_vote_timeout;
float autocvar_sv_vote_wait;
-bool autocvar_sv_vote_gamestart;
// definitions for command selection between progs
const float VC_ASGNMNT_BOTH = 1;