Fix inconsistency and speed up identify

This commit is contained in:
aUniqueUser 2020-08-20 07:19:43 -04:00 committed by GitHub
parent 02a67a2111
commit 7cbb2be8bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,7 @@ void sendAchievementKv(int value)
void sendDrawlineKv(float x_value, float y_value)
{
KeyValues *kv = new KeyValues("cl_drawline");
kv->SetInt("panel", 0);
kv->SetInt("panel", 2);
kv->SetInt("line", 0);
kv->SetFloat("x", x_value);
kv->SetFloat("y", y_value);
@ -230,13 +230,13 @@ static InitRoutine run_identify([]() {
sendIdentifyMessage(true, true);
send_achievement_reply = false;
}
if (send_drawline_reply && reply_timer.test_and_set(2000))
if (send_drawline_reply && reply_timer.test_and_set(1000))
{
sendIdentifyMessage(true, false);
send_drawline_reply = false;
}
// Wait 30 seconds between identifies
if (!*identify || CE_BAD(LOCAL_E) || !identify_timer.test_and_set(1000 * 30))
// It is safe to send every 15ish seconds, small packet
if (!*identify || CE_BAD(LOCAL_E) || !identify_timer.test_and_set(15000))
return;
sendIdentifyMessage(false, false);
},