summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.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/Player.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/Player.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Entities/Player.h b/src/Entities/Player.h
index e0a88814d..2f2b9d62e 100644
--- a/src/Entities/Player.h
+++ b/src/Entities/Player.h
@@ -93,6 +93,9 @@ public:
cPlayer(const std::shared_ptr<cClientHandle> & a_Client);
virtual ~cPlayer() override;
+ /** Called when spectation stops, because the player crouched or when the entity we're spectating gets removed from the world. */
+ void OnLoseSpectated();
+
// tolua_begin
/** Sets the experience total
@@ -184,7 +187,7 @@ public:
void SendRotation(double a_YawDegrees, double a_PitchDegrees);
/** Spectates the target entity. If a_Target is nullptr or a pointer to self, end spectation. */
- void SpectateEntity(const cEntity * a_Target);
+ void SpectateEntity(cEntity * a_Target);
/** Returns the position where projectiles thrown by this player should start, player eye position + adjustment */
Vector3d GetThrowStartPos(void) const;
@@ -731,7 +734,7 @@ private:
cTeam * m_Team;
/** The entity that this player is spectating, nullptr if none. */
- const cEntity * m_Spectating;
+ cEntity * m_Spectating;
StatisticsManager m_Stats;