fix: crash bug introduced in latest commit (resolves #630)
fix: unnecessary assignments here and there
This commit is contained in:
parent
3d0bb4d7da
commit
3d84b96534
3 changed files with 7 additions and 12 deletions
|
|
@ -286,7 +286,6 @@ void Bot::updateLookAnglesNewbie (const Vector &direction, float delta) {
|
|||
const float offsetDelay = 1.2f;
|
||||
|
||||
Vector stiffness {};
|
||||
Vector randomize {};
|
||||
|
||||
m_idealAngles = direction.get2d ();
|
||||
m_idealAngles.clampAngles ();
|
||||
|
|
@ -303,6 +302,8 @@ void Bot::updateLookAnglesNewbie (const Vector &direction, float delta) {
|
|||
&& ((pev->velocity.length () > 1.0f
|
||||
&& m_angularDeviation.length () < 5.0f) || m_angularDeviation.length () < 1.0f)) {
|
||||
|
||||
Vector randomize {};
|
||||
|
||||
// is the bot standing still ?
|
||||
if (pev->velocity.length () < 1.0f) {
|
||||
randomize = randomization * 0.2f; // randomize less
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue