mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-22 21:43:35 +00:00
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:
parent
70af1f9314
commit
fa714aa843
@ -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<DestroyableComponent>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user