summaryrefslogtreecommitdiffstats
path: root/src/Entities/ProjectileEntity.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-07-13 16:48:13 +0200
committerMattes D <github@xoft.cz>2014-07-13 16:48:13 +0200
commit760fe6b99d63e99ff7468312852a51b5c4545eb2 (patch)
tree30c62bd1f4e1f95bc06ef5f2b833f3327b540ec5 /src/Entities/ProjectileEntity.cpp
parentFixed MSVC warnings in SoundEffect functions. (diff)
parentAdjusted calls to CreateProjectile that passed Items (diff)
downloadcuberite-760fe6b99d63e99ff7468312852a51b5c4545eb2.tar
cuberite-760fe6b99d63e99ff7468312852a51b5c4545eb2.tar.gz
cuberite-760fe6b99d63e99ff7468312852a51b5c4545eb2.tar.bz2
cuberite-760fe6b99d63e99ff7468312852a51b5c4545eb2.tar.lz
cuberite-760fe6b99d63e99ff7468312852a51b5c4545eb2.tar.xz
cuberite-760fe6b99d63e99ff7468312852a51b5c4545eb2.tar.zst
cuberite-760fe6b99d63e99ff7468312852a51b5c4545eb2.zip
Diffstat (limited to '')
-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 0bb34019e..b5ef5c90a 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -243,7 +243,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)
@@ -262,12 +262,13 @@ cProjectileEntity * cProjectileEntity::Create(eKind a_Kind, cEntity * a_Creator,
case pkExpBottle: return new cExpBottleEntity (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);
}
}