summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-16 20:00:49 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-01-16 20:00:49 +0100
commit74645fdfaa892e460c1b5444fd35eca11343e570 (patch)
treee002a754e635117b2c9bf60d1a8b47d4f18e7dd1 /src/Entities/Player.cpp
parentPossibly did what xoft wanted (diff)
downloadcuberite-74645fdfaa892e460c1b5444fd35eca11343e570.tar
cuberite-74645fdfaa892e460c1b5444fd35eca11343e570.tar.gz
cuberite-74645fdfaa892e460c1b5444fd35eca11343e570.tar.bz2
cuberite-74645fdfaa892e460c1b5444fd35eca11343e570.tar.lz
cuberite-74645fdfaa892e460c1b5444fd35eca11343e570.tar.xz
cuberite-74645fdfaa892e460c1b5444fd35eca11343e570.tar.zst
cuberite-74645fdfaa892e460c1b5444fd35eca11343e570.zip
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index 22cbf656b..386dc3a42 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -1396,7 +1396,7 @@ void cPlayer::TossItem(
}
}
double vX = 0, vY = 0, vZ = 0;
- EulerToVector(-GetRotation(), GetPitch(), vZ, vX, vY);
+ EulerToVector(-GetRot().x, GetPitch(), vZ, vX, vY);
vY = -vY * 2 + 1.f;
m_World->SpawnItemPickups(Drops, GetPosX(), GetEyeHeight(), GetPosZ(), vX * 3, vY * 3, vZ * 3, true); // 'true' because created by player
}
@@ -1528,7 +1528,7 @@ bool cPlayer::LoadFromDisk()
Json::Value & JSON_PlayerRotation = root["rotation"];
if (JSON_PlayerRotation.size() == 3)
{
- SetRotation ((float)JSON_PlayerRotation[(unsigned int)0].asDouble());
+ SetYaw ((float)JSON_PlayerRotation[(unsigned int)0].asDouble());
SetPitch ((float)JSON_PlayerRotation[(unsigned int)1].asDouble());
SetRoll ((float)JSON_PlayerRotation[(unsigned int)2].asDouble());
}
@@ -1591,7 +1591,7 @@ bool cPlayer::SaveToDisk()
JSON_PlayerPosition.append(Json::Value(GetPosZ()));
Json::Value JSON_PlayerRotation;
- JSON_PlayerRotation.append(Json::Value(GetRotation()));
+ JSON_PlayerRotation.append(Json::Value(GetRot().x));
JSON_PlayerRotation.append(Json::Value(GetPitch()));
JSON_PlayerRotation.append(Json::Value(GetRoll()));