From b5b920dedaa62302795b0b8f3db84a0650d236e0 Mon Sep 17 00:00:00 2001 From: faketruth Date: Tue, 1 Nov 2011 21:57:08 +0000 Subject: You can now run multiple worlds by defining them in settings.ini . However there's no way to change worlds on the fly yet Players are now stored in separate folder /players instead of in the world folder (!so move the folder!) Fixed a memory leak/error in cPickup.cpp Multiple worlds are stored in cRoot cClientHandle lists are taken out of cWorld and now stored in cServer Worlds now have names to distinguish them by Some functions in the Core plugin now distinguish between worlds git-svn-id: http://mc-server.googlecode.com/svn/trunk@40 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- Plugins/Core.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Plugins') diff --git a/Plugins/Core.lua b/Plugins/Core.lua index e124a9261..4438401a9 100644 --- a/Plugins/Core.lua +++ b/Plugins/Core.lua @@ -115,7 +115,7 @@ function CorePlugin:Initialize() end function HandleTopCommand( Split, Player ) - local World = cRoot:Get():GetWorld() + local World = Player:GetWorld() local PlayerPos = Player:GetPosition() local Height = World:GetHeight( math.floor(PlayerPos.x), math.floor(PlayerPos.z) ) @@ -218,7 +218,7 @@ function ShowMOTDTo( Player ) end function HandleSpawnCommand( Split, Player ) - World = cRoot:Get():GetWorld() + World = Player:GetWorld() Player:TeleportTo( World:GetSpawnX(), World:GetSpawnY(), World:GetSpawnZ() ) LOGINFO( Player:GetName() .. " returned to spawn." ) return true -- cgit v1.2.3