mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-11-08 23:51:54 +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:
1 parent
d677033c4c
commit
fd187f466f
5 files changed
+246
-145
No files matched your search
@@ -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