Remove shared pointer, ODR of componentType variable

This commit is contained in:
David Markowitz
2023-06-09 01:22:45 -07:00
parent ec00f5fd9d
commit 62aa863997
49 changed files with 60 additions and 75 deletions

View File

@@ -363,7 +363,7 @@ void PetComponent::Update(float deltaTime) {
}
if (m_MovementAI == nullptr) {
m_MovementAI = m_OwningEntity->GetSharedComponent<MovementAIComponent>();
m_MovementAI = m_OwningEntity->GetComponent<MovementAIComponent>();
if (!m_MovementAI) return;
}
@@ -792,7 +792,7 @@ void PetComponent::ClientFailTamingMinigame() {
}
void PetComponent::Wander() {
if (!m_MovementAI) m_MovementAI = m_OwningEntity->GetSharedComponent<MovementAIComponent>();
if (!m_MovementAI) m_MovementAI = m_OwningEntity->GetComponent<MovementAIComponent>();
if (m_MovementAI == nullptr || !m_MovementAI->AtFinalWaypoint()) {
return;