Player death crashfix
This commit is contained in:
parent
0f2cebb786
commit
e223eec1c0
@ -108,7 +108,9 @@ cPlayer::cPlayer(cClientHandlePtr a_Client, const AString & a_PlayerName) :
|
|||||||
SetPosX(World->GetSpawnX());
|
SetPosX(World->GetSpawnX());
|
||||||
SetPosY(World->GetSpawnY());
|
SetPosY(World->GetSpawnY());
|
||||||
SetPosZ(World->GetSpawnZ());
|
SetPosZ(World->GetSpawnZ());
|
||||||
SetBedPos(Vector3i(static_cast<int>(World->GetSpawnX()), static_cast<int>(World->GetSpawnY()), static_cast<int>(World->GetSpawnZ())));
|
|
||||||
|
// This is a new player. Set the player spawn point to the spawn point of the default world
|
||||||
|
SetBedPos(Vector3i(static_cast<int>(World->GetSpawnX()), static_cast<int>(World->GetSpawnY()), static_cast<int>(World->GetSpawnZ())), World);
|
||||||
|
|
||||||
LOGD("Player \"%s\" is connecting for the first time, spawning at default world spawn {%.2f, %.2f, %.2f}",
|
LOGD("Player \"%s\" is connecting for the first time, spawning at default world spawn {%.2f, %.2f, %.2f}",
|
||||||
a_PlayerName.c_str(), GetPosX(), GetPosY(), GetPosZ()
|
a_PlayerName.c_str(), GetPosX(), GetPosY(), GetPosZ()
|
||||||
|
Loading…
Reference in New Issue
Block a user