From 12ba178c7684f0e12a5a6076839e6133050d3358 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Thu, 24 Nov 2022 01:12:36 +1000 Subject: [PATCH] Update the types of some voting related globals and fields --- qcsrc/server/command/vote.qc | 2 +- qcsrc/server/command/vote.qh | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 23656d2f7..4b42b5667 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -158,7 +158,7 @@ void VoteAccept() { bprint("\{1}^2* ^3", OriginalCallerName(), "^2's vote for ^1", vote_called_display, "^2 was accepted\n"); - if ((vote_called == VOTE_MASTER) && vote_caller) vote_caller.vote_master = 1; + if ((vote_called == VOTE_MASTER) && vote_caller) vote_caller.vote_master = true; else localcmd(strcat(vote_called_command, "\n")); if (vote_caller) vote_caller.vote_waittime = 0; // people like your votes, you don't need to wait to vote again diff --git a/qcsrc/server/command/vote.qh b/qcsrc/server/command/vote.qh index d92c6a065..e7ca0c87e 100644 --- a/qcsrc/server/command/vote.qh +++ b/qcsrc/server/command/vote.qh @@ -40,15 +40,15 @@ const float VOTE_MASTER = 2; // global vote information declarations entity vote_caller; // original caller of the current vote string vote_caller_name; // name of the vote caller -float vote_called; // stores status of current vote (See VOTE_*) +int vote_called; // stores status of current vote (See VOTE_*) float vote_endtime; // time when the vote is finished -float vote_accept_count; // total amount of players who accept the vote (counted by VoteCount() function) -float vote_reject_count; // same as above, but rejected -float vote_abstain_count; // same as above, but abstained -float vote_needed_overall; // total amount of players NEEDED for a vote to pass (based on sv_vote_majority_factor) -.float vote_master; // flag for if the player has vote master privelages +int vote_accept_count; // total amount of players who accept the vote (counted by VoteCount() function) +int vote_reject_count; // same as above, but rejected +int vote_abstain_count; // same as above, but abstained +int vote_needed_overall; // total amount of players NEEDED for a vote to pass (based on sv_vote_majority_factor) +.bool vote_master; // flag for if the player has vote master privileges .float vote_waittime; // flag for how long the player must wait before they can vote again -.float vote_selection; // flag for which vote selection the player has made (See VOTE_SELECT_*) +.int vote_selection; // flag for which vote selection the player has made (See VOTE_SELECT_*) string vote_called_command; // command sent by client string vote_called_display; // visual string of command sent by client string vote_parsed_command; // command which is fixed after being parsed -- 2.39.2