1
0
forked from mirrors/0ad

Balances random map resources.

Attempts to avoid "invalid argument" errors in typed arrays by forcing
them to integer (see #658).
Removes script preloading from map generator (VFS is thread-safe now)
Removes thread checking from ScriptInterface file loading functions.
Adjusts starting entities in civ data.

This was SVN commit r9435.
This commit is contained in:
historic_bruno
2011-05-04 21:24:25 +00:00
parent d6b073df22
commit fffcdbbf21
16 changed files with 260 additions and 242 deletions
@@ -808,8 +808,6 @@ bool ScriptInterface::LoadGlobalScript(const VfsPath& filename, const std::wstri
bool ScriptInterface::LoadGlobalScriptFile(const VfsPath& path)
{
ENSURE(ThreadUtil::IsMainThread()); // VFS isn't thread-safe
if (!VfsFileExists(g_VFS, path))
{
LOGERROR(L"File '%ls' does not exist", path.string().c_str());
@@ -896,8 +894,6 @@ CScriptValRooted ScriptInterface::ParseJSON(const std::string& string_utf8)
CScriptValRooted ScriptInterface::ReadJSONFile(const VfsPath& path)
{
ENSURE(ThreadUtil::IsMainThread()); // VFS isn't thread-safe
if (!VfsFileExists(g_VFS, path))
{
LOGERROR(L"File '%ls' does not exist", path.string().c_str());