1
0
forked from mirrors/0ad

Fixes broken autostart for random maps with AI

This was SVN commit r9699.
This commit is contained in:
historic_bruno
2011-06-27 23:27:25 +00:00
parent bdde44d9aa
commit a8fdcfde59
3 changed files with 39 additions and 6 deletions
@@ -716,6 +716,17 @@ bool ScriptInterface::GetProperty_(jsval obj, const char* name, jsval& out)
return true;
}
bool ScriptInterface::GetPropertyInt_(jsval obj, int name, jsval& out)
{
if (! JSVAL_IS_OBJECT(obj))
return false;
JSObject* object = JSVAL_TO_OBJECT(obj);
if (!JS_GetPropertyById(m->m_cx, object, INT_TO_JSID(name), &out))
return false;
return true;
}
bool ScriptInterface::HasProperty(jsval obj, const char* name)
{
if (! JSVAL_IS_OBJECT(obj))