mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-09 13:24:01 +00:00
Correct wrong mod precache logic
This commit is contained in:
parent
0431932b2b
commit
9e66c4cd69
1 changed files with 11 additions and 7 deletions
|
@ -177,15 +177,10 @@ const std::string& Mod::getName() const
|
|||
|
||||
void Mod::recache()
|
||||
{
|
||||
if (doRecache)
|
||||
if(doRecache)
|
||||
{
|
||||
dsq->precacher.clean();
|
||||
dsq->unloadResources();
|
||||
|
||||
dsq->precacher.precacheList("data/precache.txt");
|
||||
dsq->reloadResources();
|
||||
|
||||
core->resetTimer();
|
||||
}
|
||||
|
||||
if(active)
|
||||
|
@ -195,15 +190,24 @@ void Mod::recache()
|
|||
if(fname[fname.length() - 1] != '/')
|
||||
fname += '/';
|
||||
fname += "precache.txt";
|
||||
fname = localisePath(fname, dsq->mod.getPath());
|
||||
fname = core->adjustFilenameCase(fname);
|
||||
if (exists(fname))
|
||||
{
|
||||
modcache.precacheList(fname);
|
||||
core->resetTimer();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
modcache.clean();
|
||||
}
|
||||
|
||||
if(doRecache)
|
||||
{
|
||||
dsq->precacher.precacheList("data/precache.txt");
|
||||
dsq->reloadResources();
|
||||
core->resetTimer();
|
||||
}
|
||||
}
|
||||
|
||||
void Mod::start()
|
||||
|
|
Loading…
Add table
Reference in a new issue