forked from 0ad/0ad
Forgot to change a JSFunctionProperty getter function to the new prototype.
This was SVN commit r2997.
This commit is contained in:
parent
7362d746d5
commit
ea7f4054c4
@ -263,7 +263,7 @@ void CGameAttributes::ScriptingInit()
|
|||||||
PlayerSlotArray_JS::Construct, 0, NULL, NULL, NULL, NULL);
|
PlayerSlotArray_JS::Construct, 0, NULL, NULL, NULL, NULL);
|
||||||
|
|
||||||
AddMethod<jsval, &CGameAttributes::JSI_GetOpenSlot>("getOpenSlot", 0);
|
AddMethod<jsval, &CGameAttributes::JSI_GetOpenSlot>("getOpenSlot", 0);
|
||||||
AddProperty(L"slots", (GetFn)&CGameAttributes::JSI_GetPlayerSlots);
|
AddProperty(L"slots", &CGameAttributes::JSI_GetPlayerSlots);
|
||||||
|
|
||||||
CJSObject<CGameAttributes>::ScriptingInit("GameAttributes");
|
CJSObject<CGameAttributes>::ScriptingInit("GameAttributes");
|
||||||
}
|
}
|
||||||
@ -279,7 +279,7 @@ jsval CGameAttributes::JSI_GetOpenSlot(JSContext* UNUSED(cx), uintN UNUSED(argc)
|
|||||||
return JSVAL_NULL;
|
return JSVAL_NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
jsval CGameAttributes::JSI_GetPlayerSlots()
|
jsval CGameAttributes::JSI_GetPlayerSlots(JSContext* UNUSED(cx))
|
||||||
{
|
{
|
||||||
return OBJECT_TO_JSVAL(m_PlayerSlotArrayJS);
|
return OBJECT_TO_JSVAL(m_PlayerSlotArrayJS);
|
||||||
}
|
}
|
||||||
|
@ -143,7 +143,7 @@ private:
|
|||||||
virtual void Update(CStrW name, ISynchedJSProperty *attrib);
|
virtual void Update(CStrW name, ISynchedJSProperty *attrib);
|
||||||
static void OnNumSlotsUpdate(CSynchedJSObjectBase *owner);
|
static void OnNumSlotsUpdate(CSynchedJSObjectBase *owner);
|
||||||
|
|
||||||
jsval JSI_GetPlayerSlots();
|
jsval JSI_GetPlayerSlots(JSContext* cx);
|
||||||
jsval JSI_GetOpenSlot(JSContext *cx, uintN argc, jsval *argv);
|
jsval JSI_GetOpenSlot(JSContext *cx, uintN argc, jsval *argv);
|
||||||
static void ScriptingInit();
|
static void ScriptingInit();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user