summaryrefslogtreecommitdiffstats
path: root/source/cServer.cpp
diff options
context:
space:
mode:
authorfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-10-31 01:52:20 +0100
committerfaketruth <faketruth@0a769ca7-a7f5-676a-18bf-c427514a06d6>2011-10-31 01:52:20 +0100
commite2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f (patch)
tree2519b9736038f7d5374719122b4ba7937d2e309c /source/cServer.cpp
parentput the timer and quicksort functions into their own files. Made a few changes to the converter. Converter doesn't understand Entity tags and some chunks cause it to segfault for a currently unknown reason. (diff)
downloadcuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.gz
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.bz2
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.lz
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.xz
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.tar.zst
cuberite-e2f1cf51c759f0c70bc1dc9f1db3a8575e1db10f.zip
Diffstat (limited to '')
-rw-r--r--source/cServer.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/cServer.cpp b/source/cServer.cpp
index 511678939..8ea00a523 100644
--- a/source/cServer.cpp
+++ b/source/cServer.cpp
@@ -227,6 +227,7 @@ cServer::~cServer()
delete m_pState;
}
+// TODO - Need to modify this or something, so it broadcasts to all worlds? And move this to cWorld?
void cServer::Broadcast( const cPacket & a_Packet, cClientHandle* a_Exclude /* = 0 */ )
{
//m_World->LockClientHandle();
@@ -239,6 +240,7 @@ void cServer::Broadcast( const cPacket & a_Packet, cClientHandle* a_Exclude /* =
//m_World->UnlockClientHandle();
}
+// TODO - Need to move this to cWorld I think
void cServer::SendAllEntitiesTo(cClientHandle* a_Target)
{
cWorld* World = cRoot::Get()->GetWorld();
@@ -261,7 +263,7 @@ void cServer::StartListenClient()
LOG("%s connected!", ClientIP);
cClientHandle *NewHandle = new cClientHandle( SClient );
- cWorld* World = cRoot::Get()->GetWorld();
+ cWorld* World = cRoot::Get()->GetWorld(); // TODO - I don't think the world cares for the client at this stage, besides for calling the tick function
World->LockClientHandle();
World->AddClient( NewHandle );
World->UnlockClientHandle();
@@ -282,7 +284,7 @@ bool cServer::Tick(float a_Dt)
m_Millisecondsf = m_Millisecondsf - (int)m_Millisecondsf;
}
- cWorld* World = cRoot::Get()->GetWorld();
+ cWorld* World = cRoot::Get()->GetWorld(); // TODO - Iterate through all worlds, or give all worlds their own thread
World->Tick(a_Dt);
World->LockClientHandle();
@@ -440,7 +442,7 @@ void cServer::ServerCommand( const char* a_Cmd )
}
if( split[0].compare( "save-all" ) == 0 )
{
- cRoot::Get()->GetWorld()->SaveAllChunks();
+ cRoot::Get()->GetWorld()->SaveAllChunks(); // TODO - Force ALL worlds to save their chunks
return;
}
if( split[0].compare( "list" ) == 0 )