graph: do not spam about problem

nav: tweaked stuck values and timers
This commit is contained in:
jeefo 2025-01-31 19:58:28 +03:00
commit 9b80517eda
No known key found for this signature in database
GPG key ID: D696786B81B667C8
5 changed files with 17 additions and 4 deletions

View file

@ -439,7 +439,7 @@ constexpr auto kSprayDistanceX2 = kSprayDistance * 2;
constexpr auto kMaxChatterRepeatInterval = 99.0f; constexpr auto kMaxChatterRepeatInterval = 99.0f;
constexpr auto kViewFrameUpdate = 1.0f / 25.0f; constexpr auto kViewFrameUpdate = 1.0f / 25.0f;
constexpr auto kGrenadeDamageRadius = 385.0f; constexpr auto kGrenadeDamageRadius = 385.0f;
constexpr auto kMinMovedDistance = 3.0f; constexpr auto kMinMovedDistance = 2.0f;
constexpr auto kInfiniteDistanceLong = static_cast <int> (kInfiniteDistance); constexpr auto kInfiniteDistanceLong = static_cast <int> (kInfiniteDistance);
constexpr auto kMaxWeapons = 32; constexpr auto kMaxWeapons = 32;

View file

@ -274,6 +274,9 @@ public:
// mark breakable entity as invalid // mark breakable entity as invalid
void markBreakableAsInvalid (edict_t *ent); void markBreakableAsInvalid (edict_t *ent);
// is developer mode ?
bool isDeveloperMode () const;
// public inlines // public inlines
public: public:
// get the current time on server // get the current time on server

View file

@ -1265,6 +1265,12 @@ void Game::markBreakableAsInvalid (edict_t *ent) {
m_checkedBreakables[indexOfEntity (ent)] = false; m_checkedBreakables[indexOfEntity (ent)] = false;
} }
bool Game::isDeveloperMode () const {
static ConVarRef developer { "developer" };
return developer.exists () && developer.value () > 0.0f;
}
void LightMeasure::initializeLightstyles () { void LightMeasure::initializeLightstyles () {
// this function initializes lighting information... // this function initializes lighting information...

View file

@ -465,7 +465,7 @@ void Bot::resetCollision () {
void Bot::ignoreCollision () { void Bot::ignoreCollision () {
resetCollision (); resetCollision ();
m_lastCollTime = game.time () + m_frameInterval * 4.0f; m_lastCollTime = game.time () + 0.5f;
m_checkTerrain = false; m_checkTerrain = false;
} }
@ -520,7 +520,7 @@ void Bot::doPlayerAvoidance (const Vector &normal) {
setStrafeSpeed (normal, -pev->maxspeed); setStrafeSpeed (normal, -pev->maxspeed);
} }
} }
const float interval = m_frameInterval * (!isDucking () && pev->velocity.lengthSq2d () > 0.0f ? 7.5f : 2.0f); const float interval = m_frameInterval * (!isDucking () && pev->velocity.lengthSq2d () > 0.0f ? 6.0f : 2.0f);
// use our movement angles, try to predict where we should be next frame // use our movement angles, try to predict where we should be next frame
Vector right {}, forward {}; Vector right {}, forward {};

View file

@ -85,7 +85,11 @@ template <typename U> bool BotStorage::load (SmallArray <U> &data, ExtenHeader *
if (tryReload ()) { if (tryReload ()) {
return true; return true;
} }
return error (isGraph, isDebug, file, "Unable to open %s file for reading (filename: '%s').", type.name, filename);
if (game.isDeveloperMode ()) {
return error (isGraph, isDebug, file, "Unable to open %s file for reading (filename: '%s').", type.name, filename);
}
return false;
} }
// read the header // read the header