From eaec6a4aabf573389ce0ef6775f52fe2f222660f Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Fri, 9 Aug 2013 16:18:24 +0100 Subject: [PATCH 1/2] Keep players from taking damage when teleporting. (Hopefully). Fixes #29 --- source/Player.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/Player.cpp b/source/Player.cpp index fb752ed87..584a814b2 100644 --- a/source/Player.cpp +++ b/source/Player.cpp @@ -765,6 +765,7 @@ void cPlayer::SendMessage(const AString & a_Message) void cPlayer::TeleportToCoords(double a_PosX, double a_PosY, double a_PosZ) { + m_LastGroundHeight = (float)a_PosY(); SetPosition( a_PosX, a_PosY, a_PosZ ); m_World->BroadcastTeleportEntity(*this, GetClientHandle()); From e9b9f1861c1a5f8615d35f181f6353eecef9c1f3 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Fri, 9 Aug 2013 17:17:04 +0100 Subject: [PATCH 2/2] Fixed stupid syntax error (thanks build system). --- source/Player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Player.cpp b/source/Player.cpp index 584a814b2..b7f53daeb 100644 --- a/source/Player.cpp +++ b/source/Player.cpp @@ -765,7 +765,7 @@ void cPlayer::SendMessage(const AString & a_Message) void cPlayer::TeleportToCoords(double a_PosX, double a_PosY, double a_PosZ) { - m_LastGroundHeight = (float)a_PosY(); + m_LastGroundHeight = (float)a_PosY; SetPosition( a_PosX, a_PosY, a_PosZ ); m_World->BroadcastTeleportEntity(*this, GetClientHandle());