From 4a1c289fb130d27571384659ab81e30b721895e3 Mon Sep 17 00:00:00 2001 From: David Markowitz <39972741+EmosewaMC@users.noreply.github.com> Date: Sat, 7 Dec 2024 17:11:13 -0800 Subject: [PATCH] fix: avant gardens switches (#1667) * yep * remove dumb knockback idk how the 1 switch in pet cove does it --- dGame/Entity.cpp | 5 +++++ dGame/dComponents/SwitchComponent.cpp | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) 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); }