fix: crash with hl25 structs on xash3d again
fix: %t placeholder should return damage inflictor when used in team attack section of chat fix: all arguments in bot commands are lowercased (resolves #680) bot: disable threads when engine's timescale is active bot: a little refactor for the code all over the places linkage: resolved crash due to sse alignment on ancient engines (resolves #614) utils move wave parse into crlib practice: move loading practice to thread pool build: allow to build with static linkents instead of hooking dlsym Co-Authored-By: Max <161382234+dyspose@users.noreply.github.com>
This commit is contained in:
parent
24be4479de
commit
38c45aff9a
37 changed files with 348 additions and 304 deletions
|
|
@ -22,22 +22,21 @@ void BotFakePingManager::reset (edict_t *to) {
|
|||
if (!hasFeature ()) {
|
||||
return;
|
||||
}
|
||||
static PingBitMsg pbm {};
|
||||
|
||||
for (const auto &client : util.getClients ()) {
|
||||
if (!(client.flags & ClientFlags::Used) || util.isFakeClient (client.ent)) {
|
||||
continue;
|
||||
}
|
||||
pbm.start (client.ent);
|
||||
m_pbm.start (client.ent);
|
||||
|
||||
pbm.write (1, PingBitMsg::Single);
|
||||
pbm.write (game.indexOfPlayer (to), PingBitMsg::PlayerID);
|
||||
pbm.write (0, PingBitMsg::Ping);
|
||||
pbm.write (0, PingBitMsg::Loss);
|
||||
m_pbm.write (1, PingBitMsg::Single);
|
||||
m_pbm.write (game.indexOfPlayer (to), PingBitMsg::PlayerID);
|
||||
m_pbm.write (0, PingBitMsg::Ping);
|
||||
m_pbm.write (0, PingBitMsg::Loss);
|
||||
|
||||
pbm.send ();
|
||||
m_pbm.send ();
|
||||
}
|
||||
pbm.flush ();
|
||||
m_pbm.flush ();
|
||||
}
|
||||
|
||||
void BotFakePingManager::syncCalculate () {
|
||||
|
|
@ -107,19 +106,18 @@ void BotFakePingManager::emit (edict_t *ent) {
|
|||
if (!util.isPlayer (ent)) {
|
||||
return;
|
||||
}
|
||||
static PingBitMsg pbm {};
|
||||
|
||||
for (const auto &bot : bots) {
|
||||
pbm.start (ent);
|
||||
m_pbm.start (ent);
|
||||
|
||||
pbm.write (1, PingBitMsg::Single);
|
||||
pbm.write (bot->entindex () - 1, PingBitMsg::PlayerID);
|
||||
pbm.write (bot->m_ping, PingBitMsg::Ping);
|
||||
pbm.write (0, PingBitMsg::Loss);
|
||||
m_pbm.write (1, PingBitMsg::Single);
|
||||
m_pbm.write (bot->entindex () - 1, PingBitMsg::PlayerID);
|
||||
m_pbm.write (bot->m_ping, PingBitMsg::Ping);
|
||||
m_pbm.write (0, PingBitMsg::Loss);
|
||||
|
||||
pbm.send ();
|
||||
m_pbm.send ();
|
||||
}
|
||||
pbm.flush ();
|
||||
m_pbm.flush ();
|
||||
}
|
||||
|
||||
void BotFakePingManager::restartTimer () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue