fix: bot kick menu isn't functional
nav: probably fix for ladder climbing (ref #544 ref #319) bot: implemented [RSE] Neoptolemus's fix for msec calculation (round vs int cast)
This commit is contained in:
parent
4128b27cf4
commit
df9bc66023
6 changed files with 52 additions and 23 deletions
|
|
@ -226,7 +226,7 @@ void Bot::setAimDirection () {
|
|||
if (onLadder && m_pathWalk.hasNext ()) {
|
||||
const auto &nextPath = graph[m_pathWalk.next ()];
|
||||
|
||||
if ((nextPath.flags & NodeFlag::Ladder) && m_destOrigin.distanceSq (pev->origin) < cr::sqrf (120.0f) && nextPath.origin.z > m_pathOrigin.z + 30.0f) {
|
||||
if ((nextPath.flags & NodeFlag::Ladder) && m_destOrigin.distanceSq (pev->origin) < cr::sqrf (128.0f) && nextPath.origin.z > m_pathOrigin.z + 30.0f) {
|
||||
m_lookAt = nextPath.origin;
|
||||
}
|
||||
}
|
||||
|
|
@ -357,8 +357,10 @@ void Bot::changeYaw (float speed) {
|
|||
}
|
||||
|
||||
void Bot::updateBodyAngles () {
|
||||
constexpr float kValue = 1.0f / 3.0f;
|
||||
|
||||
// set the body angles to point the gun correctly
|
||||
pev->angles.x = -pev->v_angle.x * (1.0f / 3.0f);
|
||||
pev->angles.x = -pev->v_angle.x * kValue;
|
||||
pev->angles.y = pev->v_angle.y;
|
||||
|
||||
pev->angles.clampAngles ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue