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
|
|
@ -3357,7 +3357,7 @@ edict_t *Bot::lookupButton (StringRef target, bool blindTest) {
|
|||
const Vector &pos = game.getEntityOrigin (ent);
|
||||
|
||||
if (!blindTest) {
|
||||
game.testLine (pev->origin, pos, TraceIgnore::Monsters, pev->pContainingEntity, &tr);
|
||||
game.testLine (pev->origin, pos, TraceIgnore::Monsters, this->ent (), &tr);
|
||||
}
|
||||
|
||||
// check if this place safe
|
||||
|
|
@ -3449,11 +3449,6 @@ void Bot::findShortestPath (int srcIndex, int destIndex) {
|
|||
void Bot::syncFindPath (int srcIndex, int destIndex, FindPath pathType) {
|
||||
// this function finds a path from srcIndex to destIndex;
|
||||
|
||||
// stale bots shouldn't do pathfinding
|
||||
if (m_isStale) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!m_pathFindLock.tryLock ()) {
|
||||
return; // allow only single instance of syncFindPath per-bot
|
||||
}
|
||||
|
|
@ -3559,6 +3554,11 @@ void Bot::syncFindPath (int srcIndex, int destIndex, FindPath pathType) {
|
|||
}
|
||||
|
||||
void Bot::findPath (int srcIndex, int destIndex, FindPath pathType /*= FindPath::Fast */) {
|
||||
// stale bots shouldn't do pathfinding
|
||||
if (m_isStale) {
|
||||
return;
|
||||
}
|
||||
|
||||
worker.enqueue ([this, srcIndex, destIndex, pathType] () {
|
||||
syncFindPath (srcIndex, destIndex, pathType);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue