- WorldMap::current()->save_state();
- World::current()->save_state();
-}
-
-void update_worldmap()
-{
- using namespace worldmap;
-
- if(WorldMap::current() == NULL)
- throw std::runtime_error("Can't update Worldmap: none active");
-
- WorldMap::current()->load_state();
+ if (!WorldMap::current())
+ {
+ throw std::runtime_error("Can't save state without active Worldmap");
+ }
+ else
+ {
+ WorldMap::current()->save_state();
+ }