From e51878c45b618f9b3920b46357545cbb47befeda Mon Sep 17 00:00:00 2001 From: Roman Chistokhodov Date: Tue, 19 Jul 2022 14:35:27 +0300 Subject: [PATCH] Fix alien controllers facing in idle state (#282) --- dlls/controller.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/controller.cpp b/dlls/controller.cpp index 20c9a502..bfe3032e 100644 --- a/dlls/controller.cpp +++ b/dlls/controller.cpp @@ -669,8 +669,11 @@ void CController::RunTask( Task_t *pTask ) case TASK_WAIT: case TASK_WAIT_FACE_ENEMY: case TASK_WAIT_PVS: - MakeIdealYaw( m_vecEnemyLKP ); - ChangeYaw( pev->yaw_speed ); + if (m_hEnemy != 0) + { + MakeIdealYaw( m_vecEnemyLKP ); + ChangeYaw( pev->yaw_speed ); + } if( m_fSequenceFinished ) {