]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Update the types of some voting related globals and fields
authorbones_was_here <bones_was_here@xonotic.au>
Wed, 23 Nov 2022 15:12:36 +0000 (01:12 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Fri, 6 Jan 2023 07:16:33 +0000 (17:16 +1000)
qcsrc/server/command/vote.qc
qcsrc/server/command/vote.qh

index 23656d2f756716f5a9fcd87ee168bfa031864b8b..4b42b5667ea90e682fe74b5e3996ea4ff73e596c 100644 (file)
@@ -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
index d92c6a0656d05066dd0c7a182681c7ad8847b0db..e7ca0c87e4918bb1a6169e81c3e67da88ba40d2c 100644 (file)
@@ -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