hearing: randomize listen position for heard sounds

graph: restore cvar variables values to initial values when disabling graph editor
cfg: update primary config with actual cvars
vision: remove unnecessary angles clamp
combat: allow to disable engine potential visibility checks
combat: do not aim to head on long distances with AWP, shotguns or with high recoil
bot: set the minimum think fps to 30.0
This commit is contained in:
jeefo 2024-04-11 16:26:12 +03:00
commit cc01693de9
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
11 changed files with 110 additions and 46 deletions

View file

@ -427,8 +427,8 @@ namespace TaskPri {
constexpr auto kInfiniteDistance = 9999999.0f;
constexpr auto kInvalidLightLevel = kInfiniteDistance;
constexpr auto kGrenadeCheckTime = 0.6f;
constexpr auto kSprayDistance = 260.0f;
constexpr auto kDoubleSprayDistance = kSprayDistance * 2;
constexpr auto kSprayDistance = 360.0f;
constexpr auto kSprayDistanceX2 = kSprayDistance * 2;
constexpr auto kMaxChatterRepeatInterval = 99.0f;
constexpr auto kViewFrameUpdate = 1.0f / 30.0f;
constexpr auto kGrenadeDamageRadius = 385.0f;

View file

@ -63,6 +63,13 @@ public:
{ }
};
// save old values of changed cvars to revert them back when editing turned off
struct GraphSaveVarValue {
float timelimit {};
float freezetime {};
float roundtime {};
} m_graphSaveVarValues;
private:
StringArray m_args {};
Array <BotCmd> m_cmds {};

View file

@ -790,6 +790,11 @@ private:
return m_weaponType == WeaponType::Sniper;
}
// returns true if bot is using a sniper rifle (awp)
bool usesSniperAWP () const {
return m_currentWeapon == Weapon::AWP;
}
// returns true if bot is using a rifle
bool usesRifle () const {
return usesZoomableRifle () || m_weaponType == WeaponType::Rifle;
@ -834,6 +839,11 @@ private:
bool usesKnife () const {
return m_weaponType == WeaponType::Melee;
}
// checks if weapon recoil is high
bool isRecoilHigh () const {
return pev->punchangle.x < -1.45f;
}
};
#include "config.h"