Changed: Save r2_buffer.dat in "save" instead of "data"
This commit is contained in:
parent
4bcaa06896
commit
4cf6b46cc2
3 changed files with 13 additions and 13 deletions
|
@ -575,11 +575,11 @@ bool CClientEditionModule::onProcessModuleMessage(IModuleProxy *senderModuleProx
|
|||
CScenarioValidator::TValues values;
|
||||
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()
|
||||
&& CScenarioValidator::AutoSaveSignature == signature)
|
||||
{
|
||||
data = _Client->getComLuaModule().loadLocal("data/r2_buffer.dat", values);
|
||||
data = _Client->getComLuaModule().loadLocal("save/r2_buffer.dat", values);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1099,10 +1099,10 @@ void CClientEditionModule::startingScenario(class NLNET::IModuleProxy * /* serve
|
|||
std::string md5, signature;
|
||||
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;
|
||||
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;
|
||||
if (hlScenario2)
|
||||
{
|
||||
|
@ -1206,7 +1206,7 @@ bool CClientEditionModule::requestStartScenario()
|
|||
|
||||
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);
|
||||
proxy.startingScenario(this);
|
||||
return true;
|
||||
|
@ -2472,7 +2472,7 @@ void CClientEditionModule::loadScenarioSucceded(const std::string& filename, con
|
|||
}
|
||||
if (CFile::fileExists(filename))
|
||||
{
|
||||
CFile::copyFile("data/r2_buffer.dat", filename.c_str());
|
||||
CFile::copyFile("save/r2_buffer.dat", filename.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3052,7 +3052,7 @@ void CEditor::reset()
|
|||
TAccessMode oldAccessMode = _AccessMode;
|
||||
if (_Mode == EditionMode)
|
||||
{
|
||||
R2::getEditor().getLua().executeScriptNoThrow("r2.Version.save(\"data/r2_buffer.dat\")");
|
||||
R2::getEditor().getLua().executeScriptNoThrow("r2.Version.save(\"save/r2_buffer.dat\")");
|
||||
}
|
||||
release();
|
||||
clearDebugWindow();
|
||||
|
@ -4726,12 +4726,12 @@ void CEditor::autoSave()
|
|||
}
|
||||
}
|
||||
|
||||
if (CFile::fileExists("data/r2_buffer.dat"))
|
||||
if (CFile::fileExists("save/r2_buffer.dat"))
|
||||
{
|
||||
CFile::copyFile("autosave_01.r2", "data/r2_buffer.dat");
|
||||
CFile::copyFile("autosave_01.r2", "save/r2_buffer.dat");
|
||||
}
|
||||
|
||||
R2::getEditor().getLua().executeScriptNoThrow("r2.Version.save(\"data/r2_buffer.dat\")");
|
||||
R2::getEditor().getLua().executeScriptNoThrow("r2.Version.save(\"save/r2_buffer.dat\")");
|
||||
|
||||
|
||||
}
|
||||
|
@ -5261,7 +5261,7 @@ void CEditor::onEditionModeDisconnected()
|
|||
// Because avec using the button the currentScenario = 0
|
||||
try
|
||||
{
|
||||
R2::getEditor().getLua().executeScript("r2.Version.save(\"data/r2_buffer.dat\")");
|
||||
R2::getEditor().getLua().executeScript("r2.Version.save(\"save/r2_buffer.dat\")");
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
|
|
|
@ -1041,7 +1041,7 @@ bool CScenarioValidator::applySave(const std::string& signature)
|
|||
out2 += _ScenarioBody;
|
||||
|
||||
out.serialBuffer((uint8*)out2.c_str(), (uint)out2.size());
|
||||
if (_Filename != std::string("data/r2_buffer.dat") )
|
||||
if (_Filename != std::string("save/r2_buffer.dat") )
|
||||
{
|
||||
nlinfo("Scenario %s saved", _Filename.c_str());
|
||||
}
|
||||
|
@ -1308,7 +1308,7 @@ bool CUserComponentValidator::applySave(const std::string& signature)
|
|||
|
||||
|
||||
out.serialBuffer((uint8*)out2.c_str(),(uint)out2.size());
|
||||
if (_Filename != std::string("data/r2_buffer.dat") )
|
||||
if (_Filename != std::string("save/r2_buffer.dat") )
|
||||
{
|
||||
nlinfo("UserComponent %s saved", _Filename.c_str());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue