Ticket #3460: t3460_preview_wip_v0.1.patch
File t3460_preview_wip_v0.1.patch, 1.4 KB (added by , 9 years ago) |
---|
-
source/simulation2/Simulation2.cpp
339 339 const bool serializationTestHash = true; // set true to save and compare hash of state 340 340 341 341 SerializationTestState primaryStateBefore; 342 342 ScriptInterface& scriptInterface = m_ComponentManager.GetScriptInterface(); 343 343 344 if (m_EnableSerializationTest) 344 bool doTest = (m_TurnNumber >= 2907) && m_EnableSerializationTest; 345 346 if (doTest) 345 347 { 346 348 ENSURE(m_ComponentManager.SerializeState(primaryStateBefore.state)); 347 349 if (serializationTestDebugDump) 348 350 ENSURE(m_ComponentManager.DumpDebugState(primaryStateBefore.debug, false)); 349 351 if (serializationTestHash) … … 351 353 } 352 354 353 355 UpdateComponents(m_SimContext, turnLengthFixed, commands); 354 356 355 357 356 if ( m_EnableSerializationTest)358 if (doTest) 357 359 { 358 360 // Initialise the secondary simulation 359 361 CTerrain secondaryTerrain; 360 362 CSimContext secondaryContext; 361 363 secondaryContext.m_Terrain = &secondaryTerrain; … … 454 456 if (m_TurnNumber % 500 == 0) 455 457 scriptInterface.GetRuntime()->ShrinkingGC(); 456 458 else 457 459 scriptInterface.GetRuntime()->MaybeIncrementalGC(0.0f); 458 460 459 if (m_EnableOOSLog )461 if (m_EnableOOSLog && m_TurnNumber >= 2907) 460 462 DumpState(); 461 463 462 464 // Start computing AI for the next turn 463 465 CmpPtr<ICmpAIManager> cmpAIManager(m_SimContext, SYSTEM_ENTITY); 464 466 if (cmpAIManager)