From 9210501af5ab0b91e331e9b4d27ac7fd63888f48 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Tue, 31 Mar 2020 11:39:23 +0000 Subject: Prevent player from being destroyed by plugins (#4584) * Prevent player from being destroyed by plugins Add manual binding, bails out with error message if attempted entity to destroy is player. * Improve warnings and documentation, remove automatic binding * Remove old and unnecessary deprecated function --- src/Entities/Entity.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/Entities') diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h index ecc94efc9..e51984225 100644 --- a/src/Entities/Entity.h +++ b/src/Entities/Entity.h @@ -289,14 +289,10 @@ public: If this returns false, you must stop using the cEntity pointer you have. */ bool IsTicking(void) const; + // tolua_end /** Destroys the entity, schedules it for memory freeing and broadcasts the DestroyEntity packet */ virtual void Destroy(); - - OBSOLETE void Destroy(bool a_ShouldBroadcast) - { - LOGWARNING("cEntity:Destory(bool) is deprecated, use cEntity:Destroy() instead."); - Destroy(); - } + // tolua_begin /** Makes this pawn take damage from an attack by a_Attacker. Damage values are calculated automatically and DoTakeDamage() called */ void TakeDamage(cEntity & a_Attacker); -- cgit v1.2.3