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.
This commit is contained in:
EmosewaMC 2022-01-15 17:55:44 -08:00
parent 70af1f9314
commit fa714aa843

View File

@ -64,8 +64,13 @@ void GfBanana::OnHit(Entity* self, Entity* attacker)
return; 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<DestroyableComponent>(); auto* bananaDestroyable = bananaEntity->GetComponent<DestroyableComponent>();