]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Commiting some more work on vote updates as i'm going to sleep :D
authorSamual <samual@xonotic.org>
Thu, 1 Dec 2011 09:10:29 +0000 (04:10 -0500)
committerSamual <samual@xonotic.org>
Thu, 1 Dec 2011 09:10:29 +0000 (04:10 -0500)
qcsrc/server/clientcommands.qc
qcsrc/server/vote.qc

index ffe5963120bcd5ecce71197eb8940735bef85436..a4f08e8dde17ecff38bfd1b232597e4166dcfc28 100644 (file)
@@ -839,7 +839,7 @@ void ClientCommand_voice(float request, float argc, string command)
 }
 
 /* use this when creating a new command, making sure to place it in alphabetical order.
-void ClientCommand_(float request)ClientCommand_getmapvotepic(request, arguments)
+void ClientCommand_(float request)
 {
        switch(request)
        {
@@ -894,7 +894,7 @@ void ClientCommand_(float request)ClientCommand_getmapvotepic(request, arguments
        CLIENT_COMMAND("timein", ClientCommand_timein(request), "Resume the game from being paused with a timeout") \
        CLIENT_COMMAND("timeout", ClientCommand_timeout(request), "Call a timeout which pauses the game for certain amount of time unless unpaused") \
        CLIENT_COMMAND("voice", ClientCommand_voice(request, arguments, command), "Send voice message via sound") \
-       CLIENT_COMMAND("vote", VoteCommand(self, arguments), "Request an action to be voted upon by players") \
+       CLIENT_COMMAND("vote", VoteCommand(self, arguments), "Request an action to be voted upon by players") \ // handled in server/vote.qc
        /* nothing */
        
 void ClientCommand_macro_help()
index e0d4a469a5af84f2fa592a3fe2be9779dd85d965..9b029e34382fa152544ca69eadca541a5a24d3c7 100644 (file)
 //  Misc. Supporting Functions
 // ============================
 
+float Votecommand_check_assignment(entity caller, float assignment)
+{
+       float from_server = (!caller);
+       
+       if((assignment == VC_ASGNMNT_BOTH) 
+               || ((!from_server && assignment == VC_ASGNMNT_CLIENTONLY) 
+               || (from_server && assignment == VC_ASGNMNT_SERVERONLY)))
+       {
+               print("check_assignment returned true\n");
+               return TRUE;
+       }
+       
+       print("check_assignment returned false\n");
+       return FALSE;
+}
+
+string VoteCommand_
+
 float Nagger_SendEntity(entity to, float sendflags)
 {
        float nags, i, f, b;
@@ -422,24 +440,11 @@ void VoteCommand_(float request)
 // Do not hard code aliases for these, instead create them in commands.cfg... also: keep in alphabetical order, please ;)
 #define VOTE_COMMANDS(request,caller,arguments) \
        VOTE_COMMAND("abstain", VoteCommand_abstain(request, caller), "", VC_ASGNMNT_CLIENTONLY) \
+       VOTE_COMMAND("help", VoteCommand_help(caller), "", VC_ASGNMNT_BOTH) \
        VOTE_COMMAND("stop", VoteCommand_stop(request, caller), "", VC_ASGNMNT_BOTH) \
        //VOTE_COMMAND("", VoteCommand_(request, caller, arguments), "", ) \
        /* nothing */
 
-float Votecommand_check_assignment(entity caller, float assignment)
-{
-       float from_server = (!caller);
-       
-       if((assignment == VC_ASGNMNT_BOTH) 
-               || ((!from_server && assignment == VC_ASGNMNT_CLIENTONLY) 
-               || (from_server && assignment == VC_ASGNMNT_SERVERONLY)))
-       {
-               return TRUE;
-       }
-       
-       return FALSE;
-}
-
 void VoteCommand_macro_help(entity caller)
 {
        print("\nUsage:^3 cmd vote COMMAND...^7, where possible commands are:\n");