From 4cf6b46cc29767548efdda16a9c5fd35e8bc4438 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 12 Nov 2010 13:37:40 +0100 Subject: [PATCH] Changed: Save r2_buffer.dat in "save" instead of "data" --- .../client/src/r2/dmc/client_edition_module.cpp | 12 ++++++------ code/ryzom/client/src/r2/editor.cpp | 10 +++++----- code/ryzom/common/src/game_share/scenario.cpp | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/code/ryzom/client/src/r2/dmc/client_edition_module.cpp b/code/ryzom/client/src/r2/dmc/client_edition_module.cpp index b9f2aee4c..785a0994d 100644 --- a/code/ryzom/client/src/r2/dmc/client_edition_module.cpp +++ b/code/ryzom/client/src/r2/dmc/client_edition_module.cpp @@ -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()); } } diff --git a/code/ryzom/client/src/r2/editor.cpp b/code/ryzom/client/src/r2/editor.cpp index b58e9262f..646705f78 100644 --- a/code/ryzom/client/src/r2/editor.cpp +++ b/code/ryzom/client/src/r2/editor.cpp @@ -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) { diff --git a/code/ryzom/common/src/game_share/scenario.cpp b/code/ryzom/common/src/game_share/scenario.cpp index 0a25acddd..819e102a3 100644 --- a/code/ryzom/common/src/game_share/scenario.cpp +++ b/code/ryzom/common/src/game_share/scenario.cpp @@ -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()); }