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
+2 -3
View File
@@ -572,7 +572,7 @@ std::vector<std::string> CSimulation2::GetCivData()
PSRETURN ret = file.Load(g_VFS, *it);
if (ret != PSRETURN_OK)
{
LOGERROR(L"Failed to load file '%ls': %hs", path.string().c_str(), GetErrorString(ret));
LOGERROR(L"CSimulation2::GetCivData: Failed to load file '%ls': %hs", path.string().c_str(), GetErrorString(ret));
}
else
{
@@ -584,10 +584,9 @@ std::vector<std::string> CSimulation2::GetCivData()
{
// Some error reading directory
wchar_t error[200];
LOGERROR(L"Error reading directory '%ls': %hs", path.string().c_str(), StatusDescription(ret, error, ARRAY_SIZE(error)));
LOGERROR(L"CSimulation2::GetCivData: Error reading directory '%ls': %ls", path.string().c_str(), StatusDescription(ret, error, ARRAY_SIZE(error)));
}
// Convert from vector to array and stringify
return data;
}