diff --git a/dGame/Entity.cpp b/dGame/Entity.cpp index 54629888..55b3b3b5 100644 --- a/dGame/Entity.cpp +++ b/dGame/Entity.cpp @@ -1351,6 +1351,11 @@ void Entity::OnCollisionPhantom(const LWOOBJID otherEntity) { callback(other); } + SwitchComponent* switchComp = GetComponent(); + if (switchComp) { + switchComp->OnUse(other); + } + TriggerEvent(eTriggerEventType::ENTER, other); // POI system diff --git a/dGame/dComponents/SwitchComponent.cpp b/dGame/dComponents/SwitchComponent.cpp index cb13cc7f..4f48fb46 100644 --- a/dGame/dComponents/SwitchComponent.cpp +++ b/dGame/dComponents/SwitchComponent.cpp @@ -82,7 +82,6 @@ void SwitchComponent::EntityEnter(Entity* entity) { RenderComponent::PlayAnimation(m_Parent, u"engaged"); m_PetBouncer->SetPetBouncerEnabled(true); } else { - GameMessages::SendKnockback(entity->GetObjectID(), m_Parent->GetObjectID(), m_Parent->GetObjectID(), 0.0f, NiPoint3(0.0f, 17.0f, 0.0f)); Game::entityManager->SerializeEntity(m_Parent); }