1
0
Fork 0
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:
fgenesis 2013-07-11 15:07:39 +02:00
parent 0431932b2b
commit 9e66c4cd69

View file

@ -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()