summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Wolf.h
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-01-11 20:34:41 +0100
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-01-12 10:47:59 +0100
commit359e772dee0ef4595c8ad982f17e13725f255219 (patch)
tree4c784bee23613af41e0dda909b90c1c2fd7140a6 /src/Mobs/Wolf.h
parentMerge pull request #2848 from Nakkar/master (diff)
downloadcuberite-359e772dee0ef4595c8ad982f17e13725f255219.tar
cuberite-359e772dee0ef4595c8ad982f17e13725f255219.tar.gz
cuberite-359e772dee0ef4595c8ad982f17e13725f255219.tar.bz2
cuberite-359e772dee0ef4595c8ad982f17e13725f255219.tar.lz
cuberite-359e772dee0ef4595c8ad982f17e13725f255219.tar.xz
cuberite-359e772dee0ef4595c8ad982f17e13725f255219.tar.zst
cuberite-359e772dee0ef4595c8ad982f17e13725f255219.zip
Diffstat (limited to 'src/Mobs/Wolf.h')
-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;