summaryrefslogtreecommitdiffstats
path: root/src/Entities/Entity.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@outlook.com>2022-02-07 01:53:44 +0100
committerAlexander Harkness <me@bearbin.net>2022-02-08 22:47:19 +0100
commit4b60d55d8d97da113dbb2e90c2a4834e8e813629 (patch)
treefa8d2eefa28b54c364752253c031e250e95c4d4a /src/Entities/Entity.h
parentCustom 25565 port page (#5369) (diff)
downloadcuberite-4b60d55d8d97da113dbb2e90c2a4834e8e813629.tar
cuberite-4b60d55d8d97da113dbb2e90c2a4834e8e813629.tar.gz
cuberite-4b60d55d8d97da113dbb2e90c2a4834e8e813629.tar.bz2
cuberite-4b60d55d8d97da113dbb2e90c2a4834e8e813629.tar.lz
cuberite-4b60d55d8d97da113dbb2e90c2a4834e8e813629.tar.xz
cuberite-4b60d55d8d97da113dbb2e90c2a4834e8e813629.tar.zst
cuberite-4b60d55d8d97da113dbb2e90c2a4834e8e813629.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Entity.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Entities/Entity.h b/src/Entities/Entity.h
index 941d07339..2f9ba229b 100644
--- a/src/Entities/Entity.h
+++ b/src/Entities/Entity.h
@@ -135,11 +135,17 @@ public:
Adds the entity to the world. */
bool Initialize(OwnedEntity a_Self, cWorld & a_EntityWorld);
+ /** Called when a player begins spectating this entity. */
+ void OnAcquireSpectator(cPlayer & a_Player);
+
/** Called when the entity is added to a world.
e.g after first spawning or after successfuly moving between worlds.
\param a_World The world being added to. */
virtual void OnAddToWorld(cWorld & a_World);
+ /** Called when a player stops spectating this entity. */
+ void OnLoseSpectator(cPlayer & a_Player);
+
/** Called when the entity is removed from a world.
e.g. When the entity is destroyed or moved to a different world.
\param a_World The world being removed from. */
@@ -723,4 +729,7 @@ private:
/** List of leashed mobs to this entity */
cMonsterList m_LeashedMobs;
+
+ /** List of players who are spectating this entity. */
+ std::vector<cPlayer *> m_Spectators;
} ; // tolua_export