summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index a727429d4..d9c51fcef 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -2591,6 +2591,15 @@ void cPlayer::AttachTo(cEntity * a_AttachTo)
void cPlayer::Detach()
{
+ Detach(false);
+}
+
+
+
+
+
+void cPlayer::Detach(bool a_IsTeleporting)
+{
if (m_AttachedTo == nullptr)
{
// The player is not attached to anything. Bail out.
@@ -2607,6 +2616,13 @@ void cPlayer::Detach()
}
Super::Detach();
+
+ // If they are teleporting, no need to figure out position
+ if (a_IsTeleporting)
+ {
+ return;
+ }
+
int PosX = POSX_TOINT;
int PosY = POSY_TOINT;
int PosZ = POSZ_TOINT;