|
Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
|
|
#include "vote.qh"#include <common/command/_mod.qh>#include <common/constants.qh>#include <common/gametypes/_mod.qh>#include <common/items/inventory.qh>#include <common/mapinfo.qh>#include <common/net_linked.qh>#include <common/notifications/all.qh>#include <common/playerstats.qh>#include <common/stats.qh>#include <common/util.qh>#include <common/weapons/_all.qh>#include <server/campaign.qh>#include <server/client.qh>#include <server/command/banning.qh>#include <server/command/common.qh>#include <server/damage.qh>#include <server/gamelog.qh>#include <server/intermission.qh>#include <server/mutators/_mod.qh>#include <server/race.qh>#include <server/round_handler.qh>#include <server/scores.qh>#include <server/teamplay.qh>#include <server/weapons/accuracy.qh>#include <server/weapons/selection.qh>#include <server/world.qh>Go to the source code of this file.
Macros | |
| #define | spectators_allowed (!autocvar_sv_vote_nospectators || (autocvar_sv_vote_nospectators == 1 && (warmup_stage || intermission_running))) |
| #define | VOTE_COMMAND(name, function, description, assignment) |
| #define | VOTE_COMMAND(name, function, description, assignment) |
| #define | VOTE_COMMAND(name, function, description, assignment) |
| #define | VOTE_COMMANDS(request, caller, arguments, command) |
| #define spectators_allowed (!autocvar_sv_vote_nospectators || (autocvar_sv_vote_nospectators == 1 && (warmup_stage || intermission_running))) |
Definition at line 218 of file vote.qc.
Referenced by VoteCommand_call(), VoteCommand_master(), and VoteCount().
| #define VOTE_COMMAND | ( | name, | |
| function, | |||
| description, | |||
| assignment ) |
| #define VOTE_COMMAND | ( | name, | |
| function, | |||
| description, | |||
| assignment ) |
| #define VOTE_COMMAND | ( | name, | |
| function, | |||
| description, | |||
| assignment ) |
| #define VOTE_COMMANDS | ( | request, | |
| caller, | |||
| arguments, | |||
| command ) |
Definition at line 1371 of file vote.qc.
Referenced by VoteCommand_macro_command(), and VoteCommand_macro_help().
| void Nagger_Init | ( | ) |
Definition at line 97 of file vote.qc.
References nagger, Nagger_SendEntity(), Net_LinkEntity(), and new_pure.
Referenced by spawnfunc().
| void Nagger_ReadyCounted | ( | ) |
Definition at line 37 of file vote.qc.
References BIT, entity(), maxclients, MSG_ENTITY, ready, readycount, vote_accept_count, vote_called, vote_called_display, vote_needed_overall, vote_reject_count, warmup_stage, WriteByte(), WriteChar(), WriteHeader, and WriteString().
Referenced by Nagger_Init().
| void Nagger_VoteChanged | ( | ) |
Definition at line 102 of file vote.qc.
Referenced by VoteCommand_call(), VoteCommand_master(), and VoteReset().
| void Nagger_VoteCountChanged | ( | ) |
| string OriginalCallerName | ( | ) |
Definition at line 118 of file vote.qc.
References IS_REAL_CLIENT, playername(), vote_caller, and vote_caller_name.
Referenced by VoteAccept(), VoteCommand_call(), VoteCommand_master(), VoteCommand_status(), VoteReject(), VoteStop(), and VoteTimeout().
Definition at line 981 of file vote.qc.
References autocvar_sv_vote_commands, entity(), print_to(), and strcat().
Referenced by VoteCommand_call(), and VoteCommand_macro_help().
| void ReadyCount | ( | ) |
Definition at line 553 of file vote.qc.
References autocvar_g_warmup, autocvar_sv_teamnagger, autocvar_timelimit, bound(), cvar(), FOREACH_CLIENT, game_starttime, GiveWarmupResources(), INGAME_JOINED, IS_PLAYER, IS_REAL_CLIENT, map_minplayers, Nagger_ReadyCounted(), NULL, readycount, ReadyRestart(), rint(), Send_Notification(), sv_ready_restart_after_countdown, TeamBalance_SizeDifference(), teamplay, time, timeout_status, total_players, warmup_limit, and warmup_stage.
Referenced by bot_think(), ClientCommand_ready(), ClientDisconnect(), PutObserverInServer(), PutPlayerInServer(), SetPlayerTeam(), and timeout_handler_reset().
Definition at line 526 of file vote.qc.
References autocvar_g_campaign, autocvar_g_warmup, error, intermission_running, localcmd(), MUTATOR_CALLHOOK, race_completing, ReadyRestart_force(), and warmup_stage.
Referenced by CheckRules_World(), GameCommand_allready(), GameCommand_resetmatch(), Join(), ReadyCount(), and StartFrame().
Definition at line 441 of file vote.qc.
References autocvar_g_campaign, autocvar_sv_eventlog, autocvar_sv_spectate, autocvar_sv_timeout, autocvar_sv_timeout_number, autocvar_teamplay_lockonrestart, autocvar_timelimit, autocvar_timelimit_overtime, checkrules_overtimesadded, checkrules_suddendeathend, checkrules_suddendeathwarning, ClientData_Touch(), CS(), cvar_set(), entity(), FOREACH_CLIENT, ftos(), g_race_qualifying, game_starttime, game_stopped, GameLogEcho(), IS_PLAYER, IS_REAL_CLIENT, IS_SPEC, Join(), localcmd(), lockteams, Nagger_ReadyCounted(), new_pure, NULL, overtimes, PutClientInServer, readycount, ReadyRestart_think(), reset_map(), RESTART_COUNTDOWN, Send_Notification(), setthink, sv_ready_restart_after_countdown, teamplay, time, TRANSMUTE, VoteReset(), and warmup_stage.
Referenced by assault_new_round(), and ReadyRestart().
Definition at line 433 of file vote.qc.
References entity(), reset_map(), and warmup_stage.
Referenced by ReadyRestart_force().
Definition at line 351 of file vote.qc.
References accuracy_reset(), CS(), entity(), FL_PROJECTILE, FOREACH_CLIENT, FOREACH_ENTITY_FLOAT_ORDERED, FOREACH_ENTITY_ORDERED, game_starttime, game_stopped, Inventory_clear(), Inventory_update(), IS_BOT_CLIENT, IS_CLIENT, IS_NOT_A_CLIENT, IS_PLAYER, MUTATOR_CALLHOOK, player_powerups_remove_all(), PlayerStats_GameReport_Reset_All(), PS, pure_data, PutClientInServer, round_handler_IsActive, round_handler_Reset(), Score_ClearAll(), shuffleteams(), shuffleteams_on_reset_map, time, W_NextWeapon(), and weaponentities.
Referenced by ReadyRestart_force(), ReadyRestart_think(), and round_handler_Think().
Definition at line 672 of file vote.qc.
References autocvar_sv_vote_override_mostrecent, entity(), Map_IsRecent(), MapInfo_CheckMap(), MapInfo_FixName(), print_to(), strcat(), and string_null.
Referenced by GameCommand_nextmap(), and VoteCommand_parse().
| void VoteAccept | ( | ) |
Definition at line 171 of file vote.qc.
References bprint(), localcmd(), NULL, OriginalCallerName(), Send_Notification(), strcat(), vote_called, vote_called_command, vote_called_display, vote_caller, VOTE_MASTER, and VoteReset().
Referenced by VoteCount().
Definition at line 1431 of file vote.qc.
References argv(), CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, entity(), GetCommandPrefix(), print_to(), strcat(), VoteCommand_macro_command(), and VoteCommand_macro_help().
Referenced by COMMON_COMMAND().
Definition at line 940 of file vote.qc.
References autocvar_g_voteban_list, autocvar_sv_vote_change, autocvar_sv_vote_singlecount, CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, entity(), GetCommandPrefix(), msg_entity, PlayerInList(), print_to(), Send_Notification(), strcat(), vote_called, VOTE_SELECT_ABSTAIN, VOTE_SELECT_NULL, and VoteCount().
Definition at line 986 of file vote.qc.
References autocvar_g_voteban_list, autocvar_sv_eventlog, autocvar_sv_vote_call, autocvar_sv_vote_commands, autocvar_sv_vote_debug, autocvar_sv_vote_gamestart, autocvar_sv_vote_timeout, autocvar_sv_vote_wait, bprint(), ceil(), CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, entity(), FOREACH_CLIENT, ftos(), game_starttime, GameLogEcho(), GetCallerName(), GetCommandPrefix(), IS_CLIENT, IS_PLAYER, IS_REAL_CLIENT, msg_entity, Nagger_VoteChanged(), NULL, OriginalCallerName(), PlayerInList(), print_available_commands_to(), print_to(), Send_Notification(), spectators_allowed, strcat(), strzone(), time, timeout_status, vote_called, vote_called_command, vote_called_display, vote_caller, vote_caller_name, vote_endtime, VOTE_NORMAL, VOTE_NULL, vote_parsed_command, vote_parsed_display, VOTE_SELECT_ACCEPT, VoteCommand_call(), VoteCommand_checknasty(), VoteCommand_extractcommand(), VoteCommand_parse(), and VoteCount().
Referenced by VoteCommand_call().
Definition at line 623 of file vote.qc.
References entity(), VC_ASGNMNT_BOTH, VC_ASGNMNT_CLIENTONLY, and VC_ASGNMNT_SERVERONLY.
Definition at line 700 of file vote.qc.
References argv(), cvar_string(), CVAR_TYPEFLAG_EXISTS, LOG_INFO, stof(), strcat(), strlen, strstrofs, and substring().
Referenced by VoteCommand_parse().
Definition at line 663 of file vote.qc.
References strstrofs, and VoteCommand_checkreplacements().
Referenced by VoteCommand_parse().
Definition at line 644 of file vote.qc.
References strstrofs.
Referenced by VoteCommand_call(), and VoteCommand_master().
Definition at line 653 of file vote.qc.
References strcat().
Referenced by VoteCommand_checkinlist().
Definition at line 634 of file vote.qc.
References argv_end_index, argv_start_index, and substring().
Referenced by VoteCommand_call(), and VoteCommand_master().
Definition at line 1415 of file vote.qc.
References CMD_REQUEST_COMMAND, entity(), and VOTE_COMMANDS.
Referenced by VoteCommand().
Definition at line 1382 of file vote.qc.
References argv(), CMD_REQUEST_USAGE, cvar_string(), CVAR_TYPEFLAG_EXISTS, entity(), GetCommandPrefix(), print_available_commands_to(), print_to(), strcat(), VOTE_COMMANDS, and wordwrap_sprint().
Referenced by VoteCommand().
Definition at line 1093 of file vote.qc.
References argv(), autocvar_sv_eventlog, autocvar_sv_vote_commands, autocvar_sv_vote_master, autocvar_sv_vote_master_callable, autocvar_sv_vote_master_commands, autocvar_sv_vote_master_password, autocvar_sv_vote_timeout, autocvar_sv_vote_wait, bprint(), CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, entity(), ftos(), GameLogEcho(), GetCallerName(), GetCommandPrefix(), IS_PLAYER, localcmd(), Nagger_VoteChanged(), OriginalCallerName(), print_to(), spectators_allowed, strcat(), strtolower(), strzone(), time, timeout_status, vote_called, vote_called_command, vote_called_display, vote_caller, vote_caller_name, vote_endtime, VOTE_MASTER, vote_parsed_command, vote_parsed_display, VOTE_SELECT_ACCEPT, VoteCommand_checknasty(), VoteCommand_extractcommand(), VoteCommand_master(), VoteCommand_parse(), and VoteCount().
Referenced by VoteCommand_master().
Definition at line 1213 of file vote.qc.
References autocvar_g_voteban_list, autocvar_sv_vote_change, autocvar_sv_vote_no_stops_vote, autocvar_sv_vote_singlecount, CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, entity(), GetCommandPrefix(), msg_entity, PlayerInList(), print_to(), Send_Notification(), strcat(), vote_called, vote_caller, VOTE_SELECT_NULL, VOTE_SELECT_REJECT, VoteCount(), and VoteStop().
| int VoteCommand_parse | ( | entity | caller, |
| string | vote_command, | ||
| string | vote_list, | ||
| float | startpos, | ||
| int | argc ) |
Definition at line 774 of file vote.qc.
References argv(), argv_start_index, autocvar_g_ban_default_bantime, autocvar_g_ban_default_masksize, autocvar_sv_vote_limit, autocvar_timelimit_max, autocvar_timelimit_min, entity(), etof, ftos(), GetClientErrorString, GetIndexedEntity(), MUT_VOTEPARSE_CONTINUE, MUT_VOTEPARSE_INVALID, MUT_VOTEPARSE_SUCCESS, MUT_VOTEPARSE_UNACCEPTABLE, MUTATOR_CALLHOOK, next_token, print_to(), stof(), strcat(), strlen, strzone(), substring(), ValidateMap(), VerifyClientEntity(), vote_parsed_command, vote_parsed_display, VoteCommand_checkargs(), VoteCommand_checkinlist(), and warmup_stage.
Referenced by VoteCommand_call(), and VoteCommand_master().
Definition at line 1258 of file vote.qc.
References CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, entity(), GetCommandPrefix(), OriginalCallerName(), print_to(), strcat(), vote_called, and vote_called_display.
Definition at line 1280 of file vote.qc.
References CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, entity(), GetCommandPrefix(), print_to(), strcat(), vote_called, vote_caller, and VoteStop().
Definition at line 1302 of file vote.qc.
References autocvar_g_voteban_list, autocvar_sv_vote_change, autocvar_sv_vote_singlecount, CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, entity(), GetCommandPrefix(), msg_entity, PlayerInList(), print_to(), Send_Notification(), strcat(), vote_called, VOTE_SELECT_ACCEPT, VOTE_SELECT_NULL, and VoteCount().
Definition at line 220 of file vote.qc.
References autocvar_sv_vote_debug, autocvar_sv_vote_majority_factor, autocvar_sv_vote_majority_factor_of_voted, autocvar_sv_vote_master_playerlimit, bound(), floor(), FOREACH_CLIENT, INGAME, IS_PLAYER, IS_REAL_CLIENT, min(), Nagger_VoteCountChanged(), print_to(), spectators_allowed, time, vote_abstain_count, vote_accept_count, vote_called, vote_caller, vote_endtime, VOTE_MASTER, vote_needed_overall, vote_reject_count, VOTE_SELECT_ABSTAIN, VOTE_SELECT_ACCEPT, VOTE_SELECT_REJECT, VoteAccept(), VoteReject(), VoteReset(), VoteSpam(), and VoteTimeout().
Referenced by ClientDisconnect(), PutObserverInServer(), VoteCommand_abstain(), VoteCommand_call(), VoteCommand_master(), VoteCommand_no(), VoteCommand_yes(), and VoteThink().
| void VoteReject | ( | ) |
Definition at line 184 of file vote.qc.
References bprint(), NULL, OriginalCallerName(), Send_Notification(), vote_called_display, and VoteReset().
Referenced by VoteCount().
Definition at line 129 of file vote.qc.
References FOREACH_CLIENT, Nagger_VoteChanged(), NULL, strfree, string_null, vote_called, vote_called_command, vote_called_display, vote_caller, vote_caller_name, vote_endtime, VOTE_NULL, vote_parsed_command, vote_parsed_display, and VoteStop().
Referenced by InitGameplayMode(), NextLevel(), ReadyRestart_force(), VoteAccept(), VoteCount(), VoteReject(), VoteStop(), and VoteTimeout().
Definition at line 198 of file vote.qc.
References autocvar_sv_eventlog, bprint(), ftos(), GameLogEcho(), result, strcat(), vote_abstain_count, vote_accept_count, and vote_reject_count.
Referenced by VoteCount().
Definition at line 156 of file vote.qc.
References autocvar_sv_eventlog, autocvar_sv_vote_stop, bprint(), entity(), ftos(), GameLogEcho(), GetCallerName(), OriginalCallerName(), strcat(), time, vote_caller, and VoteReset().
Referenced by VoteCommand_no(), VoteCommand_stop(), and VoteReset().
| void VoteThink | ( | ) |
Definition at line 336 of file vote.qc.
References time, vote_endtime, and VoteCount().
Referenced by CheckRules_World().
| void VoteTimeout | ( | ) |
Definition at line 191 of file vote.qc.
References bprint(), NULL, OriginalCallerName(), Send_Notification(), vote_called_display, and VoteReset().
Referenced by VoteCount().