summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Wolf.h
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2016-01-12 11:13:36 +0100
committerLogicParrot <LogicParrot@users.noreply.github.com>2016-01-12 11:13:36 +0100
commite2a053263f4798f879392756bb056eabf0ade3a4 (patch)
tree5d543baa8842fe74c4ed66984860be483d28c627 /src/Mobs/Wolf.h
parentMerge pull request #2853 from cuberite/DetailedBlockAreaLogging (diff)
parentTamed wolf assists owner (attack / defence) (diff)
downloadcuberite-e2a053263f4798f879392756bb056eabf0ade3a4.tar
cuberite-e2a053263f4798f879392756bb056eabf0ade3a4.tar.gz
cuberite-e2a053263f4798f879392756bb056eabf0ade3a4.tar.bz2
cuberite-e2a053263f4798f879392756bb056eabf0ade3a4.tar.lz
cuberite-e2a053263f4798f879392756bb056eabf0ade3a4.tar.xz
cuberite-e2a053263f4798f879392756bb056eabf0ade3a4.tar.zst
cuberite-e2a053263f4798f879392756bb056eabf0ade3a4.zip
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;