summaryrefslogtreecommitdiffstats
path: root/src/Entities/Pawn.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Entities/Pawn.cpp')
-rw-r--r--src/Entities/Pawn.cpp29
1 files changed, 10 insertions, 19 deletions
diff --git a/src/Entities/Pawn.cpp b/src/Entities/Pawn.cpp
index 9857fa29c..35efe05ce 100644
--- a/src/Entities/Pawn.cpp
+++ b/src/Entities/Pawn.cpp
@@ -28,25 +28,6 @@ cPawn::cPawn(eEntityType a_EntityType, double a_Width, double a_Height) :
-cPawn::~cPawn()
-{
- ASSERT(m_TargetingMe.size() == 0);
-}
-
-
-
-
-
-void cPawn::Destroyed()
-{
- StopEveryoneFromTargetingMe();
- Super::Destroyed();
-}
-
-
-
-
-
void cPawn::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
std::vector<cEntityEffect *> EffectsToTick;
@@ -453,6 +434,16 @@ void cPawn::HandleFalling(void)
+void cPawn::OnRemoveFromWorld(cWorld & a_World)
+{
+ StopEveryoneFromTargetingMe();
+ Super::OnRemoveFromWorld(a_World);
+}
+
+
+
+
+
void cPawn::StopEveryoneFromTargetingMe()
{
std::vector<cMonster*>::iterator i = m_TargetingMe.begin();