diff --git a/sp/src/game/server/hl2/ai_behavior_actbusy.cpp b/sp/src/game/server/hl2/ai_behavior_actbusy.cpp index c5ad733d..069960f6 100644 --- a/sp/src/game/server/hl2/ai_behavior_actbusy.cpp +++ b/sp/src/game/server/hl2/ai_behavior_actbusy.cpp @@ -1802,6 +1802,20 @@ bool CAI_ActBusyBehavior::PlayAnimForActBusy( busyanimparts_t AnimPart ) return false; } +#ifdef MAPBASE +//----------------------------------------------------------------------------- +// Purpose: Get the busy's move activity +//----------------------------------------------------------------------------- +Activity CAI_ActBusyBehavior::GetMoveActivityForActBusy() +{ + busyanim_t *pBusyAnim = g_ActBusyAnimDataSystem.GetBusyAnim( m_iCurrentBusyAnim ); + if ( !pBusyAnim ) + return m_ForcedActivity; + + return pBusyAnim->bTranslateActivity ? GetOuter()->TranslateActivity( m_ForcedActivity ) : m_ForcedActivity; +} +#endif + //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- @@ -2030,7 +2044,11 @@ void CAI_ActBusyBehavior::StartTask( const Task_t *pTask ) // If we have a forced activity, use that. Otherwise, walk. if ( m_ForcedActivity != ACT_INVALID && m_ForcedActivity != ACT_RESET ) { +#ifdef MAPBASE + GetNavigator()->SetMovementActivity( GetMoveActivityForActBusy() ); +#else GetNavigator()->SetMovementActivity( m_ForcedActivity ); +#endif // Cover is void once I move Forget( bits_MEMORY_INCOVER ); diff --git a/sp/src/game/server/hl2/ai_behavior_actbusy.h b/sp/src/game/server/hl2/ai_behavior_actbusy.h index 264fdb3d..63ebecec 100644 --- a/sp/src/game/server/hl2/ai_behavior_actbusy.h +++ b/sp/src/game/server/hl2/ai_behavior_actbusy.h @@ -167,6 +167,9 @@ private: void NotifyBusyEnding( void ); bool HasAnimForActBusy( int iActBusy, busyanimparts_t AnimPart ); bool PlayAnimForActBusy( busyanimparts_t AnimPart ); +#ifdef MAPBASE + Activity GetMoveActivityForActBusy(); +#endif void PlaySoundForActBusy( busyanimparts_t AnimPart ); private: