mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 01:04:06 +00:00
Split off Object-related functions from ScriptInterface
Follows 34b1920e7b.
This splits off the object-related functions, such as
[Set/Get/Has]Property, CreateObject, CreateArray, FreezeObject.
It also puts the definitions in the header itself, which might end up
with faster code here & there, though perhaps slower compilation time
(somewhat doubtful since we already included most things anyways).
Differential Revision: https://code.wildfiregames.com/D3956
This was SVN commit r25430.
This commit is contained in:
@@ -1178,9 +1178,9 @@ bool CNetServerWorker::OnSimulationCommand(void* context, CFsmEvent* event)
|
||||
const ScriptInterface& scriptInterface = server.GetScriptInterface();
|
||||
ScriptRequest rq(scriptInterface);
|
||||
JS::RootedValue settings(rq.cx);
|
||||
scriptInterface.GetProperty(server.m_InitAttributes, "settings", &settings);
|
||||
if (scriptInterface.HasProperty(settings, "CheatsEnabled"))
|
||||
scriptInterface.GetProperty(settings, "CheatsEnabled", cheatsEnabled);
|
||||
Script::GetProperty(rq, server.m_InitAttributes, "settings", &settings);
|
||||
if (Script::HasProperty(rq, settings, "CheatsEnabled"))
|
||||
Script::GetProperty(rq, settings, "CheatsEnabled", cheatsEnabled);
|
||||
|
||||
PlayerAssignmentMap::iterator it = server.m_PlayerAssignments.find(session->GetGUID());
|
||||
// When cheating is disabled, fail if the player the message claims to
|
||||
|
||||
Reference in New Issue
Block a user