summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Squid.cpp
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-05-29 11:08:32 +0200
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-05-29 11:08:32 +0200
commit1e6f02437e88495d57249f742526526ee5865777 (patch)
treeaf200ec3c23c5d04359ba471d275cfa6d0a3c7fb /src/Mobs/Squid.cpp
parentMerge pull request #2157 from beeduck/Issue2106 (diff)
parentMerge branch 'master' into PreventNewWarnings (diff)
downloadcuberite-1e6f02437e88495d57249f742526526ee5865777.tar
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.gz
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.bz2
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.lz
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.xz
cuberite-1e6f02437e88495d57249f742526526ee5865777.tar.zst
cuberite-1e6f02437e88495d57249f742526526ee5865777.zip
Diffstat (limited to 'src/Mobs/Squid.cpp')
-rw-r--r--src/Mobs/Squid.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Mobs/Squid.cpp b/src/Mobs/Squid.cpp
index 3c508b65f..d148d65f3 100644
--- a/src/Mobs/Squid.cpp
+++ b/src/Mobs/Squid.cpp
@@ -21,7 +21,7 @@ cSquid::cSquid(void) :
void cSquid::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);
@@ -41,13 +41,13 @@ void cSquid::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())
{