summaryrefslogtreecommitdiffstats
path: root/src/UI
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2016-11-13 20:00:01 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2016-11-13 20:00:01 +0100
commit944fdd173f40c0fcc718d6aa2af191bf993adc70 (patch)
tree28436adf7e20c58427c8d48685d944b964e11147 /src/UI
parentMerge pull request #3430 from cuberite/Overrides (diff)
downloadcuberite-WarningsFixes.tar
cuberite-WarningsFixes.tar.gz
cuberite-WarningsFixes.tar.bz2
cuberite-WarningsFixes.tar.lz
cuberite-WarningsFixes.tar.xz
cuberite-WarningsFixes.tar.zst
cuberite-WarningsFixes.zip
Diffstat (limited to '')
-rw-r--r--src/UI/SlotArea.cpp6
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
}