Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix kick message appearing for map change #3513

Merged
merged 1 commit into from
Nov 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/multivote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,6 @@ static bool sendVoteRequest(NetVoteType type, uint32_t voteID = 0, uint32_t targ
NETuint8_t(&voteType);
NETend();

std::string outputMsg = astringf(_("Starting vote to kick player: %s"), getPlayerName(targetPlayer));
addConsoleMessage(outputMsg.c_str(), DEFAULT_JUSTIFY, SYSTEM_MESSAGE, false);
debug(LOG_INFO, "Starting vote to kick player: %s", getPlayerName(targetPlayer));

return true;
}

Expand Down Expand Up @@ -644,7 +640,7 @@ void processPendingKickVotes()
if (realTime - it->start_time >= PENDING_KICK_VOTE_TIMEOUT_MS)
{
// pending vote timed-out

// double-check if pending vote has a result (this might have changed if other players left)
if (!handleVoteKickResult(*it))
{
Expand Down Expand Up @@ -704,6 +700,10 @@ bool startKickVote(uint32_t targetPlayer)
// Initiate a network vote
sendVoteRequest(NetVoteType::KICK_PLAYER, pendingVote.unique_vote_id, pendingVote.target_player_id);

std::string outputMsg = astringf(_("Starting vote to kick player: %s"), getPlayerName(targetPlayer));
addConsoleMessage(outputMsg.c_str(), DEFAULT_JUSTIFY, SYSTEM_MESSAGE, false);
debug(LOG_INFO, "Starting vote to kick player: %s", getPlayerName(targetPlayer));

lastKickVoteForEachPlayer[targetPlayer] = realTime;
return true;
}
Expand Down
Loading