diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-02 11:38:51 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-06-02 11:38:51 +0200 |
commit | 1d6c55afcc31fdd9df6e9330c1e6812dfaf45a1a (patch) | |
tree | 7229f7a53d79c5736be4f11718a727d58555f535 /source/cRoot.cpp | |
parent | Fixed a nasty int overflow bug in blockticking code ( http://forum.mc-server.org/showthread.php?tid=457 ) (diff) | |
download | cuberite-1d6c55afcc31fdd9df6e9330c1e6812dfaf45a1a.tar cuberite-1d6c55afcc31fdd9df6e9330c1e6812dfaf45a1a.tar.gz cuberite-1d6c55afcc31fdd9df6e9330c1e6812dfaf45a1a.tar.bz2 cuberite-1d6c55afcc31fdd9df6e9330c1e6812dfaf45a1a.tar.lz cuberite-1d6c55afcc31fdd9df6e9330c1e6812dfaf45a1a.tar.xz cuberite-1d6c55afcc31fdd9df6e9330c1e6812dfaf45a1a.tar.zst cuberite-1d6c55afcc31fdd9df6e9330c1e6812dfaf45a1a.zip |
Diffstat (limited to '')
-rw-r--r-- | source/cRoot.cpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/source/cRoot.cpp b/source/cRoot.cpp index d110c96a3..fd3132f28 100644 --- a/source/cRoot.cpp +++ b/source/cRoot.cpp @@ -247,15 +247,6 @@ void cRoot::UnloadWorlds() -cWorld* cRoot::GetWorld()
-{
- return GetDefaultWorld();
-}
-
-
-
-
-
cWorld* cRoot::GetDefaultWorld()
{
return m_pState->pDefaultWorld;
@@ -277,6 +268,22 @@ cWorld* cRoot::GetWorld( const AString & a_WorldName ) +bool cRoot::ForEachWorld(cWorldListCallback & a_Callback)
+{
+ for( WorldMap::iterator itr = m_pState->WorldsByName.begin(); itr != m_pState->WorldsByName.end(); ++itr )
+ {
+ if (a_Callback.Item(itr->second))
+ {
+ return false;
+ }
+ }
+ return true;
+}
+
+
+
+
+
void cRoot::TickWorlds( float a_Dt )
{
for( WorldMap::iterator itr = m_pState->WorldsByName.begin(); itr != m_pState->WorldsByName.end(); ++itr )
|