mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge pull request #1777 from ChillerDragon/pr_demo_wrong_hash
Prefer downloadedmaps over maps ( #1702 )
This commit is contained in:
commit
0992e3c7c4
|
@ -68,13 +68,13 @@ int CDemoRecorder::Start(class IStorage *pStorage, class IConsole *pConsole, con
|
|||
{
|
||||
// open mapfile
|
||||
char aMapFilename[128];
|
||||
// try the normal maps folder
|
||||
str_format(aMapFilename, sizeof(aMapFilename), "maps/%s.map", pMap);
|
||||
// try the downloaded maps
|
||||
str_format(aMapFilename, sizeof(aMapFilename), "downloadedmaps/%s_%08x.map", pMap, Crc);
|
||||
MapFile = pStorage->OpenFile(aMapFilename, IOFLAG_READ, IStorage::TYPE_ALL);
|
||||
if(!MapFile)
|
||||
{
|
||||
// try the downloaded maps
|
||||
str_format(aMapFilename, sizeof(aMapFilename), "downloadedmaps/%s_%08x.map", pMap, Crc);
|
||||
// try the normal maps folder
|
||||
str_format(aMapFilename, sizeof(aMapFilename), "maps/%s.map", pMap);
|
||||
MapFile = pStorage->OpenFile(aMapFilename, IOFLAG_READ, IStorage::TYPE_ALL);
|
||||
}
|
||||
if(!MapFile)
|
||||
|
|
Loading…
Reference in a new issue