summaryrefslogtreecommitdiffstats
path: root/src/Entities/ProjectileEntity.cpp
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-01-16 13:16:47 +0100
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-01-16 15:37:37 +0100
commit8c12227687454abe5bdd0b8796f84f15fd3817d8 (patch)
tree6ebcb9d63146b2626311220b69b0c311e2a74c94 /src/Entities/ProjectileEntity.cpp
parentMerge pull request #2875 from LogicParrot/fallDamage (diff)
downloadcuberite-8c12227687454abe5bdd0b8796f84f15fd3817d8.tar
cuberite-8c12227687454abe5bdd0b8796f84f15fd3817d8.tar.gz
cuberite-8c12227687454abe5bdd0b8796f84f15fd3817d8.tar.bz2
cuberite-8c12227687454abe5bdd0b8796f84f15fd3817d8.tar.lz
cuberite-8c12227687454abe5bdd0b8796f84f15fd3817d8.tar.xz
cuberite-8c12227687454abe5bdd0b8796f84f15fd3817d8.tar.zst
cuberite-8c12227687454abe5bdd0b8796f84f15fd3817d8.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 4c89ea965..bb08f38d9 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -316,12 +316,13 @@ void cProjectileEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_Hi
{
if (a_EntityHit.IsPawn() && (GetCreatorName() != "")) // If we're hitting a mob or a player and we were created by a player
{
+
class cNotifyWolves : public cEntityCallback
{
public:
- cEntity * m_EntityHit;
+ cPawn * m_EntityHit;
- cNotifyWolves(cEntity * a_Entity) :
+ cNotifyWolves(cPawn * a_Entity) :
m_EntityHit(a_Entity)
{
}
@@ -331,7 +332,7 @@ void cProjectileEntity::OnHitEntity(cEntity & a_EntityHit, const Vector3d & a_Hi
static_cast<cPlayer*>(a_Player)->NotifyFriendlyWolves(m_EntityHit);
return true;
}
- } Callback(&a_EntityHit);
+ } Callback(static_cast<cPawn*>(&a_EntityHit));
m_World->DoWithEntityByID(GetCreatorUniqueID(), Callback);
}