From 1930eb74c0ace2094660661b2dd647f98709ac24 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Sat, 3 May 2025 05:55:27 +1000 Subject: [PATCH] vstop: clarify chatcon messages Distinguishes between self-stopped and cancelled by code such as NextLevel(). --- qcsrc/server/command/vote.qc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.39.5