diff options
author | r.ramazanov <r.ramazanov@servplus.ru> | 2014-04-23 16:15:28 +0200 |
---|---|---|
committer | r.ramazanov <r.ramazanov@servplus.ru> | 2014-04-23 16:15:28 +0200 |
commit | 103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932 (patch) | |
tree | b17cb676477be05abac7084bc0e1e49f651c2456 /src/Entities/Player.cpp | |
parent | Mobs shouldn't burn when it's Raining #906 (diff) | |
parent | Merge pull request #925 from archshift/master (diff) | |
download | cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.tar cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.tar.gz cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.tar.bz2 cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.tar.lz cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.tar.xz cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.tar.zst cuberite-103c867f1f42c38df3d2bfba2ffbc4c8e7ac2932.zip |
Diffstat (limited to 'src/Entities/Player.cpp')
-rw-r--r-- | src/Entities/Player.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp index 2df0711b4..fedb62527 100644 --- a/src/Entities/Player.cpp +++ b/src/Entities/Player.cpp @@ -85,9 +85,10 @@ cPlayer::cPlayer(cClientHandle* a_Client, const AString & a_PlayerName) if (!LoadFromDisk()) { m_Inventory.Clear(); - SetPosX(cRoot::Get()->GetDefaultWorld()->GetSpawnX()); - SetPosY(cRoot::Get()->GetDefaultWorld()->GetSpawnY()); - SetPosZ(cRoot::Get()->GetDefaultWorld()->GetSpawnZ()); + cWorld * DefaultWorld = cRoot::Get()->GetDefaultWorld(); + SetPosX(DefaultWorld->GetSpawnX()); + SetPosY(DefaultWorld->GetSpawnY()); + SetPosZ(DefaultWorld->GetSpawnZ()); LOGD("Player \"%s\" is connecting for the first time, spawning at default world spawn {%.2f, %.2f, %.2f}", a_PlayerName.c_str(), GetPosX(), GetPosY(), GetPosZ() @@ -1165,9 +1166,9 @@ Vector3d cPlayer::GetThrowSpeed(double a_SpeedCoeff) const -void cPlayer::ForceSetSpeed(Vector3d a_Direction) +void cPlayer::ForceSetSpeed(const Vector3d & a_Speed) { - SetSpeed(a_Direction); + SetSpeed(a_Speed); m_ClientHandle->SendEntityVelocity(*this); } |