1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

- files in local directories (saves & configs) now always have higher

priority than mods. Fixes #1685 and #1733
- fixed possible crash on exit in dispose() function
- (vcmibuilder) fixes problem with partial mp3 -> ogg conversion
This commit is contained in:
Ivan Savenko
2014-03-08 16:05:23 +00:00
parent afcb7072eb
commit d2ae847ecf
13 changed files with 97 additions and 73 deletions

View File

@@ -241,17 +241,17 @@ void CClient::loadGame( const std::string & fname )
CStopWatch tmh;
try
{
std::string clientSaveName = *CResourceHandler::get()->getResourceName(ResourceID(fname, EResType::CLIENT_SAVEGAME));
std::string clientSaveName = *CResourceHandler::get("local")->getResourceName(ResourceID(fname, EResType::CLIENT_SAVEGAME));
std::string controlServerSaveName;
if (CResourceHandler::get()->existsResource(ResourceID(fname, EResType::SERVER_SAVEGAME)))
if (CResourceHandler::get("local")->existsResource(ResourceID(fname, EResType::SERVER_SAVEGAME)))
{
controlServerSaveName = *CResourceHandler::get()->getResourceName(ResourceID(fname, EResType::SERVER_SAVEGAME));
controlServerSaveName = *CResourceHandler::get("local")->getResourceName(ResourceID(fname, EResType::SERVER_SAVEGAME));
}
else// create entry for server savegame. Triggered if save was made after launch and not yet present in res handler
{
controlServerSaveName = clientSaveName.substr(0, clientSaveName.find_last_of(".")) + ".vsgm1";
CResourceHandler::get()->createResource(controlServerSaveName, true);
CResourceHandler::get("local")->createResource(controlServerSaveName, true);
}
if(clientSaveName.empty())