Merge pull request #1151 from melex750/dev-savegame
Fix saving/loading "NewScript" programs for factory bots1008-fix
commit
b36d40a509
|
@ -3667,7 +3667,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
|||
|
||||
if (line->GetCommand() == "NewScript" && !resetObject)
|
||||
{
|
||||
m_newScriptName.push_back(NewScriptName(line->GetParam("type")->AsObjectType(OBJECT_NULL), const_cast<char*>(line->GetParam("name")->AsPath("ai").c_str())));
|
||||
m_newScriptName.push_back(NewScriptName(line->GetParam("type")->AsObjectType(OBJECT_NULL), line->GetParam("name")->AsString("")));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -667,7 +667,7 @@ bool CAutoFactory::CreateVehicle()
|
|||
for (const std::string& name : m_main->GetNewScriptNames(m_type))
|
||||
{
|
||||
Program* prog = programStorage->AddProgram();
|
||||
programStorage->ReadProgram(prog, InjectLevelPathsForCurrentLevel(name));
|
||||
programStorage->ReadProgram(prog, InjectLevelPathsForCurrentLevel(name, "ai"));
|
||||
prog->readOnly = true;
|
||||
prog->filename = name;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue