diff options
author | STRWarrior <niels.breuker@hotmail.nl> | 2014-03-29 15:43:03 +0100 |
---|---|---|
committer | STRWarrior <niels.breuker@hotmail.nl> | 2014-03-29 15:43:03 +0100 |
commit | a6ef40cb6efa1b8da549c81c7e1137d523240c17 (patch) | |
tree | 2a29b23646e572fbb3a60528374b00871f05cbf4 /src | |
parent | Added HOOK_PROJECTILE_HIT_ENTITY (diff) | |
download | cuberite-a6ef40cb6efa1b8da549c81c7e1137d523240c17.tar cuberite-a6ef40cb6efa1b8da549c81c7e1137d523240c17.tar.gz cuberite-a6ef40cb6efa1b8da549c81c7e1137d523240c17.tar.bz2 cuberite-a6ef40cb6efa1b8da549c81c7e1137d523240c17.tar.lz cuberite-a6ef40cb6efa1b8da549c81c7e1137d523240c17.tar.xz cuberite-a6ef40cb6efa1b8da549c81c7e1137d523240c17.tar.zst cuberite-a6ef40cb6efa1b8da549c81c7e1137d523240c17.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/Bindings/LuaState.cpp | 12 | ||||
-rw-r--r-- | src/Bindings/LuaState.h | 2 | ||||
-rw-r--r-- | src/Entities/ProjectileEntity.cpp | 1 |
3 files changed, 14 insertions, 1 deletions
diff --git a/src/Bindings/LuaState.cpp b/src/Bindings/LuaState.cpp index 47380b8a7..13eb17f7d 100644 --- a/src/Bindings/LuaState.cpp +++ b/src/Bindings/LuaState.cpp @@ -479,6 +479,18 @@ void cLuaState::Push(cEntity * a_Entity) +void cLuaState::Push(cProjectileEntity * a_ProjectileEntity) +{ + ASSERT(IsValid()); + + tolua_pushusertype(m_LuaState, a_ProjectileEntity, "cProjectileEntity"); + m_NumCurrentFunctionArgs += 1; +} + + + + + void cLuaState::Push(cMonster * a_Monster) { ASSERT(IsValid()); diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h index f0047b362..b9ca2f29b 100644 --- a/src/Bindings/LuaState.h +++ b/src/Bindings/LuaState.h @@ -38,6 +38,7 @@ extern "C" class cWorld; class cPlayer; class cEntity; +class cProjectileEntity; class cMonster; class cItem; class cItems; @@ -183,6 +184,7 @@ public: void Push(cPlayer * a_Player); void Push(const cPlayer * a_Player); void Push(cEntity * a_Entity); + void Push(cProjectileEntity * a_ProjectileEntity); void Push(cMonster * a_Monster); void Push(cItem * a_Item); void Push(cItems * a_Items); diff --git a/src/Entities/ProjectileEntity.cpp b/src/Entities/ProjectileEntity.cpp index bc359e1da..07cb34f35 100644 --- a/src/Entities/ProjectileEntity.cpp +++ b/src/Entities/ProjectileEntity.cpp @@ -148,7 +148,6 @@ 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. |