mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-27 09:41:16 +00:00
Tweak message and temporarily set model ttl to 0
This commit is contained in:
parent
0ae5755abb
commit
b94818b24a
@ -1614,7 +1614,10 @@ namespace MWScript
|
|||||||
public:
|
public:
|
||||||
void execute(Interpreter::Runtime& runtime) override
|
void execute(Interpreter::Runtime& runtime) override
|
||||||
{
|
{
|
||||||
runtime.getContext().report("Loading all models. This may take a while...");
|
Resource::SceneManager* sceneManager
|
||||||
|
= MWBase::Environment::get().getResourceSystem()->getSceneManager();
|
||||||
|
double delay = sceneManager->getExpiryDelay();
|
||||||
|
sceneManager->setExpiryDelay(0.0);
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
test<ESM::Activator>(count);
|
test<ESM::Activator>(count);
|
||||||
@ -1636,8 +1639,9 @@ namespace MWScript
|
|||||||
test<ESM::Static>(count);
|
test<ESM::Static>(count);
|
||||||
test<ESM::Weapon>(count);
|
test<ESM::Weapon>(count);
|
||||||
|
|
||||||
|
sceneManager->setExpiryDelay(delay);
|
||||||
std::stringstream message;
|
std::stringstream message;
|
||||||
message << "Attempted to load " << count << " models. Check the log for details.";
|
message << "Attempted to load models for " << count << " objects. Check the log for details.";
|
||||||
runtime.getContext().report(message.str());
|
runtime.getContext().report(message.str());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -60,7 +60,7 @@ namespace Resource
|
|||||||
|
|
||||||
/// How long to keep objects in cache after no longer being referenced.
|
/// How long to keep objects in cache after no longer being referenced.
|
||||||
void setExpiryDelay(double expiryDelay) override { mExpiryDelay = expiryDelay; }
|
void setExpiryDelay(double expiryDelay) override { mExpiryDelay = expiryDelay; }
|
||||||
float getExpiryDelay() const { return mExpiryDelay; }
|
double getExpiryDelay() const { return mExpiryDelay; }
|
||||||
|
|
||||||
const VFS::Manager* getVFS() const { return mVFS; }
|
const VFS::Manager* getVFS() const { return mVFS; }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user