summaryrefslogtreecommitdiffstats
path: root/src/Entities/Pawn.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Entities/Pawn.h')
-rw-r--r--src/Entities/Pawn.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/Entities/Pawn.h b/src/Entities/Pawn.h
index 6a7035ee6..4d35789a9 100644
--- a/src/Entities/Pawn.h
+++ b/src/Entities/Pawn.h
@@ -22,7 +22,8 @@ public:
CLASS_PROTODEF(cPawn)
cPawn(eEntityType a_EntityType, double a_Width, double a_Height);
- ~cPawn();
+
+ virtual bool OnPreWorldTravel(cWorld & a_NewWorld) override;
virtual void Destroyed() override;
virtual void Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
@@ -32,11 +33,6 @@ public:
virtual void HandleAir(void) override;
virtual void HandleFalling(void);
- /** Tells all pawns which are targeting us to stop targeting us. */
- void StopEveryoneFromTargetingMe();
-
-
-
// tolua_begin
/** Applies an entity effect.
@@ -57,23 +53,17 @@ public:
// tolua_end
- /** Remove the monster from the list of monsters targeting this pawn. */
- void NoLongerTargetingMe(cMonster * a_Monster);
-
- /** Add the monster to the list of monsters targeting this pawn. (Does not check if already in list!) */
- void TargetingMe(cMonster * a_Monster);
-
protected:
+ /** Resets the targeted entity of all who currently are targeting us in the current world.
+ Fulfils invariant set out in cMonster::m_Target. */
+ void UnsetAllTargeters();
+
typedef std::map<cEntityEffect::eType, cEntityEffect *> tEffectMap;
tEffectMap m_EntityEffects;
double m_LastGroundHeight;
bool m_bTouchGround;
-private:
-
- /** A list of all monsters that are targeting this pawn. */
- std::vector<cMonster*> m_TargetingMe;
} ; // tolua_export