From 59c3ff89858bba2c91b57d3627c1952e11a7515c Mon Sep 17 00:00:00 2001 From: BenCat07 Date: Fri, 24 Jun 2022 15:30:07 +0200 Subject: [PATCH] 54285adf Fix a bunch of issues due to the newest update --- src/votelogger.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/votelogger.cpp b/src/votelogger.cpp index 3fa935e0..57fa195c 100644 --- a/src/votelogger.cpp +++ b/src/votelogger.cpp @@ -79,8 +79,7 @@ void dispatchUserMessage(bf_read &buffer, int type) // TODO: Add always vote no/vote no on friends. Cvar is "vote option2" was_local_player = false; int team = buffer.ReadByte(); - // Some 4 bytes that are unknown currently. - int unk = buffer.ReadLong(); + int vote_id = buffer.ReadLong(); int caller = buffer.ReadByte(); char reason[64]; char name[64]; @@ -115,14 +114,14 @@ void dispatchUserMessage(bf_read &buffer, int type) if (*vote_kickn && friendly_kicked) { - vote_command = { "vote option2", 1000u + (rand() % 5000) }; + vote_command = { strfmt("vote %d option2", vote_id).get(), 1000u + (rand() % 5000) }; vote_command.timer.update(); if (*vote_rage_vote && !friendly_caller) pl_caller.state = k_EState::RAGE; } else if (*vote_kicky && !friendly_kicked) { - vote_command = { "vote option1", 1000u + (rand() % 5000) }; + vote_command = { strfmt("vote %d option1", vote_id).get(), 1000u + (rand() % 5000) }; vote_command.timer.update(); } }