bot: fix think fps limiter when running on xash3d
aim: simplify enemy origin compensation when moving
This commit is contained in:
parent
1736bd9c8a
commit
0873975678
2 changed files with 4 additions and 3 deletions
|
|
@ -544,7 +544,7 @@ Vector Bot::getEnemyBodyOffset () {
|
|||
Vector compensation = nullptr;
|
||||
|
||||
if (!usesSniper () && !usesKnife () && distance > kSprayDistance) {
|
||||
compensation = 1.0f * m_frameInterval * m_enemy->v.velocity - 1.0f * m_frameInterval * pev->velocity;
|
||||
compensation = (m_enemy->v.velocity - pev->velocity) * m_frameInterval * 2.8f;
|
||||
compensation.z = 0.0f;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -1620,13 +1620,14 @@ void Bot::newRound () {
|
|||
if (rg.chance (50)) {
|
||||
pushChatterMessage (Chatter::NewRound);
|
||||
}
|
||||
auto updateInterval = 1.0f / cr::clamp (cv_think_fps.float_ (), 24.0f, 90.0f);
|
||||
auto thinkFps = cr::clamp (cv_think_fps.float_ (), 24.0f, 90.0f);
|
||||
auto updateInterval = 1.0f / thinkFps;
|
||||
|
||||
if (game.is (GameFlags::Xash3D)) {
|
||||
if (cv_think_fps_disable.bool_ ()) {
|
||||
updateInterval = 0.0f;
|
||||
}
|
||||
else if (updateInterval < 50.0f) {
|
||||
else if (thinkFps < 50) {
|
||||
updateInterval = 1.0f / 50.0f; // xash3d works acceptable at 50fps
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue