diff options
| author | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:55:04 +0300 |
|---|---|---|
| committer | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:55:04 +0300 |
| commit | b06990293397d4b6d0374097f09d1cc5679216e3 (patch) | |
| tree | 5719922562e317a8083250c178f24376b6692569 /Common/Init/Init_Towns.sqf | |
| download | a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.tar.gz a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.tar.bz2 a2wf_saralite-b06990293397d4b6d0374097f09d1cc5679216e3.zip | |
init
Diffstat (limited to 'Common/Init/Init_Towns.sqf')
| -rw-r--r-- | Common/Init/Init_Towns.sqf | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/Common/Init/Init_Towns.sqf b/Common/Init/Init_Towns.sqf new file mode 100644 index 0000000..4ee8796 --- /dev/null +++ b/Common/Init/Init_Towns.sqf @@ -0,0 +1,25 @@ +Private ["_startAt","_txt"];
+
+waitUntil{townModeSet};
+_startAt = time;
+waitUntil {!isNil "totalTowns" || time - _startAt > 120};
+waitUntil {(count towns == totalTowns) || time - _startAt > 120};
+if ((count towns != totalTowns) && local player) then {
+ _txt = Format["DEBUG: \n\n Something might be wrong with the town initialization process... \n\n This could be related to the towns amount set in WF_Logic or to the initialization itself, try to rejoin the game if the auto-fix doesn't work... \n\n Extra Info: \n count towns: %1 \n totalTowns: %2... \n\n The game will now attempt to fix itself...",count towns,totalTowns];
+ _txt Call DebugHint;
+
+ /* Attempt to fix Null over JIP */
+ towns = towns - [objNull];
+ if (count towns == totalTowns) then
+ {
+ townInit = true;
+ }
+ else
+ {
+ diag_log Format["[WFBE (INIT)] Init_Towns: Fail with count towns = %1, totalTowns = %2",count towns, totalTowns];
+ sleep 5;
+ failMission "END1";
+ };
+} else {townInit = true};
+
+diag_log Format["[WFBE (INIT)][frameno:%1 | ticktime:%2] Init_Towns: Towns initialization - [Done]",diag_frameno,diag_tickTime];
\ No newline at end of file |
