From 8c43b0fc1a3e6e8dfdad971319702b570628a255 Mon Sep 17 00:00:00 2001 From: icomrade Date: Mon, 22 Aug 2016 23:21:08 -0400 Subject: [PATCH] Move actualSpawnMarkerCount thanks for the tip @ndavalos --- SQF/dayz_server/system/server_monitor.sqf | 25 ++++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/SQF/dayz_server/system/server_monitor.sqf b/SQF/dayz_server/system/server_monitor.sqf index 85722282e..8dbf91e8b 100644 --- a/SQF/dayz_server/system/server_monitor.sqf +++ b/SQF/dayz_server/system/server_monitor.sqf @@ -330,6 +330,18 @@ call server_plantSpawner; // Draw the pseudo random seeds [] execVM "\z\addons\dayz_server\system\scheduler\sched_init.sqf"; // launch the new task scheduler createCenter civilian; + +actualSpawnMarkerCount = 0; +// count valid spawn markers, since different maps have different amounts +for "_i" from 0 to 10 do { + if !([(getMarkerPos format["spawn%1",_i]), [0,0,0]] call BIS_fnc_areEqual) then { + actualSpawnMarkerCount = actualSpawnMarkerCount + 1; + } else { + _i = 11; // exit since we did not find any further markers + }; +}; +diag_log format["Total Number of spawn locations %1", actualSpawnMarkerCount]; + if (isDedicated) then {endLoadingScreen;}; allowConnection = true; sm_done = true; @@ -476,15 +488,4 @@ _debugMarkerPosition = [(_debugMarkerPosition select 0),(_debugMarkerPosition se _vehicle_0 = createVehicle ["DebugBox_DZ", _debugMarkerPosition, [], 0, "CAN_COLLIDE"]; _vehicle_0 setPos _debugMarkerPosition; _vehicle_0 setVariable ["ObjectID","1",true]; -*/ - -actualSpawnMarkerCount = 0; -// count valid spawn markers, since different maps have different amounts -for "_i" from 0 to 10 do { - if !([(getMarkerPos format["spawn%1",_i]), [0,0,0]] call BIS_fnc_areEqual) then { - actualSpawnMarkerCount = actualSpawnMarkerCount + 1; - } else { - _i = 11; // exit since we did not find any further markers - }; -}; -diag_log format["Total Number of spawn locations %1", actualSpawnMarkerCount]; \ No newline at end of file +*/ \ No newline at end of file