From 77f1f58c0a7eb55001b375f1945690ed5c1e87a2 Mon Sep 17 00:00:00 2001 From: tycho Date: Tue, 19 May 2015 19:32:10 +0100 Subject: Make -Werror disabling file only Ad fix a load of warnings --- src/Mobs/Squid.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Mobs/Squid.cpp') diff --git a/src/Mobs/Squid.cpp b/src/Mobs/Squid.cpp index 3c508b65f..9affcd6e1 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); -- cgit v1.2.3 From dae9e5792a4f030ae9e748548a16a89790fbd311 Mon Sep 17 00:00:00 2001 From: tycho Date: Sun, 24 May 2015 12:56:56 +0100 Subject: Made -Weverything an error. --- src/Mobs/Squid.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Mobs/Squid.cpp') diff --git a/src/Mobs/Squid.cpp b/src/Mobs/Squid.cpp index 9affcd6e1..7928f7dc8 100644 --- a/src/Mobs/Squid.cpp +++ b/src/Mobs/Squid.cpp @@ -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 = static_cast(floor(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 = static_cast(floor(Pos.x)) - a_Chunk.GetPosX() * cChunkDef::Width; + int RelZ = static_cast(floor(Pos.z)) - a_Chunk.GetPosZ() * cChunkDef::Width; BLOCKTYPE BlockType; if (a_Chunk.UnboundedRelGetBlockType(RelX, RelY, RelZ, BlockType) && !IsBlockWater(BlockType) && !IsOnFire()) { -- cgit v1.2.3 From b2fa71a32ac8bd86bda778a5d54fe2e7e471a1c0 Mon Sep 17 00:00:00 2001 From: tycho Date: Thu, 28 May 2015 12:29:26 +0100 Subject: Fix comments --- src/Mobs/Squid.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Mobs/Squid.cpp') diff --git a/src/Mobs/Squid.cpp b/src/Mobs/Squid.cpp index 7928f7dc8..d148d65f3 100644 --- a/src/Mobs/Squid.cpp +++ b/src/Mobs/Squid.cpp @@ -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 = static_cast(floor(Pos.y)); + int RelY = FloorC(Pos.y); if ((RelY < 0) || (RelY >= cChunkDef::Height)) { return; } - int RelX = static_cast(floor(Pos.x)) - a_Chunk.GetPosX() * cChunkDef::Width; - int RelZ = static_cast(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()) { -- cgit v1.2.3 From a0f4e182b184f5adf7a73fe2ef6c92d966a9ec47 Mon Sep 17 00:00:00 2001 From: SafwatHalaby Date: Sat, 30 May 2015 10:03:34 +0300 Subject: Disabled squid and Guardian Pathfinding --- src/Mobs/Squid.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Mobs/Squid.cpp') diff --git a/src/Mobs/Squid.cpp b/src/Mobs/Squid.cpp index d148d65f3..30fbfa1ff 100644 --- a/src/Mobs/Squid.cpp +++ b/src/Mobs/Squid.cpp @@ -35,9 +35,10 @@ void cSquid::GetDrops(cItems & a_Drops, cEntity * a_Killer) void cSquid::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) { + m_IsFollowingPath = false; // Disable Pathfinding until it's fixed. TODO + // We must first process current location, and only then tick, otherwise we risk processing a location in a chunk // that is not where the entity currently resides (FS #411) - Vector3d Pos = GetPosition(); // TODO: Not a real behavior, but cool :D -- cgit v1.2.3