Better vote timer (#1754)
* Better vote timer * autism * Update votelogger.cpp
This commit is contained in:
parent
d63edfdf0e
commit
dd51504a76
@ -71,9 +71,18 @@ void dispatchUserMessage(bf_read &buffer, int type)
|
||||
switch (type)
|
||||
{
|
||||
case 45:
|
||||
{
|
||||
// Vote setup Failed, Refresh vote timer for catbot so it can try again
|
||||
hacks::shared::catbot::timer_votekicks.last -= std::chrono::seconds(4);
|
||||
int reason = buffer.ReadByte();
|
||||
int cooldown = buffer.ReadShort();
|
||||
int delay = 4;
|
||||
|
||||
if ( reason == 2 ) // VOTE_FAILED_RATE_EXCEEDED
|
||||
delay = cooldown;
|
||||
|
||||
hacks::shared::catbot::timer_votekicks.last -= std::chrono::seconds(delay);
|
||||
break;
|
||||
}
|
||||
case 46:
|
||||
{
|
||||
// TODO: Add always vote no/vote no on friends. Cvar is "vote option2"
|
||||
|
Reference in New Issue
Block a user