summaryrefslogtreecommitdiffstats
path: root/source/cRoot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/cRoot.cpp')
-rw-r--r--source/cRoot.cpp25
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 )