1
0
forked from 0ad/0ad

Fix formatting

This was SVN commit r11377.
This commit is contained in:
Ykkrosh 2012-03-20 18:13:27 +00:00
parent e97547dbd4
commit f1e73807a8

View File

@ -617,11 +617,13 @@ void ScriptInterface::ReplaceNondeterministicFunctions(boost::rand48& rng)
// Load a script which replaces some of the system dependent trig functions
VfsPath path("globalscripts/Math.js");
// This function is called from tests scripts without the VFS set up so silently fail because every other option seems worse
if (g_VFS && VfsFileExists(path) ){
// This function is called from tests without the VFS set up,
// so silently fail in that case because every other option seems worse
if (g_VFS && VfsFileExists(path))
{
if (!this->LoadGlobalScriptFile(path))
{
LOGERROR(L"ReplaceNondeterministicFunctions: failed to load globalscripts/Math.js");
LOGERROR(L"ReplaceNondeterministicFunctions: failed to load %ls", path.string().c_str());
return;
}
}