summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Guardian.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Mobs/Guardian.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Mobs/Guardian.cpp b/src/Mobs/Guardian.cpp
index 5eb30785b..cfe7861a6 100644
--- a/src/Mobs/Guardian.cpp
+++ b/src/Mobs/Guardian.cpp
@@ -21,7 +21,7 @@ cGuardian::cGuardian(void) :
void cGuardian::GetDrops(cItems & a_Drops, cEntity * a_Killer)
{
// Drops 0-3 Ink Sacs
- int LootingLevel = 0;
+ unsigned int LootingLevel = 0;
if (a_Killer != nullptr)
{
LootingLevel = a_Killer->GetEquippedWeapon().m_Enchantments.GetLevel(cEnchantments::enchLooting);
@@ -43,13 +43,13 @@ void cGuardian::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
Vector3d Pos = GetPosition();
// TODO: Not a real behavior, but cool :D
- int RelY = (int)floor(Pos.y);
+ int RelY = FloorC(Pos.y);
if ((RelY < 0) || (RelY >= cChunkDef::Height))
{
return;
}
- int RelX = (int)floor(Pos.x) - a_Chunk.GetPosX() * cChunkDef::Width;
- int RelZ = (int)floor(Pos.z) - a_Chunk.GetPosZ() * cChunkDef::Width;
+ int RelX = FloorC(Pos.x) - a_Chunk.GetPosX() * cChunkDef::Width;
+ int RelZ = FloorC(Pos.z) - a_Chunk.GetPosZ() * cChunkDef::Width;
BLOCKTYPE BlockType;
if (a_Chunk.UnboundedRelGetBlockType(RelX, RelY, RelZ, BlockType) && !IsBlockWater(BlockType) && !IsOnFire())
{