fix: Player activated switches (#1655)

This commit is contained in:
David Markowitz
2024-11-25 20:55:50 -08:00
committed by GitHub
parent ec501831e6
commit 9e7ef8c4ee
4 changed files with 24 additions and 6 deletions

View File

@@ -381,7 +381,7 @@ void PetComponent::Update(float deltaTime) {
float distance = Vector3::DistanceSquared(position, switchPosition);
if (distance < 3 * 3) {
m_Interaction = closestSwitch->GetParentEntity()->GetObjectID();
closestSwitch->EntityEnter(m_Parent);
closestSwitch->OnUse(m_Parent);
} else if (distance < 20 * 20) {
haltDistance = 1;