|
|
@ -575,11 +575,11 @@ bool CClientEditionModule::onProcessModuleMessage(IModuleProxy *senderModuleProx
|
|
|
|
CScenarioValidator::TValues values;
|
|
|
|
CScenarioValidator::TValues values;
|
|
|
|
std::string md5, signature;
|
|
|
|
std::string md5, signature;
|
|
|
|
|
|
|
|
|
|
|
|
if ( sv.setScenarioToLoad("data/r2_buffer.dat", values, md5, signature, true)
|
|
|
|
if ( sv.setScenarioToLoad("save/r2_buffer.dat", values, md5, signature, true)
|
|
|
|
&& !md5.empty()
|
|
|
|
&& !md5.empty()
|
|
|
|
&& CScenarioValidator::AutoSaveSignature == signature)
|
|
|
|
&& CScenarioValidator::AutoSaveSignature == signature)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
data = _Client->getComLuaModule().loadLocal("data/r2_buffer.dat", values);
|
|
|
|
data = _Client->getComLuaModule().loadLocal("save/r2_buffer.dat", values);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1099,10 +1099,10 @@ void CClientEditionModule::startingScenario(class NLNET::IModuleProxy * /* serve
|
|
|
|
std::string md5, signature;
|
|
|
|
std::string md5, signature;
|
|
|
|
R2::getEditor().getLua().executeScriptNoThrow("r2.Translator.initStartingActIndex()");
|
|
|
|
R2::getEditor().getLua().executeScriptNoThrow("r2.Translator.initStartingActIndex()");
|
|
|
|
|
|
|
|
|
|
|
|
sv.setScenarioToLoad("data/r2_buffer.dat", values, md5, signature, true);
|
|
|
|
sv.setScenarioToLoad("save/r2_buffer.dat", values, md5, signature, true);
|
|
|
|
_LastReadHeader = values;
|
|
|
|
_LastReadHeader = values;
|
|
|
|
uint32 lastActIndex = _StartingActIndex;
|
|
|
|
uint32 lastActIndex = _StartingActIndex;
|
|
|
|
CObject* hlScenario2 = _Client->getComLuaModule().loadLocal("data/r2_buffer.dat", _LastReadHeader);
|
|
|
|
CObject* hlScenario2 = _Client->getComLuaModule().loadLocal("save/r2_buffer.dat", _LastReadHeader);
|
|
|
|
_StartingActIndex = lastActIndex;
|
|
|
|
_StartingActIndex = lastActIndex;
|
|
|
|
if (hlScenario2)
|
|
|
|
if (hlScenario2)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -1206,7 +1206,7 @@ bool CClientEditionModule::requestStartScenario()
|
|
|
|
|
|
|
|
|
|
|
|
CEditor::connexionMsg("uimR2EDGoToDMMode");
|
|
|
|
CEditor::connexionMsg("uimR2EDGoToDMMode");
|
|
|
|
|
|
|
|
|
|
|
|
R2::getEditor().getLua().executeScriptNoThrow("r2.Version.save(\"data/r2_buffer.dat\")");
|
|
|
|
R2::getEditor().getLua().executeScriptNoThrow("r2.Version.save(\"save/r2_buffer.dat\")");
|
|
|
|
CShareServerEditionItfProxy proxy(_ServerEditionProxy);
|
|
|
|
CShareServerEditionItfProxy proxy(_ServerEditionProxy);
|
|
|
|
proxy.startingScenario(this);
|
|
|
|
proxy.startingScenario(this);
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
@ -2472,7 +2472,7 @@ void CClientEditionModule::loadScenarioSucceded(const std::string& filename, con
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (CFile::fileExists(filename))
|
|
|
|
if (CFile::fileExists(filename))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CFile::copyFile("data/r2_buffer.dat", filename.c_str());
|
|
|
|
CFile::copyFile("save/r2_buffer.dat", filename.c_str());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|