Browse Source

Add loadingscreen fix

m3ales 4 years ago
parent
commit
64a5ce071a
1 changed files with 12 additions and 0 deletions
  1. 12 0
      addons - Copy/RD501_Main/XEH_postinit.sqf

+ 12 - 0
addons - Copy/RD501_Main/XEH_postinit.sqf

@@ -26,3 +26,15 @@ RD501_AUTO_RELOAD_ON_EQUIP = [QWEAP_NOFAM(z1000),QWEAP_LAUNCH(rps1)];
 
 // Magclamp
 call macro_fnc_name(magclamp);
+
+// Check every second for if the Loading Screen is still up and forcibly end it.
+_fnc_endLoadingScreen = {
+	params ["_args", "_handle"];
+	systemChat format["Ending LoadingScreen [Attempt %1]", _handle];
+	endLoadingScreen;
+	_stillLoading = call BIS_fnc_isLoading;
+	if(!_stillLoading) exitWith {
+		[_handle] call CBA_fnc_removePerFrameHandler;
+	};
+};
+[_fnc_endLoadingScreen, 1, []] call CBA_fnc_addPerFrameHandler;