/////////////////////////////////////////////////////////////////////
| 648 | |
| 649 | ////////////////////////////////////////////////////////////////////////// |
| 650 | void CGameEngine::SetSimulationMode( bool enabled ) |
| 651 | { |
| 652 | if (m_simulationMode == enabled) |
| 653 | return; |
| 654 | m_simulationMode = enabled; |
| 655 | |
| 656 | if (m_simulationMode) |
| 657 | { |
| 658 | // When turning physics on, emulate out of game event. |
| 659 | m_ISystem->GetAISystem()->Reset(); |
| 660 | // [Anton] the order of the next 3 calls changed, since, EVENT_INGAME loads physics state (if any), |
| 661 | // and Reset should be called before it |
| 662 | m_ISystem->GetIPhysicalWorld()->ResetDynamicEntities(); |
| 663 | if (m_IGame) |
| 664 | m_IGame->ResetState(); |
| 665 | GetIEditor()->GetObjectManager()->SendEvent( EVENT_INGAME ); |
| 666 | GetIEditor()->SetConsoleVar( "ai_ignoreplayer",1 ); |
| 667 | GetIEditor()->SetConsoleVar( "ai_soundperception",0 ); |
| 668 | } |
| 669 | else |
| 670 | { |
| 671 | // When turning physics off, emulate out of game event. |
| 672 | m_ISystem->GetAISystem()->Reset(); |
| 673 | m_ISystem->GetIPhysicalWorld()->ResetDynamicEntities(); |
| 674 | if (m_IGame) |
| 675 | m_IGame->ResetState(); |
| 676 | GetIEditor()->GetObjectManager()->SendEvent( EVENT_OUTOFGAME ); |
| 677 | GetIEditor()->SetConsoleVar( "ai_ignoreplayer",0 ); |
| 678 | GetIEditor()->SetConsoleVar( "ai_soundperception",1 ); |
| 679 | |
| 680 | } |
| 681 | } |
| 682 | |
| 683 | ////////////////////////////////////////////////////////////////////////// |
| 684 | void CGameEngine::GenerateAiTriangulation() |
no test coverage detected