- fix tux not advancing on worldmap after solving a level
[supertux.git] / src / scripting / functions.cpp
index 236a12a..456b351 100644 (file)
@@ -166,11 +166,20 @@ void save_state()
   if(World::current() == NULL)
     throw std::runtime_error("Can't save state without active World");
 
-  if(WorldMap::current() != NULL)
-    WorldMap::current()->save_state();
+  WorldMap::current()->save_state();
   World::current()->save_state();
 }
 
+void update_worldmap()
+{
+  using namespace WorldMapNS;
+
+  if(World::current() == NULL)
+    throw std::runtime_error("Can't save state without active World");
+
+  WorldMap::current()->load_state();
+}
+
 // not added to header, function to only be used by others
 // in this file
 bool validate_sector_player()