chatlib: do not send chat messages to controlled bots

graph: first try more memory friendly bsp size check
build: restore ssse3 & ssse3 instructions (use nosmid version if needed)
Co-Authored-By: Max <161382234+dyspose@users.noreply.github.com>
This commit is contained in:
jeefo 2025-02-28 00:39:52 +03:00
commit 855fb903b6
No known key found for this signature in database
GPG key ID: D696786B81B667C8
13 changed files with 76 additions and 41 deletions

View file

@ -281,7 +281,7 @@ public:
// bot async worker wrapper
class BotThreadWorker final : public Singleton <BotThreadWorker> {
private:
ThreadPool m_botWorker {};
UniquePtr <ThreadPool> m_pool {};
public:
explicit BotThreadWorker () = default;
@ -297,12 +297,12 @@ public:
fn (); // no threads, no fun, just run task in current thread
return;
}
m_botWorker.enqueue (cr::move (fn));
m_pool->enqueue (cr::move (fn));
}
public:
bool available () {
return m_botWorker.threadCount () > 0;
return m_pool && m_pool->threadCount () > 0;
}
};

View file

@ -57,6 +57,7 @@ private:
private:
int m_retries {};
ULZ *m_ulz {};
public:
BotStorage () = default;
@ -95,6 +96,11 @@ public:
void resetRetries () {
m_retries = 0;
}
// set the compressor instance
void setUlzInstance (ULZ *ulz) {
m_ulz = ulz;
}
};
#if !defined (BOT_STORAGE_EXPLICIT_INSTANTIATIONS)

View file

@ -188,9 +188,8 @@ public:
m_path[0] = 0;
}
void init (int32_t length) {
const auto allocSize = static_cast <uint32_t> (length);
m_path = cr::makeUnique <int32_t[]> (allocSize);
void init (size_t length) {
m_path = cr::makeUnique <int32_t[]> (length);
}
};
@ -320,7 +319,7 @@ private:
Fight m_fightStyle {}; // combat style to use
CollisionState m_collisionState {}; // collision State
FindPath m_pathType {}; // which pathfinder to use
uint8_t m_enemyParts {}; // visibility flags
int8_t m_enemyParts {}; // visibility flags
uint16_t m_modelMask {}; // model mask bits
UniquePtr <class AStarAlgo> m_planner {};