fix: pingfaker overwrites pings for real players (resolves #572)

fix: crash bug introduced in #569
This commit is contained in:
jeefo 2024-05-22 11:13:52 +03:00
commit ee964e0c9a
No known key found for this signature in database
GPG key ID: D696786B81B667C8
14 changed files with 322 additions and 188 deletions

View file

@ -8,9 +8,6 @@
#pragma once
class BotSupport final : public Singleton <BotSupport> {
private:
mutable Mutex m_cs {};
private:
bool m_needToSendWelcome {};
float m_welcomeReceiveTime {};
@ -70,21 +67,6 @@ public:
// update stats on clients
void updateClients ();
// generates ping bitmask for SVC_PINGS message
int getPingBitmask (edict_t *ent, int loss, int ping);
// calculate our own pings for all the players
void syncCalculatePings ();
// calculate our own pings for all the players
void calculatePings ();
// send modified pings to all the clients
void emitPings (edict_t *to);
// reset ping to zero values
void resetPings (edict_t *to);
// checks if same model omitting the models directory
bool isModel (const edict_t *ent, StringRef model);