summaryrefslogtreecommitdiffstats
path: root/src/Mobs/Horse.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Mobs/Horse.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/Mobs/Horse.cpp b/src/Mobs/Horse.cpp
index e42241700..d3ba066cc 100644
--- a/src/Mobs/Horse.cpp
+++ b/src/Mobs/Horse.cpp
@@ -32,19 +32,6 @@ cHorse::cHorse(int Type, int Color, int Style, int TameTimes) :
-cHorse::~cHorse()
-{
- auto Window = GetWindow();
- if (Window != nullptr)
- {
- Window->OwnerDestroyed();
- }
-}
-
-
-
-
-
void cHorse::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
{
Super::Tick(a_Dt, a_Chunk);
@@ -123,6 +110,21 @@ void cHorse::Tick(std::chrono::milliseconds a_Dt, cChunk & a_Chunk)
+void cHorse::OnRemoveFromWorld(cWorld & a_World)
+{
+ const auto Window = GetWindow();
+ if (Window != nullptr)
+ {
+ Window->OwnerDestroyed();
+ }
+
+ Super::OnRemoveFromWorld(a_World);
+}
+
+
+
+
+
void cHorse::OnRightClicked(cPlayer & a_Player)
{
Super::OnRightClicked(a_Player);