diff --git a/dGame/dComponents/MovementAIComponent.cpp b/dGame/dComponents/MovementAIComponent.cpp index e56d42757..ca392dacb 100644 --- a/dGame/dComponents/MovementAIComponent.cpp +++ b/dGame/dComponents/MovementAIComponent.cpp @@ -464,8 +464,11 @@ void MovementAIComponent::SetDestination(const NiPoint3 destination) { // The path is walked without collision, so an enemy's stops at walls it can't cross (navmesh carvers, enemy only // blockers); with nothing left to walk it stays where it is. A patrol along its level path is left as designed. + // Pets are walked here too, and their group (3) is the one the pet ranch's "PR - Pet Blocker" (group 18) touches: + // the client's filter lets pets collide with it and players through. const bool patrolling = m_Path && m_BaseCombatAI && m_BaseCombatAI->GetState() == AiState::idle; - if (m_BaseCombatAI && !patrolling) { + const bool isPet = m_Parent->HasComponent(eReplicaComponentType::PET); + if ((m_BaseCombatAI && !patrolling) || isPet) { computedPath = dpWorld::ClampPath(m_Parent->GetPosition(), std::move(computedPath), static_cast(m_Parent->GetCollisionGroup())); if (computedPath.empty()) computedPath.push_back(m_Parent->GetPosition()); }