1
0

Did some static analysis, fixed some bugs and optimized a lot of code

This commit is contained in:
jfhumann
2014-04-18 21:09:44 +02:00
parent 449afa850e
commit 013da806ec
48 changed files with 257 additions and 212 deletions

View File

@@ -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,7 +1166,7 @@ Vector3d cPlayer::GetThrowSpeed(double a_SpeedCoeff) const
void cPlayer::ForceSetSpeed(Vector3d a_Direction)
void cPlayer::ForceSetSpeed(const Vector3d & a_Direction)
{
SetSpeed(a_Direction);
m_ClientHandle->SendEntityVelocity(*this);