fix: android builds unable to load anything due to #498

fix: simd sse4.2 is now required for _mm_dp_ps, due to strange behavior on some cpus (ref #506)
refactor: cosmetic changes all over the code
linkage: do not flush linkent export table on changelevel
manager: do not allow to create bots while analyzing map
conifg: notify user about probably outdated configs, not just error in config file
This commit is contained in:
jeefo 2024-01-26 19:52:00 +03:00
commit d234a3f156
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED
15 changed files with 91 additions and 55 deletions

View file

@ -188,7 +188,7 @@ bool Bot::checkBodyParts (edict_t *target) {
return true;
}
Vector dir = (target->v.origin - pev->origin).normalize2d ();
Vector dir = (target->v.origin - pev->origin).normalize2d_apx ();
Vector perp (-dir.y, dir.x, 0.0f);
spot = target->v.origin + Vector (perp.x * kEdgeOffset, perp.y * kEdgeOffset, 0);
@ -675,9 +675,10 @@ bool Bot::isPenetrableObstacle (const Vector &dest) {
obstacleDistanceSq = tr.vecEndPos.distanceSq (source);
}
}
constexpr float kMaxDistanceSq = cr::sqrf (75.0f);
if (obstacleDistanceSq > 0.0f) {
constexpr float kMaxDistanceSq = cr::sqrf (75.0f);
while (power > 0) {
if (obstacleDistanceSq > kMaxDistanceSq) {
obstacleDistanceSq -= kMaxDistanceSq;
@ -1214,6 +1215,9 @@ void Bot::attackMovement () {
else if (usesKnife ()) {
m_fightStyle = Fight::Strafe;
}
else if (usesKnife () && isInViewCone (m_enemy->v.origin) && game.is (GameFlags::CSDM) && !isInNarrowPlace ()) {
m_fightStyle = Fight::Strafe;
}
else {
m_fightStyle = Fight::Stay;
}