diff options
author | admin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-11-10 21:04:20 +0100 |
---|---|---|
committer | admin@omencraft.com <admin@omencraft.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2011-11-10 21:04:20 +0100 |
commit | 752881911798e3551cbd3712ac098d1c3f7d0767 (patch) | |
tree | d901dca1fc0572924044737bfa7c90f12df4daa6 | |
parent | Can now set gamemode via lua. (diff) | |
download | cuberite-752881911798e3551cbd3712ac098d1c3f7d0767.tar cuberite-752881911798e3551cbd3712ac098d1c3f7d0767.tar.gz cuberite-752881911798e3551cbd3712ac098d1c3f7d0767.tar.bz2 cuberite-752881911798e3551cbd3712ac098d1c3f7d0767.tar.lz cuberite-752881911798e3551cbd3712ac098d1c3f7d0767.tar.xz cuberite-752881911798e3551cbd3712ac098d1c3f7d0767.tar.zst cuberite-752881911798e3551cbd3712ac098d1c3f7d0767.zip |
-rw-r--r-- | source/cClientHandle.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp index 655048180..a399441de 100644 --- a/source/cClientHandle.cpp +++ b/source/cClientHandle.cpp @@ -450,7 +450,9 @@ void cClientHandle::HandlePacket( cPacket* a_Packet ) cPacket_Chat Joined( m_pState->Username + " joined the game!");
cRoot::Get()->GetServer()->Broadcast( Joined, this );
}
-
+ int posx = m_Player->GetPosX();
+ int posy = m_Player->GetPosY();
+ int posz = m_Player->GetPosZ();
// Now initialize player (adds to entity list etc.)
cWorld* PlayerWorld = cRoot::Get()->GetWorld( m_Player->GetLoadedWorldName() );
if( !PlayerWorld ) PlayerWorld = cRoot::Get()->GetDefaultWorld();
@@ -465,6 +467,7 @@ void cClientHandle::HandlePacket( cPacket* a_Packet ) // Then we can start doing more stuffs! :D
m_bLoggedIn = true;
LOG("%s completely logged in", GetUsername() );
+ m_Player->TeleportTo( posx, posy, posz );
StreamChunks();
}
break;
@@ -1195,9 +1198,6 @@ void cClientHandle::Tick(float a_Dt) Send( cPacket_UpdateHealth( (short)m_Player->GetHealth() ) );
World->UnlockEntities();
-
- //quick bugfix to prevent players from spawning in ground
- m_Player->TeleportTo( m_Player->GetPosX(), m_Player->GetPosY()+2, m_Player->GetPosZ() );
}
}
|