From: bones_was_here Date: Fri, 2 May 2025 19:55:27 +0000 (+1000) Subject: vstop: clarify chatcon messages X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1930eb74c0ace2094660661b2dd647f98709ac24;p=xonotic%2Fxonotic-data.pk3dir.git vstop: clarify chatcon messages Distinguishes between self-stopped and cancelled by code such as NextLevel(). --- diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index 8ec7e9f6d6..799ce15948 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -155,10 +155,13 @@ void VoteReset(bool verbose) void VoteStop(entity stopper, bool canceled) { - if (canceled) + if (canceled) // Code such as NextLevel() stopped it, not a direct action by a human. bprint("\{1}^2* ^3", OriginalCallerName(), "^2's vote was canceled\n"); + else if (stopper == vote_caller) + bprint("\{1}^2* ^3", OriginalCallerName(), "^2 stopped their vote\n"); else bprint("\{1}^2* ^3", GetCallerName(stopper), "^2 stopped ^3", OriginalCallerName(), "^2's vote\n"); + if (autocvar_sv_eventlog) GameLogEcho(strcat(":vote:vstop:", ftos(stopper.playerid))); // Don't force them to wait for next vote, this way they can e.g. correct their vote. if ((vote_caller) && (stopper == vote_caller)) vote_caller.vote_waittime = time + autocvar_sv_vote_stop; @@ -1202,7 +1205,7 @@ void VoteCommand_no(int request, entity caller) // CLIENT ONLY } else if (caller == vote_caller && autocvar_sv_vote_no_stops_vote) { - VoteStop(caller, true); + VoteStop(caller, false); } else // everything went okay, continue changing vote