fix: center-screen messages not appearing (fix: #446)

fix: crash when creating too much threads
refactor: fix typos in comments in headers
This commit is contained in:
jeefo 2023-05-12 22:12:22 +03:00
commit 7f4d4748fa
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
22 changed files with 105 additions and 99 deletions

View file

@ -38,8 +38,8 @@ void Game::precache () {
m_drawModels[DrawLine::Simple] = m_engineWrap.precacheModel ("sprites/laserbeam.spr");
m_drawModels[DrawLine::Arrow] = m_engineWrap.precacheModel ("sprites/arrow1.spr");
m_engineWrap.precacheSound ("weapons/xbow_hit1.wav"); // waypoint add
m_engineWrap.precacheSound ("weapons/mine_activate.wav"); // waypoint delete
m_engineWrap.precacheSound ("weapons/xbow_hit1.wav"); // node add
m_engineWrap.precacheSound ("weapons/mine_activate.wav"); // node delete
m_engineWrap.precacheSound ("common/wpn_hudon.wav"); // path add/delete done
m_mapFlags = 0; // reset map type as worldspawn is the first entity spawned
@ -474,10 +474,16 @@ uint8_t *Game::getVisibilitySet (Bot *bot, bool pvs) {
void Game::sendClientMessage (bool console, edict_t *ent, StringRef message) {
// helper to sending the client message
// do not send messages to fakeclients
// do not send messages to fake clients
if (!util.isPlayer (ent) || util.isFakeClient (ent)) {
return;
}
// if console message and destination is listenserver entity, just print via server message instead of through unreliable channel
if (console && ent == game.getLocalEntity ()) {
sendServerMessage (message);
return;
}
const String &buffer = message;
// used to split messages