From fa714aa8430e26569df9e6741a73d57df0856841 Mon Sep 17 00:00:00 2001 From: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com> Date: Sat, 15 Jan 2022 17:55:44 -0800 Subject: [PATCH] Changed Banana spawn Y height Changed the Bananas Y spawn height to be 10 Y units lower to prevent bananas from getting stuck on the tree. --- dScripts/GfBanana.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dScripts/GfBanana.cpp b/dScripts/GfBanana.cpp index 919e54b4..8a6777a1 100644 --- a/dScripts/GfBanana.cpp +++ b/dScripts/GfBanana.cpp @@ -64,8 +64,13 @@ void GfBanana::OnHit(Entity* self, Entity* attacker) return; } - - bananaEntity->SetPosition(bananaEntity->GetPosition() - NiPoint3::UNIT_Y * 5); + + // Get the banana cluster position + auto entityPosition = bananaEntity->GetPosition(); + // Lower by 10 units to prevent bananas from spawning on top of the tree + entityPosition.SetY(entityPosition.GetY() - 10); + // Set the position to the new position. + bananaEntity->SetPosition(entityPosition); auto* bananaDestroyable = bananaEntity->GetComponent();