diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2016-11-13 20:00:01 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2016-11-13 20:00:01 +0100 |
commit | 944fdd173f40c0fcc718d6aa2af191bf993adc70 (patch) | |
tree | 28436adf7e20c58427c8d48685d944b964e11147 /src/UI/SlotArea.cpp | |
parent | Merge pull request #3430 from cuberite/Overrides (diff) | |
download | cuberite-944fdd173f40c0fcc718d6aa2af191bf993adc70.tar cuberite-944fdd173f40c0fcc718d6aa2af191bf993adc70.tar.gz cuberite-944fdd173f40c0fcc718d6aa2af191bf993adc70.tar.bz2 cuberite-944fdd173f40c0fcc718d6aa2af191bf993adc70.tar.lz cuberite-944fdd173f40c0fcc718d6aa2af191bf993adc70.tar.xz cuberite-944fdd173f40c0fcc718d6aa2af191bf993adc70.tar.zst cuberite-944fdd173f40c0fcc718d6aa2af191bf993adc70.zip |
Diffstat (limited to 'src/UI/SlotArea.cpp')
-rw-r--r-- | src/UI/SlotArea.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index 8878bb900..f644358a6 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -1578,7 +1578,7 @@ void cSlotAreaEnchanting::UpdateResult(cPlayer & a_Player) int Bookshelves = std::min(GetBookshelvesCount(a_Player.GetWorld()), 15); cFastRandom Random; - int Base = (Random.GenerateRandomInteger(1, 8) + static_cast<int>(floor(static_cast<float>(Bookshelves / 2)) + Random.GenerateRandomInteger(0, Bookshelves))); + int Base = (Random.GenerateRandomInteger(1, 8) + static_cast<int>(floor(Bookshelves / 2) + Random.GenerateRandomInteger(0, Bookshelves))); int TopSlot = std::max(Base / 3, 1); int MiddleSlot = (Base * 2) / 3 + 1; int BottomSlot = std::max(Base, Bookshelves * 2); @@ -2566,8 +2566,8 @@ void cSlotAreaTemporary::TossItems(cPlayer & a_Player, int a_Begin, int a_End) double vX = 0, vY = 0, vZ = 0; EulerToVector(-a_Player.GetYaw(), a_Player.GetPitch(), vZ, vX, vY); - vY = -vY * 2 + 1.f; - a_Player.GetWorld()->SpawnItemPickups(Drops, a_Player.GetPosX(), a_Player.GetPosY() + 1.6f, a_Player.GetPosZ(), vX * 3, vY * 3, vZ * 3, true); // 'true' because player created + vY = -vY * 2 + 1; + a_Player.GetWorld()->SpawnItemPickups(Drops, a_Player.GetPosX(), a_Player.GetPosY() + 1.6, a_Player.GetPosZ(), vX * 3, vY * 3, vZ * 3, true); // 'true' because player created } |