Add OnStart, OnEnd and FreeLevelScript calls to DoTitle.

This commit is contained in:
hispidence 2021-08-27 19:03:23 +01:00
parent 7527ac28ca
commit b765ce9be1

View file

@ -709,6 +709,8 @@ GAME_STATUS DoTitle(int index)
// Initialise ponytails // Initialise ponytails
InitialiseHair(); InitialiseHair();
g_GameScript->OnStart();
ControlPhase(2, 0); ControlPhase(2, 0);
#ifdef NEW_INV #ifdef NEW_INV
int status = 0, frames; int status = 0, frames;
@ -747,6 +749,8 @@ GAME_STATUS DoTitle(int index)
UseSpotCam = false; UseSpotCam = false;
S_CDStop(); S_CDStop();
g_GameScript->OnEnd();
g_GameScript->FreeLevelScripts();
switch (inventoryResult) switch (inventoryResult)
{ {
case INV_RESULT_NEW_GAME: case INV_RESULT_NEW_GAME: