]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Only play 'vote now' announcement if the vote hasn't already passed
authorMario <mario@smbclan.net>
Tue, 2 Oct 2018 17:24:22 +0000 (03:24 +1000)
committerMario <mario@smbclan.net>
Tue, 2 Oct 2018 17:24:22 +0000 (03:24 +1000)
qcsrc/server/command/vote.qc

index 1cb26d1fdeea47b3200bbdefee5fcb1ec6a1e6cf..51cf55ce3a1de3ee3c83cc027348ae803f7e072e 100644 (file)
@@ -835,14 +835,15 @@ void VoteCommand_call(int request, entity caller, int argc, string vote_command)
                                }
 
                                FOREACH_CLIENT(IS_REAL_CLIENT(it), { ++tmp_playercount; });
-                               if (tmp_playercount > 1)
-                                       Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_VOTE_CALL);
 
                                bprint("\{1}^2* ^3", OriginalCallerName(), "^2 calls a vote for ", vote_called_display, "\n");
                                if (autocvar_sv_eventlog)
                                        GameLogEcho(strcat(":vote:vcall:", ftos(vote_caller.playerid), ":", vote_called_display));
                                Nagger_VoteChanged();
                                VoteCount(true);  // needed if you are the only one
+
+                               if (tmp_playercount > 1 && vote_called != VOTE_NULL)
+                                       Send_Notification(NOTIF_ALL, NULL, MSG_ANNCE, ANNCE_VOTE_CALL);
                        }
 
                        return;