| 628 | } |
| 629 | |
| 630 | void DeInitializeScripting(int levelIndex, GameStatus reason) |
| 631 | { |
| 632 | // Reload gameflow script to clear level script variables. |
| 633 | if (reason != GameStatus::ExitGame) |
| 634 | g_GameFlow->LoadFlowScript(); |
| 635 | |
| 636 | g_GameScript->FreeLevelScripts(); |
| 637 | g_GameScriptEntities->FreeEntities(); |
| 638 | |
| 639 | // If level index is 0, it means we are in a title level and game variables should be cleared. |
| 640 | if (levelIndex == 0) |
| 641 | g_GameScript->ResetScripts(true); |
| 642 | } |
| 643 | |
| 644 | void InitializeOrLoadGame(bool loadGame) |
| 645 | { |
no test coverage detected