Added %chap% for current chapter directory
parent
c2b8787453
commit
3ef2f976df
|
@ -63,7 +63,7 @@ std::string CLevelParser::BuildSceneName(std::string category, int chapter, int
|
|||
if(category == "custom")
|
||||
{
|
||||
outstream << "levels/custom/";
|
||||
outstream << CRobotMain::GetInstancePointer()->GetUserLevelName(chapter) << "/";
|
||||
outstream << CRobotMain::GetInstancePointer()->GetUserLevelName(chapter);
|
||||
if(rank == 000)
|
||||
{
|
||||
if(sceneFile)
|
||||
|
|
|
@ -165,6 +165,8 @@ std::string CLevelParserParam::InjectLevelDir(std::string path, const std::strin
|
|||
std::string newPath = path;
|
||||
std::string lvlDir = CLevelParser::BuildSceneName(CRobotMain::GetInstancePointer()->GetSceneName(), CRobotMain::GetInstancePointer()->GetSceneRank()/100, CRobotMain::GetInstancePointer()->GetSceneRank()%100, false);
|
||||
boost::replace_all(newPath, "%lvl%", lvlDir);
|
||||
std::string chapDir = CLevelParser::BuildSceneName(CRobotMain::GetInstancePointer()->GetSceneName(), CRobotMain::GetInstancePointer()->GetSceneRank()/100, 0, false);
|
||||
boost::replace_all(newPath, "%chap%", chapDir);
|
||||
if(newPath == path)
|
||||
{
|
||||
newPath = defaultDir + (!defaultDir.empty() ? "/" : "") + newPath;
|
||||
|
|
Loading…
Reference in New Issue