mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-24 21:13:20 +00:00
Properly check loaded scripts in the second simulation instance of a serialization test. Fixes #3238
This was SVN commit r16925.
This commit is contained in:
@@ -366,7 +366,8 @@ void CSimulation2Impl::Update(int turnLength, const std::vector<SimulationComman
|
||||
secondaryContext.m_Terrain = &secondaryTerrain;
|
||||
CComponentManager secondaryComponentManager(secondaryContext, scriptInterface.GetRuntime());
|
||||
secondaryComponentManager.LoadComponentTypes();
|
||||
ENSURE(LoadDefaultScripts(secondaryComponentManager, NULL));
|
||||
std::set<VfsPath> secondaryLoadedScripts;
|
||||
ENSURE(LoadDefaultScripts(secondaryComponentManager, &secondaryLoadedScripts));
|
||||
ResetComponentState(secondaryComponentManager, false, false);
|
||||
|
||||
// Load the trigger scripts after we have loaded the simulation.
|
||||
@@ -376,7 +377,7 @@ void CSimulation2Impl::Update(int turnLength, const std::vector<SimulationComman
|
||||
JS::RootedValue mapSettingsCloned(cx2,
|
||||
secondaryComponentManager.GetScriptInterface().CloneValueFromOtherContext(
|
||||
scriptInterface, m_MapSettings));
|
||||
ENSURE(LoadTriggerScripts(secondaryComponentManager, mapSettingsCloned, &m_LoadedScripts));
|
||||
ENSURE(LoadTriggerScripts(secondaryComponentManager, mapSettingsCloned, &secondaryLoadedScripts));
|
||||
}
|
||||
|
||||
// Load the map into the secondary simulation
|
||||
|
||||
Reference in New Issue
Block a user