Skip to content

Commit 7aaaf50

Browse files
committed
DUWSR-34 Fix for issue where latest PR merge caused randomly generated zones to not work due to missing 'manually_chosen' variable.
1 parent 5808a82 commit 7aaaf50

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

source/dialog/startup/startup_start.sqf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,12 +334,14 @@ switch (_index) do {
334334

335335
zones_spacing = zones_max_radius + 200;
336336
chosen_settings = true; // Give the go ! BluHQinit.sqf can continue execution
337+
manually_chosen = false;
337338
publicVariable "chosen_settings";
338339
publicVariable "commandpointsblu1";
339340
publicVariable "weather_type";
340341
publicVariable "blufor_ai_skill";
341342
publicVariable "opfor_ai_skill";
342343
publicVariable "enableChopperFastTravel";
344+
publicVariable "manually_chosen";
343345

344346
// commandpointsblu1 = 9999999;
345347
//hint format["Max radius: %1\nMin radius: %2\nZones number: %3\nCommand points: %4\nBLU AP: %5\nOPF AP: %6\nWeather type: %7\nBLU AI skill: %8\nOPF AI skill: %9",zones_max_radius,zones_min_radius,zones_number,commandpointsblu1,opfor_ap,blufor_ap,weather_type,blufor_ai_skill,opfor_ai_skill];

source/initHQ/BluHQinit.sqf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,13 @@ if (!zones_manually_placed) then {
8989
// CALL ZONES GENERATION
9090
waitUntil {!isNil {getsize_script}}; // WAIT UNTIL THE MAPSIZE SCRIPT IS DONE
9191

92-
if (!zones_created && !manually_chosen) then { // CHECK IF ZONES ARE PLACED, IF NOT EXECUTE locatorZonesV1.sqf
93-
_zones_create = [50, 0.2] execVM "initZones\locatorZonesV1.sqf"; // CHECK IF ZONES HAVE ALREADY BEEN PLACED
92+
// CHECK IF ZONES ARE PLACED...
93+
// If not execute locatorZonesV1.sqf if the user wants them randomly placed. V2 if the user wants to place zones.
94+
if (!zones_created && !manually_chosen) then {
95+
_zones_create = [50, 0.2] execVM "initZones\locatorZonesV1.sqf";
9496
} else {
9597
_zones_create = [50, 0.2] execVM "initZones\locatorZonesV2.sqf";
9698
};
97-
9899
};
99100

100101
player allowDamage true;

0 commit comments

Comments
 (0)