From 2776ae4f4456e7bdc06d34f762a43c2a6fd79fd1 Mon Sep 17 00:00:00 2001 From: Andrej Manduch Date: Thu, 24 Oct 2013 15:49:02 +0200 Subject: [PATCH] fix next overworld bug when i try go to next overworld by path, it will end up with error "Warning : Overworld not found world_2". This commit should fix this. --- smc/src/overworld/world_manager.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/smc/src/overworld/world_manager.cpp b/smc/src/overworld/world_manager.cpp index c2bcca8ed..d5970e468 100644 --- a/smc/src/overworld/world_manager.cpp +++ b/smc/src/overworld/world_manager.cpp @@ -203,7 +203,16 @@ cOverworld *cOverworld_Manager :: Get_from_Path( const std::string &path ) if( obj->m_description->m_path.compare( path ) == 0 ) { return obj; + }else if(obj->m_description->m_path.at(0) == '/'){ + + std::string newPath ( obj->m_description->m_path ); + newPath.erase(0,1); + if(newPath.compare( path ) == 0){ + + return obj; + } + } return NULL;