summaryrefslogtreecommitdiffstats
path: root/src/Entities/ProjectileEntity.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-20 22:55:07 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-10-20 22:55:07 +0200
commit987f79afdd8945966d0dfa2d52539e005f771590 (patch)
treefa55849604121317e0a565465212032ebe4b79cb /src/Entities/ProjectileEntity.cpp
parentUse std::recusive_mutex (diff)
downloadcuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar
cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.gz
cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.bz2
cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.lz
cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.xz
cuberite-987f79afdd8945966d0dfa2d52539e005f771590.tar.zst
cuberite-987f79afdd8945966d0dfa2d52539e005f771590.zip
Diffstat (limited to 'src/Entities/ProjectileEntity.cpp')
-rw-r--r--src/Entities/ProjectileEntity.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Entities/ProjectileEntity.cpp b/src/Entities/ProjectileEntity.cpp
index ab25ac30c..1768714f8 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -135,7 +135,7 @@ public:
m_Pos(a_Pos),
m_NextPos(a_NextPos),
m_MinCoeff(1),
- m_HitEntity(NULL)
+ m_HitEntity(nullptr)
{
}
@@ -221,9 +221,9 @@ cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, double a
super(etProjectile, a_X, a_Y, a_Z, a_Width, a_Height),
m_ProjectileKind(a_Kind),
m_CreatorData(
- ((a_Creator != NULL) ? a_Creator->GetUniqueID() : -1),
- ((a_Creator != NULL) ? (a_Creator->IsPlayer() ? ((cPlayer *)a_Creator)->GetName() : "") : ""),
- ((a_Creator != NULL) ? a_Creator->GetEquippedWeapon().m_Enchantments : cEnchantments())
+ ((a_Creator != nullptr) ? a_Creator->GetUniqueID() : -1),
+ ((a_Creator != nullptr) ? (a_Creator->IsPlayer() ? ((cPlayer *)a_Creator)->GetName() : "") : ""),
+ ((a_Creator != nullptr) ? a_Creator->GetEquippedWeapon().m_Enchantments : cEnchantments())
),
m_IsInGround(false)
{
@@ -251,7 +251,7 @@ cProjectileEntity::cProjectileEntity(eKind a_Kind, cEntity * a_Creator, const Ve
cProjectileEntity * cProjectileEntity::Create(eKind a_Kind, cEntity * a_Creator, double a_X, double a_Y, double a_Z, const cItem * a_Item, const Vector3d * a_Speed)
{
Vector3d Speed;
- if (a_Speed != NULL)
+ if (a_Speed != nullptr)
{
Speed = *a_Speed;
}
@@ -269,10 +269,10 @@ cProjectileEntity * cProjectileEntity::Create(eKind a_Kind, cEntity * a_Creator,
case pkWitherSkull: return new cWitherSkullEntity (a_Creator, a_X, a_Y, a_Z, Speed);
case pkFirework:
{
- ASSERT(a_Item != NULL);
+ ASSERT(a_Item != nullptr);
if (a_Item->m_FireworkItem.m_Colours.empty())
{
- return NULL;
+ return nullptr;
}
return new cFireworkEntity(a_Creator, a_X, a_Y, a_Z, *a_Item);
@@ -280,7 +280,7 @@ cProjectileEntity * cProjectileEntity::Create(eKind a_Kind, cEntity * a_Creator,
}
LOGWARNING("%s: Unknown projectile kind: %d", __FUNCTION__, a_Kind);
- return NULL;
+ return nullptr;
}