fakequeries: fixed hooking problems on certain providers

linkage: added support for fake steam ids for bots controlled via yb_enable_fake_steamids)

note that fake steam ids just used for give ability server owners to run statistics modules with tracking by steam ids ant not nicknames.
This commit is contained in:
jeefo 2024-01-19 18:29:20 +03:00
commit 1dc1043f7d
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
5 changed files with 42 additions and 1 deletions

View file

@ -87,7 +87,7 @@ private:
using SendToProto = decltype (sendto);
private:
Detour <SendToProto> m_sendToDetour { };
Detour <SendToProto> m_sendToDetour { }, m_sendToDetourSys {};
public:
ServerQueryHook () = default;
@ -100,6 +100,7 @@ public:
public:
// disables send hook
bool disable () {
m_sendToDetourSys.restore ();
return m_sendToDetour.restore ();
}

View file

@ -88,6 +88,9 @@ public:
// get the current date and time as string
String getCurrentDateTime ();
// generates fake steam id from bot name
StringRef getFakeSteamId (edict_t *ent);
// get's the wave length
float getWaveLength (StringRef filename);