1
0
forked from mirrors/0ad

Deep freeze simulation commands to prevent accidental updates. Fixes #3647.

This was SVN commit r17673.
This commit is contained in:
leper
2016-01-18 22:24:50 +00:00
parent e035e3e985
commit f34dc412b6
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -164,6 +164,7 @@ public:
JSContext* cxNew = newScript.GetContext();
JSAutoRequest rqNew(cxNew);
JS::RootedValue tmpCommand(cxNew, newScript.CloneValueFromOtherContext(oldScript, command.data));
newScript.FreezeObject(tmpCommand, true);
SimulationCommand cmd(command.player, cxNew, tmpCommand);
newCommands.emplace_back(std::move(cmd));
}