mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 11:44:30 +00:00
Add vector prototype to vector-like return values from C++ to JS. Fixes #2394.
This was SVN commit r14645.
This commit is contained in:
@@ -627,7 +627,11 @@ bool ScriptInterface::LoadGlobalScripts()
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
jsval proto;
|
||||
if (JS_GetProperty(m->m_cx, JS_GetGlobalObject(m->m_cx), "Vector2Dprototype", &proto))
|
||||
vector2Dprototype = CScriptValRooted(m->m_cx, proto);
|
||||
if (JS_GetProperty(m->m_cx, JS_GetGlobalObject(m->m_cx), "Vector3Dprototype", &proto))
|
||||
vector3Dprototype = CScriptValRooted(m->m_cx, proto);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1033,7 +1037,6 @@ bool ScriptInterface::LoadGlobalScriptFile(const VfsPath& path)
|
||||
return ok ? true : false;
|
||||
}
|
||||
|
||||
|
||||
bool ScriptInterface::Eval(const char* code)
|
||||
{
|
||||
jsval rval;
|
||||
|
||||
Reference in New Issue
Block a user