Skip to content

Commit 850f118

Browse files
RampastringCCHyper
authored andcommitted
Fixes a issue where PerformingLoad was not flagged when starting the loading process in Vinifera_Get_All.
1 parent fa8333c commit 850f118

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

src/vinifera/vinifera_hooks.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ static void _Print_CRCs_Intercept(EventClass *ev)
102102
}
103103

104104

105+
#if 0
105106
/**
106107
* This function is for intercepting the call to Clear_Scenarion in Load_All
107108
* to flag that we are performing a load operation, which stops the game from
@@ -120,6 +121,7 @@ static void _On_Load_Clear_Scenario_Intercept()
120121
*/
121122
Vinifera_PerformingLoad = true;
122123
}
124+
#endif
123125

124126

125127
/**
@@ -998,5 +1000,5 @@ void Vinifera_Hooks()
9981000
Patch_Call(0x005B1363, &_Print_CRCs_Intercept);
9991001
Patch_Call(0x005B5340, &_Print_CRCs_Intercept);
10001002

1001-
Patch_Call(0x005D6BEC, &_On_Load_Clear_Scenario_Intercept); // Load_All
1003+
//Patch_Call(0x005D6BEC, &_On_Load_Clear_Scenario_Intercept); // Load_All
10021004
}

src/vinifera/vinifera_saveload.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,15 @@ bool Vinifera_Get_All(IStream *pStm, bool load_net)
479479
DEBUG_INFO("About to call Clear_Scenario()...\n");
480480
Clear_Scenario();
481481

482+
/**
483+
* Now the scenario data has been cleaned up, we can now tell the extension
484+
* hooks that we will be creating the extension classes via the class factories.
485+
*
486+
* Fixes #issue-951, this line was not copied over when the loading process
487+
* was reimplemented.
488+
*/
489+
Vinifera_PerformingLoad = true;
490+
482491
/**
483492
* Load the scenario global information.
484493
*/

0 commit comments

Comments
 (0)