summaryrefslogtreecommitdiffstats
path: root/src/Entities/ProjectileEntity.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/Entities/ProjectileEntity.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/Entities/ProjectileEntity.cpp')
-rw-r--r--src/Entities/ProjectileEntity.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Entities/ProjectileEntity.cpp b/src/Entities/ProjectileEntity.cpp
index 05b7669cd..8e2e412dd 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -30,7 +30,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)
@@ -222,7 +222,7 @@ cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, double a
m_ProjectileKind(a_Kind),
m_CreatorData(
((a_Creator != nullptr) ? a_Creator->GetUniqueID() : cEntity::INVALID_ID),
- ((a_Creator != nullptr) ? (a_Creator->IsPlayer() ? ((cPlayer *)a_Creator)->GetName() : "") : ""),
+ ((a_Creator != nullptr) ? (a_Creator->IsPlayer() ? static_cast<cPlayer *>(a_Creator)->GetName() : "") : ""),
((a_Creator != nullptr) ? a_Creator->GetEquippedWeapon().m_Enchantments : cEnchantments())
),
m_IsInGround(false)
@@ -238,7 +238,7 @@ cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, double a
cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, const Vector3d & a_Pos, const Vector3d & a_Speed, double a_Width, double a_Height) :
super(etProjectile, a_Pos.x, a_Pos.y, a_Pos.z, a_Width, a_Height),
m_ProjectileKind(a_Kind),
- m_CreatorData(a_Creator->GetUniqueID(), a_Creator->IsPlayer() ? ((cPlayer *)a_Creator)->GetName() : "", a_Creator->GetEquippedWeapon().m_Enchantments),
+ m_CreatorData(a_Creator->GetUniqueID(), a_Creator->IsPlayer() ? static_cast<cPlayer *>(a_Creator)->GetName() : "", a_Creator->GetEquippedWeapon().m_Enchantments),
m_IsInGround(false)
{
SetSpeed(a_Speed);
@@ -281,6 +281,7 @@ cProjectileEntity * cProjectileEntity::Create(eKind a_Kind, cEntity * a_Creator,
return new cFireworkEntity(a_Creator, a_X, a_Y, a_Z, *a_Item);
}
+ case pkFishingFloat: break;
}
LOGWARNING("%s: Unknown projectile kind: %d", __FUNCTION__, a_Kind);