Skip to content

Commit

Permalink
Fix kick message appearing for map change
Browse files Browse the repository at this point in the history
  • Loading branch information
KJeff01 committed Nov 14, 2023
1 parent d89e187 commit daa37e7
Showing 1 changed file with 5 additions and 5 deletions.
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

0 comments on commit daa37e7

Please sign in to comment.