summaryrefslogtreecommitdiffstats
path: root/src/Entities
diff options
context:
space:
mode:
authorSTRWarrior <niels.breuker@hotmail.nl>2014-03-29 15:26:41 +0100
committerSTRWarrior <niels.breuker@hotmail.nl>2014-03-29 15:26:41 +0100
commit339d55511127981335193d07037719a4b26c4600 (patch)
treea11e1e4ca6a2bceac6b78a070069c93668e66e03 /src/Entities
parentFixed non-virtual destructors warnings. (diff)
downloadcuberite-339d55511127981335193d07037719a4b26c4600.tar
cuberite-339d55511127981335193d07037719a4b26c4600.tar.gz
cuberite-339d55511127981335193d07037719a4b26c4600.tar.bz2
cuberite-339d55511127981335193d07037719a4b26c4600.tar.lz
cuberite-339d55511127981335193d07037719a4b26c4600.tar.xz
cuberite-339d55511127981335193d07037719a4b26c4600.tar.zst
cuberite-339d55511127981335193d07037719a4b26c4600.zip
Diffstat (limited to 'src/Entities')
-rw-r--r--src/Entities/ProjectileEntity.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Entities/ProjectileEntity.cpp b/src/Entities/ProjectileEntity.cpp
index f4ab825f2..bc359e1da 100644
--- a/src/Entities/ProjectileEntity.cpp
+++ b/src/Entities/ProjectileEntity.cpp
@@ -4,6 +4,7 @@
// Implements the cProjectileEntity class representing the common base class for projectiles, as well as individual projectile types
#include "Globals.h"
+#include "../Bindings/PluginManager.h"
#include "ProjectileEntity.h"
#include "../ClientHandle.h"
#include "Player.h"
@@ -148,6 +149,11 @@ public:
// TODO: Some entities don't interact with the projectiles (pickups, falling blocks)
// TODO: Allow plugins to interfere about which entities can be hit
+ if (cPluginManager::Get()->CallHookProjectileHitEntity(*m_Projectile, *a_Entity))
+ {
+ // A plugin disagreed.
+ return false;
+ }
if (LineCoeff < m_MinCoeff)
{