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:
parent
0f9e890509
commit
1dc1043f7d
5 changed files with 42 additions and 1 deletions
|
|
@ -68,6 +68,11 @@ void ServerQueryHook::init () {
|
|||
return;
|
||||
}
|
||||
|
||||
// do not detour twice
|
||||
if (m_sendToDetour.detoured () || m_sendToDetourSys.detoured ()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// do not enable on not dedicated server
|
||||
if (!game.isDedicated ()) {
|
||||
return;
|
||||
|
|
@ -83,12 +88,17 @@ void ServerQueryHook::init () {
|
|||
sendToAddress = address;
|
||||
}
|
||||
}
|
||||
m_sendToDetourSys.initialize ("ws2_32.dll", "sendto", sendto);
|
||||
}
|
||||
m_sendToDetour.initialize ("ws2_32.dll", "sendto", sendToAddress);
|
||||
|
||||
// enable only on modern games
|
||||
if (!game.is (GameFlags::Legacy) && (plat.nix || plat.win) && !plat.isNonX86 () && !m_sendToDetour.detoured ()) {
|
||||
m_sendToDetour.install (reinterpret_cast <void *> (BotSupport::sendTo), true);
|
||||
|
||||
if (!m_sendToDetourSys.detoured ()) {
|
||||
m_sendToDetourSys.install (reinterpret_cast <void *> (BotSupport::sendTo), true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue