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/AggressiveMonster.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Mobs/AggressiveMonster.cpp') diff --git a/src/Mobs/AggressiveMonster.cpp b/src/Mobs/AggressiveMonster.cpp index 648599999..7eccf0265 100644 --- a/src/Mobs/AggressiveMonster.cpp +++ b/src/Mobs/AggressiveMonster.cpp @@ -30,7 +30,7 @@ void cAggressiveMonster::InStateChasing(std::chrono::milliseconds a_Dt) { if (m_Target->IsPlayer()) { - if (((cPlayer *)m_Target)->IsGameModeCreative()) + if (static_cast(m_Target)->IsGameModeCreative()) { m_EMState = IDLE; return; @@ -46,7 +46,7 @@ void cAggressiveMonster::InStateChasing(std::chrono::milliseconds a_Dt) void cAggressiveMonster::EventSeePlayer(cEntity * a_Entity) { - if (!((cPlayer *)a_Entity)->IsGameModeCreative()) + if (!static_cast(a_Entity)->IsGameModeCreative()) { super::EventSeePlayer(a_Entity); m_EMState = CHASING; @@ -110,12 +110,12 @@ void cAggressiveMonster::Attack(std::chrono::milliseconds a_Dt) bool cAggressiveMonster::IsMovingToTargetPosition() { // Difference between destination x and target x is negligible (to 10^-12 precision) - if (fabsf((float)m_FinalDestination.x - (float)m_Target->GetPosX()) < std::numeric_limits::epsilon()) + if (fabsf(static_cast(m_FinalDestination.x) - static_cast(m_Target->GetPosX())) < std::numeric_limits::epsilon()) { return false; } // Difference between destination z and target z is negligible (to 10^-12 precision) - else if (fabsf((float)m_FinalDestination.z - (float)m_Target->GetPosZ()) > std::numeric_limits::epsilon()) + else if (fabsf(static_cast(m_FinalDestination.z) - static_cast(m_Target->GetPosZ())) > std::numeric_limits::epsilon()) { return false; } -- cgit v1.2.3