summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Entities/Entity.cpp6
-rw-r--r--src/Entities/Player.cpp1
2 files changed, 5 insertions, 2 deletions
diff --git a/src/Entities/Entity.cpp b/src/Entities/Entity.cpp
index 7d9c10ec6..2d8f385cb 100644
--- a/src/Entities/Entity.cpp
+++ b/src/Entities/Entity.cpp
@@ -1063,7 +1063,8 @@ void cEntity::DetectPortal()
{
case dimNether:
{
- cIniFile OwnIni; OwnIni.ReadFile(GetWorld()->GetIniFileName());
+ cIniFile OwnIni;
+ OwnIni.ReadFile(GetWorld()->GetIniFileName());
AString OverworldName = OwnIni.GetValue("General", "OverworldName", cRoot::Get()->GetDefaultWorld()->GetName());
cFile::CreateFolder(FILE_IO_PREFIX + OverworldName);
@@ -1102,7 +1103,8 @@ void cEntity::DetectPortal()
{
case dimEnd:
{
- cIniFile OwnIni; OwnIni.ReadFile(GetWorld()->GetIniFileName());
+ cIniFile OwnIni;
+ OwnIni.ReadFile(GetWorld()->GetIniFileName());
AString OverworldName = OwnIni.GetValue("General", "OverworldName", cRoot::Get()->GetDefaultWorld()->GetName());
cFile::CreateFolder(FILE_IO_PREFIX + OverworldName);
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index eebc9ecf9..c2f384abf 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -89,6 +89,7 @@ cPlayer::cPlayer(cClientHandle* a_Client, const AString & a_PlayerName)
SetPosX(World->GetSpawnX());
SetPosY(World->GetSpawnY());
SetPosZ(World->GetSpawnZ());
+ SetBedPos(Vector3i(World->GetSpawnX(), World->GetSpawnY(), World->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()