summaryrefslogtreecommitdiffstats
path: root/src/Entities/ProjectileEntity.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-07-15 09:01:32 +0200
committermadmaxoft <github@xoft.cz>2014-07-15 09:01:32 +0200
commit8e946da8ac109a8bedf9d243251f9a18d29e5a1a (patch)
tree30f046ddec20d809e3fa84e78b76f31915a361c2 /src/Entities/ProjectileEntity.cpp
parentItemHandler.cpp: removed redundant food and drink checks (diff)
parentPass cItem by reference. (diff)
downloadcuberite-8e946da8ac109a8bedf9d243251f9a18d29e5a1a.tar
cuberite-8e946da8ac109a8bedf9d243251f9a18d29e5a1a.tar.gz
cuberite-8e946da8ac109a8bedf9d243251f9a18d29e5a1a.tar.bz2
cuberite-8e946da8ac109a8bedf9d243251f9a18d29e5a1a.tar.lz
cuberite-8e946da8ac109a8bedf9d243251f9a18d29e5a1a.tar.xz
cuberite-8e946da8ac109a8bedf9d243251f9a18d29e5a1a.tar.zst
cuberite-8e946da8ac109a8bedf9d243251f9a18d29e5a1a.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 9c1161ac3..019ebeaa5 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -244,7 +244,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)
+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)
@@ -264,12 +264,13 @@ 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:
{
- if (a_Item.m_FireworkItem.m_Colours.empty())
+ ASSERT(a_Item != NULL);
+ if (a_Item->m_FireworkItem.m_Colours.empty())
{
return NULL;
}
- return new cFireworkEntity(a_Creator, a_X, a_Y, a_Z, a_Item);
+ return new cFireworkEntity(a_Creator, a_X, a_Y, a_Z, *a_Item);
}
}