summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-11-01 23:19:21 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-11-01 23:19:21 +0100
commit239d6c8d95697036663196e37a824de1b0248959 (patch)
treec373891dee11bb3e85045b28ed07709632f562b7 /source
parentYou can now run multiple worlds by defining them in settings.ini . However there's no way to change worlds on the fly yet (diff)
downloadcuberite-239d6c8d95697036663196e37a824de1b0248959.tar
cuberite-239d6c8d95697036663196e37a824de1b0248959.tar.gz
cuberite-239d6c8d95697036663196e37a824de1b0248959.tar.bz2
cuberite-239d6c8d95697036663196e37a824de1b0248959.tar.lz
cuberite-239d6c8d95697036663196e37a824de1b0248959.tar.xz
cuberite-239d6c8d95697036663196e37a824de1b0248959.tar.zst
cuberite-239d6c8d95697036663196e37a824de1b0248959.zip
Diffstat (limited to 'source')
-rw-r--r--source/cClientHandle.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/cClientHandle.cpp b/source/cClientHandle.cpp
index b4d74cc01..dda2ce2a0 100644
--- a/source/cClientHandle.cpp
+++ b/source/cClientHandle.cpp
@@ -941,6 +941,7 @@ void cClientHandle::Tick(float a_Dt)
World->LockEntities();
// Spawn player (only serversided, so data is loaded)
m_Player = new cPlayer( this, GetUsername() ); // !!DO NOT INITIALIZE!! <- is done after receiving MoveLook Packet
+ m_Player->SetGameMode ( World->GetGameMode() ); //set player's gamemode to server's gamemode at login.
cRoot::Get()->GetPluginManager()->CallHook( cPluginManager::E_PLUGIN_PLAYER_SPAWN, 1, m_Player ); // TODO - this function is called from a seperate thread, which might be dangerous
@@ -948,7 +949,7 @@ void cClientHandle::Tick(float a_Dt)
cPacket_Login LoginResponse;
LoginResponse.m_ProtocolVersion = m_Player->GetUniqueID();
//LoginResponse.m_Username = "";
- LoginResponse.m_ServerMode = m_Player->GetGameMode(); //set gamemode from world.
+ LoginResponse.m_ServerMode = m_Player->GetGameMode(); //set gamemode from player.
LoginResponse.m_MapSeed = 0;
LoginResponse.m_Dimension = 0;
Send( LoginResponse );