void CAnimatedCharacter::UpdateMCMs() { m_movementControlMethod[eMCMComponent_Horizontal][eMCMSlot_Debug] = (EMovementControlMethod)CAnimationGraphCVars::Get().m_MCMH; m_movementControlMethod[eMCMComponent_Vertical][eMCMSlot_Debug] = (EMovementControlMethod)CAnimationGraphCVars::Get().m_MCMV; UpdateMCMComponent(eMCMComponent_Horizontal); UpdateMCMComponent(eMCMComponent_Vertical); #ifdef _DEBUG if (DebugFilter() && ((CAnimationGraphCVars::Get().m_debugText != 0) || (CAnimationGraphCVars::Get().m_debugMovementControlMethods != 0))) { //gEnv->pRenderer->Draw2dLabel(10, 75, 2.0f, (float*)&ColorF(1,1,1,1), false, "MCM H[%s] V[%s]", g_szMCMString[mcmh], g_szMCMString[mcmv]); EMovementControlMethod mcmh = GetMCMH(); EMovementControlMethod mcmv = GetMCMV(); DebugHistory_AddValue("eDH_MovementControlMethodH", (float)mcmh); DebugHistory_AddValue("eDH_MovementControlMethodV", (float)mcmv); } #endif }
void rvMonsterStroggHover::Pursue ( void ) { if ( marker.GetEntity() && GetEnemy() ) { marker.GetEntity()->GetPhysics()->SetOrigin( GetEnemy()->GetPhysics()->GetOrigin()+attackPosOffset ); if ( DebugFilter(ai_debugMove) ) { gameRenderWorld->DebugAxis( marker.GetEntity()->GetPhysics()->GetOrigin(), marker.GetEntity()->GetPhysics()->GetAxis() ); } if ( MarkerPosValid() ) { bool breakOff = false; if ( move.fl.done ) {//even once get there, hold that position for a while... if ( holdPosTime && holdPosTime > gameLocal.GetTime() ) {//held this position long enough breakOff = true; } else { if ( !holdPosTime ) {//just got there, hold position for a bit holdPosTime = gameLocal.random.RandomInt(2000)+3000 + gameLocal.GetTime(); } if ( !MoveToEntity( marker ) ) { breakOff = true; } } } if ( !breakOff ) { return; } } } if ( !move.fl.done ) { StopMove( MOVE_STATUS_DONE ); } inPursuit = false; }