diff options
author | tycho <work.tycho@gmail.com> | 2015-05-24 13:56:56 +0200 |
---|---|---|
committer | tycho <work.tycho@gmail.com> | 2015-05-24 13:56:56 +0200 |
commit | dae9e5792a4f030ae9e748548a16a89790fbd311 (patch) | |
tree | 2142b8c4deb9f2c7ad096b8b0ec93fefccd8d8f1 /src/Entities/SplashPotionEntity.cpp | |
parent | Merge branch 'master' into PreventNewWarnings (diff) | |
download | cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.gz cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.bz2 cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.lz cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.xz cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.tar.zst cuberite-dae9e5792a4f030ae9e748548a16a89790fbd311.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/SplashPotionEntity.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Entities/SplashPotionEntity.cpp b/src/Entities/SplashPotionEntity.cpp index fd1a0179b..a79ba92b0 100644 --- a/src/Entities/SplashPotionEntity.cpp +++ b/src/Entities/SplashPotionEntity.cpp @@ -9,7 +9,7 @@ /// Converts an angle in radians into a byte representation used by the network protocol -#define ANGLE_TO_PROTO(X) (Byte)(X * 255 / 360) +#define ANGLE_TO_PROTO(X) static_cast<Byte>(X * 255 / 360) //////////////////////////////////////////////////////////////////////////////// // cSplashPotionEntityCallback: @@ -51,7 +51,7 @@ public: double Reduction = -0.25 * SplashDistance + 1.0; Reduction = std::max(Reduction, 0.0); - ((cPawn *) a_Entity)->AddEntityEffect(m_EntityEffectType, m_EntityEffect.GetDuration(), m_EntityEffect.GetIntensity(), Reduction); + static_cast<cPawn *>(a_Entity)->AddEntityEffect(m_EntityEffectType, m_EntityEffect.GetDuration(), m_EntityEffect.GetIntensity(), Reduction); return false; } @@ -116,7 +116,12 @@ void cSplashPotionEntity::Splash(const Vector3d & a_HitPos) cSplashPotionCallback Callback(a_HitPos, m_EntityEffectType, m_EntityEffect); m_World->ForEachEntity(Callback); - m_World->BroadcastSoundParticleEffect(2002, (int)floor(a_HitPos.x), (int)floor(a_HitPos.y), (int)floor(a_HitPos.z), m_PotionColor); + m_World->BroadcastSoundParticleEffect( + 2002, + static_cast<int>(floor(a_HitPos.x)), + static_cast<int>(floor(a_HitPos.y)), + static_cast<int>(floor(a_HitPos.z)), + m_PotionColor); } |