Fixed missing uniforms and added checks for units spawned on water.
This commit is contained in:
parent
a23a9aad3c
commit
959c4da4d7
@ -21,10 +21,11 @@ switch (toLower worldName) do
|
||||
case "taviana": {_mapCenter = [12000,12000,0];_maxDistance = 12000};
|
||||
case "napf" : {_mapCenter = getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition");_maxDistance = 12000};
|
||||
case "lythium": {_mapCenter = [10000,10000,0]; _maxDistance = 6000;};
|
||||
case "vt7": {_mapCenter = [9000,9000,0]; _maxDistance = 9000};
|
||||
default {_mapCenter = [6000,6000,0]; _maxDistance = 6000;};
|
||||
};
|
||||
|
||||
_evaluate = true;
|
||||
private _evaluate = true;
|
||||
while {_evaluate} do
|
||||
{
|
||||
_waterPos = [
|
||||
@ -35,33 +36,14 @@ _evaluate = true;
|
||||
2, // water mode [2 = water only]
|
||||
25, // max gradient
|
||||
0 // shoreMode [0 = anywhere]
|
||||
] call BIS_fnc_findSafePos;
|
||||
/*
|
||||
_priorUMSpositions = +blck_priorDynamicUMS_Missions;
|
||||
] call BIS_fnc_findSafePos;
|
||||
|
||||
if (((getTerrainHeightASL _waterPos) < -4) && (getTerrainHeightASL _waterPos) > -10) then
|
||||
{
|
||||
if (diag_tickTime > ((_x select 1) + 1800) then
|
||||
{
|
||||
blck_priorDynamicUMS_Missions = blck_priorDynamicUMS_Missions - _x;
|
||||
} else {
|
||||
if (_waterPos distance2D (_x select 0) < 2000) exitWith {_evaluate = false};
|
||||
};
|
||||
} forEach _priorUMSpositions;
|
||||
*/
|
||||
if (_evaluate) then
|
||||
{
|
||||
if (abs(getTerrainHeightASL _waterPos) < 30) then
|
||||
{
|
||||
if (abs(getTerrainHeightASL _waterPos) > 1) then
|
||||
{
|
||||
//_waterMarker = createMarker [format["water mission %1",getTerrainHeightASL _waterPos],_waterPos];
|
||||
//_waterMarker setMarkerColor "ColorRed";
|
||||
//_waterMarker setMarkerType "mil_triangle";
|
||||
//_waterMarker setMarkerText format["Depth %1",getTerrainHeightASL _waterPos];
|
||||
_evaluate = false;
|
||||
};
|
||||
};
|
||||
_evaluate = false;
|
||||
};
|
||||
};
|
||||
//diag_log format["_findShoreLocation: _waterPos = %1",_waterPos];
|
||||
_waterPos
|
||||
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
*/
|
||||
#include "\q\addons\custom_server\Configs\blck_defines.hpp";
|
||||
|
||||
private ["_i","_weap","_skin","_unit","_skillLevel","_aiSkills","_launcherRound","_index","_ammoChoices","_optics","_pointers","_muzzles","_underbarrel","_legalOptics"];
|
||||
private ["_i","_weap","_unit","_skillLevel","_aiSkills","_launcherRound","_index","_ammoChoices","_optics","_pointers","_muzzles","_underbarrel","_legalOptics"];
|
||||
params["_pos","_aiGroup",["_skillLevel","red"],["_uniforms", []],["_headGear",[]],["_vests",[]],["_backpacks",[]],["_Launcher","none"],["_weaponList",[]],["_sideArms",[]],["_scuba",false],["_garrison",false]];
|
||||
|
||||
if (_weaponList isEqualTo []) then {_weaponList = [_skillLevel] call blck_fnc_selectAILoadout};
|
||||
@ -60,17 +60,6 @@ if (_scuba) then
|
||||
_unit swiminDepth (([_pos] call blck_fnc_findWaterDepth) / 2);
|
||||
};
|
||||
|
||||
_skin = "";
|
||||
_counter = 1;
|
||||
|
||||
if (surfaceIsWater (getPos _unit)) then
|
||||
{
|
||||
_uniforms = blck_UMS_uniforms;
|
||||
_headGear = blck_UMS_headgear;
|
||||
_weaponList = blck_UMS_weapons;
|
||||
_vests = blck_UMS_vests;
|
||||
};
|
||||
|
||||
//Sets AI Tactics
|
||||
_unit enableAI "ALL";
|
||||
if(_garrison) then
|
||||
@ -81,6 +70,14 @@ _unit allowDammage true;
|
||||
_unit setBehaviour "COMBAT";
|
||||
_unit setunitpos "AUTO";
|
||||
|
||||
if (surfaceIsWater (getPos _unit)) then
|
||||
{
|
||||
_uniforms = blck_UMS_uniforms;
|
||||
_headGear = blck_UMS_headgear;
|
||||
_weaponList = blck_UMS_weapons;
|
||||
_vests = blck_UMS_vests;
|
||||
};
|
||||
_unit forceAddUniform (selectRandom _uniforms);
|
||||
if !(_headGear isEqualTo []) then
|
||||
{
|
||||
_unit addHeadgear (selectRandom _headGear);
|
||||
|
@ -52,7 +52,7 @@ blck_missionData = [];
|
||||
blck_activeMissionsList = [];
|
||||
blck_initializedMissionsList = [];
|
||||
blck_blackListedLocations = []; // [ [marker, time]]
|
||||
|
||||
blck_activeMonitorThreads = 0;
|
||||
blck_validEndStates = ["allUnitsKilled", "playerNear", "allKilledOrPlayerNear","assetSecured"];
|
||||
blck_validLootSpawnTimings = ["atMissionSpawnGround","atMissionSpawnAir","atMissionEndGround","atMissionEndAir"];
|
||||
blck_validLootLoadTimings = ["atMissionCompletion", "atMissionSpawn"];
|
||||
|
Loading…
Reference in New Issue
Block a user