summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Wolf.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Mobs/Wolf.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Mobs/Wolf.h b/src/Mobs/Wolf.h
index ed37367b9..57178a3f4 100644
--- a/src/Mobs/Wolf.h
+++ b/src/Mobs/Wolf.h
@@ -12,7 +12,7 @@ class cWolf :
public cPassiveAggressiveMonster
{
typedef cPassiveAggressiveMonster super;
-
+
public:
cWolf(void);
@@ -45,6 +45,16 @@ public:
m_OwnerUUID = a_NewOwnerUUID;
}
+ /** Notfies the wolf that the player a_Player is being attacked by a_Attacker.
+ The wolf will then defend the player by attacking a_Attacker if all these conditions are met:
+ - a_Player is the wolf's owner.
+ - The wolf is not already attacking a mob.
+ - The wolf is not sitting.
+ This is called by cPlayer::NotifyFriendlyWolves whenever a player takes or deals damage and a wolf is nearby. */
+ void NearbyPlayerIsFighting(cPlayer * a_Player, cEntity * a_Opponent);
+
+ virtual void InStateIdle(std::chrono::milliseconds a_Dt, cChunk & a_Chunk) override;
+
protected:
bool m_IsSitting;