From e91053ab58617585249750277febc5e1763dd4a7 Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Thu, 9 Jun 2016 19:29:35 +0100 Subject: [PATCH 01/20] Convert scheduled code to per frame handlers --- ARCMF.VR/briefing.sqf | 60 ++++------- ARCMF.VR/description.ext | 17 +--- .../FTMemberMarkers/f_localFTMemberMarker.sqf | 38 ------- ARCMF.VR/f/FTMemberMarkers/fn_GetMarker.sqf | 17 ++-- .../f/FTMemberMarkers/fn_GetMarkerColor.sqf | 11 --- .../FTMemberMarkers/fn_LocalFTMarkerSync.sqf | 26 ----- .../fn_SetLocalFTMemberMarkers.sqf | 61 +++++++----- ARCMF.VR/f/arc/config.hpp | 1 + ARCMF.VR/f/arc/helpers/fn_zeroPad.sqf | 3 + .../f/arc/reinforcements/fn_rejoinMission.sqf | 5 +- ARCMF.VR/f/arc/tracker/fn_updateTracker.sqf | 27 +++-- ARCMF.VR/f/briefing/f_briefing_admin.sqf | 13 +-- ARCMF.VR/f/briefing/f_loadoutNotes.sqf | 89 ----------------- ARCMF.VR/f/briefing/f_orbatNotes.sqf | 90 +++++++++-------- ARCMF.VR/f/cache/fn_cInit.sqf | 43 -------- ARCMF.VR/f/cache/fn_cTracker.sqf | 48 --------- ARCMF.VR/f/cache/fn_gCache.sqf | 37 ------- ARCMF.VR/f/cache/fn_gUncache.sqf | 14 --- ARCMF.VR/f/groupJoin/f_groupJoinAction.sqf | 36 ------- ARCMF.VR/f/safeStart/f_safeStart.sqf | 20 ++-- ARCMF.VR/f/safeStart/f_safeStartLoop.sqf | 38 ++++--- ARCMF.VR/f/setGroupID/f_setGroupIDs.sqf | 6 +- .../f/setTeamColours/f_setTeamColours.sqf | 99 ++++++++++--------- ARCMF.VR/init.sqf | 27 ++--- 24 files changed, 229 insertions(+), 597 deletions(-) delete mode 100644 ARCMF.VR/f/FTMemberMarkers/f_localFTMemberMarker.sqf delete mode 100644 ARCMF.VR/f/FTMemberMarkers/fn_GetMarkerColor.sqf delete mode 100644 ARCMF.VR/f/FTMemberMarkers/fn_LocalFTMarkerSync.sqf create mode 100644 ARCMF.VR/f/arc/helpers/fn_zeroPad.sqf delete mode 100644 ARCMF.VR/f/briefing/f_loadoutNotes.sqf delete mode 100644 ARCMF.VR/f/cache/fn_cInit.sqf delete mode 100644 ARCMF.VR/f/cache/fn_cTracker.sqf delete mode 100644 ARCMF.VR/f/cache/fn_gCache.sqf delete mode 100644 ARCMF.VR/f/cache/fn_gUncache.sqf delete mode 100644 ARCMF.VR/f/groupJoin/f_groupJoinAction.sqf diff --git a/ARCMF.VR/briefing.sqf b/ARCMF.VR/briefing.sqf index b60bcd5..02e3ff0 100644 --- a/ARCMF.VR/briefing.sqf +++ b/ARCMF.VR/briefing.sqf @@ -1,55 +1,29 @@ -if (!isDedicated && (isNull player)) then { - waitUntil {sleep 0.1; !isNull player}; -}; +[{!isNull player}, { + private _unitfaction = toLower (faction player); -private ["_unitfaction"]; -waitUntil {!isNil "f_var_debugMode"}; - -_unitfaction = toLower (faction player); - -if (_unitfaction != toLower (faction (leader group player))) then { - _unitfaction = toLower (faction (leader group player)); -}; - -if (f_var_debugMode == 1) then { - player sideChat format ["DEBUG (briefing.sqf): Player faction: %1", _unitfaction]; -}; + if (_unitfaction != toLower (faction (leader group player))) then { + _unitfaction = toLower (faction (leader group player)); + }; -#include "f\briefing\f_briefing_arcmf.sqf" + #include "f\briefing\f_briefing_arcmf.sqf" -if (serverCommandAvailable "#kick" || isServer) then { - #include "f\briefing\f_briefing_admin.sqf" - if (f_var_debugMode == 1) then { - player sideChat format ["DEBUG (briefing.sqf): Briefing for host selected.", _unitfaction]; + if (serverCommandAvailable "#kick" || isServer) then { + #include "f\briefing\f_briefing_admin.sqf" }; -}; -if (_unitfaction == "blu_f") exitWith { - #include "f\briefing\f_briefing_blufor.sqf" - if (f_var_debugMode == 1) then { - player sideChat format ["DEBUG (briefing.sqf): Briefing for %1 slot selected.", _unitfaction]; + if (_unitfaction == "blu_f") exitWith { + #include "f\briefing\f_briefing_blufor.sqf" }; -}; -if (_unitfaction == "opf_f") exitWith { - #include "f\briefing\f_briefing_opfor.sqf" - if (f_var_debugMode == 1) then { - player sideChat format ["DEBUG (briefing.sqf): Briefing for %1 slot selected.", _unitfaction]; + if (_unitfaction == "opf_f") exitWith { + #include "f\briefing\f_briefing_opfor.sqf" }; -}; -if (_unitfaction == "ind_f") exitWith { - #include "f\briefing\f_briefing_indfor.sqf" - if (f_var_debugMode == 1) then { - player sideChat format ["DEBUG (briefing.sqf): Briefing for %1 slot selected.", _unitfaction]; + if (_unitfaction == "ind_f") exitWith { + #include "f\briefing\f_briefing_indfor.sqf" }; -}; -if (_unitfaction == "civ_f") exitWith { - #include "f\briefing\f_briefing_civ.sqf" - if (f_var_debugMode == 1) then { - player sideChat format ["DEBUG (briefing.sqf): Briefing for %1 slot selected.", _unitfaction]; + if (_unitfaction == "civ_f") exitWith { + #include "f\briefing\f_briefing_civ.sqf" }; -}; - -player globalchat format ["DEBUG (briefing.sqf): Faction %1 is not defined.", _unitfaction]; \ No newline at end of file +}, []] call CBA_fnc_waitUntilAndExecute; diff --git a/ARCMF.VR/description.ext b/ARCMF.VR/description.ext index 357e561..dd2f3c0 100644 --- a/ARCMF.VR/description.ext +++ b/ARCMF.VR/description.ext @@ -36,13 +36,7 @@ class Params { values[] = {0,1,2,3,4,5,6,7,8,9,10,15,30}; texts[] = {"Off","1","2","3","4","5","6","7","8","9","10","15","30"}; default = 30; - code = "f_param_mission_timer = %1 * 60"; - }; - class f_param_caching { - title = "Cache AI outside distance (m)"; - values[] = {0,600,800,1000,1500,2000,2500,3000,3500,4000,4500,5000}; - default = 0; - code = "f_param_caching = %1"; + code = "f_var_mission_timer = %1 * 60"; }; class arc_param_duplex { title = "ACRE Duplex Option"; @@ -142,13 +136,6 @@ class CfgFunctions { class mpEnd {}; class mpEndReceiver {}; }; - class cache { - file = "f\cache"; - class cInit {}; - class cTracker {}; - class gCache {}; - class gUncache {}; - }; class assignGear { file = "f\assignGear"; class assignGear {}; @@ -160,8 +147,6 @@ class CfgFunctions { class FTMemberMarkers { file = "f\FTMemberMarkers"; class SetLocalFTMemberMarkers {}; - class GetMarkerColor {}; - class LocalFTMarkerSync {}; class GetMarker {}; }; class safeStart { diff --git a/ARCMF.VR/f/FTMemberMarkers/f_localFTMemberMarker.sqf b/ARCMF.VR/f/FTMemberMarkers/f_localFTMemberMarker.sqf deleted file mode 100644 index 529463f..0000000 --- a/ARCMF.VR/f/FTMemberMarkers/f_localFTMemberMarker.sqf +++ /dev/null @@ -1,38 +0,0 @@ -private ["_unit","_mkrType","_mkrColor","_mkrName","_mkr","_mkrBorder","_pos"]; - -_unit = _this select 0; -_mkrName = format ["mkr_%1", _unit]; -_mkrborderName = format ["mkrB_%1", _unit]; - -_pos = getPosATL _unit; -_marker = _unit call f_fnc_GetMarker; - -_mkr = createMarkerLocal [_mkrName, _pos]; -_mkr setMarkerShapeLocal "ICON"; -_mkr setMarkerTypeLocal _marker; -_mkr setMarkerColorLocal (_unit getVariable ["assignedTeam", "ColorWhite"]); -_mkr setMarkerSizeLocal [0.8, 0.8]; -_mkr setMarkerDirLocal (direction _unit); - -while {alive _unit && (_unit in f_var_HandlerGroup)} do { - _pos = getPosATL _unit; - _dir = (direction _unit); - if (alive _unit && {_unit in units group player}) then { - _alpha = linearConversion [0, (getNumber (missionConfigFile >> "CfgARCMF" >> "markers" >> ((side (group _unit)) call ARC_fnc_getFactionFromSide) >> "fireteamMemberFadeDistance")), (_unit distance player), 1, 0, true]; - _mkr setMarkerPosLocal _pos; - _mkr setMarkerDirLocal _dir; - _mkr setMarkerColorLocal (_unit getVariable ["assignedTeam", "ColorWhite"]); - _mkr setMarkerAlphaLocal _alpha; - } else { - f_var_HandlerGroup = f_var_HandlerGroup - [_unit]; - }; - sleep 0.1; -}; - -if (!isNil "_mkrBorder") then { - deleteMarkerLocal _mkrBorder; -}; - -if (!isNil "_mkr") then { - deleteMarkerLocal _mkr; -}; \ No newline at end of file diff --git a/ARCMF.VR/f/FTMemberMarkers/fn_GetMarker.sqf b/ARCMF.VR/f/FTMemberMarkers/fn_GetMarker.sqf index 7b7e356..ad99de5 100644 --- a/ARCMF.VR/f/FTMemberMarkers/fn_GetMarker.sqf +++ b/ARCMF.VR/f/FTMemberMarkers/fn_GetMarker.sqf @@ -1,10 +1,11 @@ -private "_unit"; -_unit = _this; +params [["_unit", objNull, [objNull]]]; -if (getNumber(configFile >> "CfgVehicles" >> typeOf(_unit) >> "attendant") == 1) exitWith {"ST_STHudM_Medic";}; -if (getNumber(configFile >> "CfgVehicles" >> typeOf(_unit) >> "engineer") == 1) exitWith {"ST_STHudM_Engineer";}; -if (leader(_unit) == _unit) exitWith {"ST_STHudM_Leader";}; -if (getText(configFile >> "CfgWeapons" >> primaryWeapon(_unit) >> "UIPicture") == "\a3\weapons_f\data\ui\icon_mg_ca.paa") exitWith {"ST_STHudM_MG";}; -if (getText(configFile >> "CfgWeapons" >> secondaryWeapon(_unit) >> "UIPicture") == "\a3\weapons_f\data\ui\icon_at_ca.paa") exitWith {"ST_STHudM_AT";}; +if (isNull _unit) exitWith {""}; -"ST_STHudM_Rifleman"; \ No newline at end of file +if (leader _unit == _unit) exitWith {"ST_STHudM_Leader"}; +if (getText (configFile >> "CfgWeapons" >> secondaryWeapon _unit >> "UIPicture") == "\a3\weapons_f\data\ui\icon_at_ca.paa") exitWith {"ST_STHudM_AT"}; +if (getText (configFile >> "CfgWeapons" >> primaryWeapon _unit >> "UIPicture") == "\a3\weapons_f\data\ui\icon_mg_ca.paa") exitWith {"ST_STHudM_MG"}; +if (getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "attendant") == 1) exitWith {"ST_STHudM_Medic"}; +if (getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer") == 1) exitWith {"ST_STHudM_Engineer"}; + +"ST_STHudM_Rifleman" \ No newline at end of file diff --git a/ARCMF.VR/f/FTMemberMarkers/fn_GetMarkerColor.sqf b/ARCMF.VR/f/FTMemberMarkers/fn_GetMarkerColor.sqf deleted file mode 100644 index 9d28e26..0000000 --- a/ARCMF.VR/f/FTMemberMarkers/fn_GetMarkerColor.sqf +++ /dev/null @@ -1,11 +0,0 @@ -_color = "ColorWhite"; - -switch ((_this select 0)) do { - case "MAIN": {_color = "ColorWhite"}; - case "RED": {_color = "ColorRed"}; - case "GREEN": {_color = "ColorGreen"}; - case "BLUE": {_color = "ColorBlue"}; - case "YELLOW": {_color = "ColorYellow"}; -}; - -_color \ No newline at end of file diff --git a/ARCMF.VR/f/FTMemberMarkers/fn_LocalFTMarkerSync.sqf b/ARCMF.VR/f/FTMemberMarkers/fn_LocalFTMarkerSync.sqf deleted file mode 100644 index f58e4ce..0000000 --- a/ARCMF.VR/f/FTMemberMarkers/fn_LocalFTMarkerSync.sqf +++ /dev/null @@ -1,26 +0,0 @@ -private ["_grp","_colorTeam"]; -_grp = _this select 0; -_unit = _this select 1; -waitUntil {!isNil "f_var_debugMode"}; - -while {_unit == (leader _grp) && alive _unit} do { - { - if (alive _x) then { - _colorTeam = [assignedTeam _x] call f_fnc_GetMarkerColor; - if ((_x getVariable ["assignedTeam", "ColorWhite"]) != _colorTeam) then { - if (f_var_debugMode == 1) then { - player sideChat format["%1 ---- %2 by %3", (_x getVariable ["assignedTeam","ColorWhite"]), _colorTeam, _unit]; - }; - - [[_x, _colorTeam], "f_fnc_SetTeamValue", _grp, false] spawn BIS_fnc_MP; - }; - }; - false - } count units _grp; - sleep 3; -}; - -if (!isNil "_grp") then { - _x = leader _grp; - [[_grp, _x], "f_fnc_LocalFTMarkerSync", _x, false] spawn BIS_fnc_MP; -}; \ No newline at end of file diff --git a/ARCMF.VR/f/FTMemberMarkers/fn_SetLocalFTMemberMarkers.sqf b/ARCMF.VR/f/FTMemberMarkers/fn_SetLocalFTMemberMarkers.sqf index e3c7b12..a20d9fa 100644 --- a/ARCMF.VR/f/FTMemberMarkers/fn_SetLocalFTMemberMarkers.sqf +++ b/ARCMF.VR/f/FTMemberMarkers/fn_SetLocalFTMemberMarkers.sqf @@ -1,27 +1,42 @@ -if (!isDedicated && (isNull player)) then { - waitUntil {sleep 0.1; !isNull player}; -}; +[{!isNull player}, { + [{ + { + private _unit = _x; + private _markerName = format ["ARC_unitMarker_%1", _unit]; -f_fnc_SetTeamValue = { - _unit = _this select 0; - _color = _this select 1; - _unit setVariable ["assignedTeam", _color]; -}; + if (alive _unit) then { + private _markerColor = ["ColorWhite","ColorRed","ColorGreen","ColorBlue","ColorYellow"] select (["MAIN","RED","GREEN","BLUE","YELLOW"] find assignedTeam _unit) max 0; + private _markerIcon = [_unit] call f_fnc_GetMarker; + private _markerPos = getPosATL _unit; + private _markerAlpha = linearConversion [ + 0, + getNumber (missionConfigFile >> "CfgARCMF" >> "markers" >> (side (group _unit) call ARC_fnc_getFactionFromSide) >> "fireteamMemberFadeDistance"), + (_unit distance player), + 1, + 0, + true + ]; -[] spawn { - f_var_HandlerGroup = []; - while {!isNull player} do { - { - if (!(_x in f_var_HandlerGroup) && alive _x) then { - [_x] execVM "f\FTMemberMarkers\f_localFTMemberMarker.sqf"; - f_var_HandlerGroup pushBack _x; + if (_markerName in allMapMarkers) then { + // Marker already exists + _markerName setMarkerPosLocal _markerPos; + _markerName setMarkerTypeLocal _markerIcon; + _markerName setMarkerColorLocal _markerColor; + _markerName setMarkerDirLocal (direction _unit); + _markerName setMarkerAlphaLocal _markerAlpha; + } else { + // Marker doesn't exist + _markerName = createMarkerLocal [_markerName, _markerPos]; + _markerName setMarkerShapeLocal "ICON"; + _markerName setMarkerTypeLocal _markerIcon; + _markerName setMarkerColorLocal _markerColor; + _markerName setMarkerSizeLocal [0.8, 0.8]; + _markerName setMarkerDirLocal (direction _unit); + _markerName setMarkerAlphaLocal _markerAlpha; + }; + } else { + deleteMarkerLocal _markerName; }; - false } count units (group player); - sleep 5; - }; -}; - -if (player == leader (group player)) then { - [group player, player] spawn f_fnc_LocalFTMarkerSync; -}; \ No newline at end of file + }, 0.1, []] call CBA_fnc_addPerFrameHandler; +}, []] call CBA_fnc_waitUntilAndExecute; diff --git a/ARCMF.VR/f/arc/config.hpp b/ARCMF.VR/f/arc/config.hpp index 3a4e61a..8d3aa2a 100644 --- a/ARCMF.VR/f/arc/config.hpp +++ b/ARCMF.VR/f/arc/config.hpp @@ -52,6 +52,7 @@ class ARC class getCfgBool {}; class broadcastDiary {}; class getUnitType {}; + class zeroPad {}; }; class radios { diff --git a/ARCMF.VR/f/arc/helpers/fn_zeroPad.sqf b/ARCMF.VR/f/arc/helpers/fn_zeroPad.sqf new file mode 100644 index 0000000..b44c21e --- /dev/null +++ b/ARCMF.VR/f/arc/helpers/fn_zeroPad.sqf @@ -0,0 +1,3 @@ +params ["_number"]; +if (count (str _number) == 1) exitWith {format ["0%1", _number]}; +str _number \ No newline at end of file diff --git a/ARCMF.VR/f/arc/reinforcements/fn_rejoinMission.sqf b/ARCMF.VR/f/arc/reinforcements/fn_rejoinMission.sqf index 315149b..372286f 100644 --- a/ARCMF.VR/f/arc/reinforcements/fn_rejoinMission.sqf +++ b/ARCMF.VR/f/arc/reinforcements/fn_rejoinMission.sqf @@ -80,9 +80,8 @@ if ((getNumber (missionConfigFile >> "Header" >> "sandbox")) == 1) then { [_newUnit] joinSilent grpNull; // Rebuild briefing -f_script_briefing = [] execVM "briefing.sqf"; -[] execVM "f\briefing\f_orbatNotes.sqf"; -[] execVM "f\briefing\f_loadoutNotes.sqf"; +call compile preprocessFileLineNumbers "briefing.sqf"; +call compile preprocessFileLineNumbers "f\briefing\f_orbatNotes.sqf"; // Execute onSpectatorRespawn script [_newUnit, ARC_cam_preCamPos, ARC_cam_preCamLoadout] execVM "onSpectatorRespawn.sqf"; diff --git a/ARCMF.VR/f/arc/tracker/fn_updateTracker.sqf b/ARCMF.VR/f/arc/tracker/fn_updateTracker.sqf index 7a6e2bf..9e4e28b 100644 --- a/ARCMF.VR/f/arc/tracker/fn_updateTracker.sqf +++ b/ARCMF.VR/f/arc/tracker/fn_updateTracker.sqf @@ -1,40 +1,39 @@ private ["_groupsToDrawMarkers", "_playerSide", "_colour", "_marker"]; -{ - deleteMarkerLocal _x; -} forEach ARC_tracker_markers; +{deleteMarkerLocal _x; false} count ARC_tracker_markers; ARC_tracker_markers = []; if (ARC_tracker_enabled and {(!isNil "ACE_player") and {alive ACE_player}}) then { _groupsToDrawMarkers = []; _playerSide = playerSide; - _enableGroupMarkers = if ( (getNumber (missionConfigFile >> "CfgARCMF" >> "markers" >> (_playerSide call ARC_fnc_getFactionFromSide) >> "enableGroupMarkers")) == 1) then {true} else {false}; + _enableGroupMarkers = [false,true] select (getNumber (missionConfigFile >> "CfgARCMF" >> "markers" >> (_playerSide call ARC_fnc_getFactionFromSide) >> "enableGroupMarkers") == 1); + if (!_enableGroupMarkers) exitWith {}; _groupsToDrawMarkers = allGroups select {side _x == _playerSide}; if (ARC_tracker_hideAiGroups) then { - _groupsToDrawMarkers = _groupsToDrawMarkers select { - { - isPlayer _x; - } count units _x > 0; - }; + _groupsToDrawMarkers = _groupsToDrawMarkers select {{isPlayer _x} count units _x > 0}; }; - _defaultHandled = if ((getNumber (missionConfigFile >> "Header" >> "sandbox")) == 1) then {true} else {false}; + _defaultHandled = [false,true] select (getNumber (missionConfigFile >> "Header" >> "sandbox") == 1); + _markerIndex = 0; { - if ( _x getVariable ["ARC_groupHandled", _defaultHandled] ) then { + if (_x getVariable ["ARC_groupHandled", _defaultHandled]) then { private _markerType = _x call ARC_fnc_getMarkerType; - private _colour = _x getVariable ["ARC_groupColour", (format ["Color%1", side _x])]; + private _colour = _x getVariable ["ARC_groupColour", format ["Color%1", side _x]]; - private _marker = createMarkerLocal [format ["ARC_TRACKER_%1", _forEachIndex], [(getPos leader _x) select 0, (getPos leader _x) select 1]]; + private _marker = createMarkerLocal [format ["ARC_TRACKER_%1", _markerIndex], [(getPos leader _x) select 0, (getPos leader _x) select 1]]; _marker setMarkerTypeLocal _markerType; _marker setMarkerColorLocal _colour; _marker setMarkerTextLocal (groupId _x); ARC_tracker_markers pushBack _marker; + _markerIndex = _markerIndex + 1; }; - } forEach _groupsToDrawMarkers; + + false + } count _groupsToDrawMarkers; }; \ No newline at end of file diff --git a/ARCMF.VR/f/briefing/f_briefing_admin.sqf b/ARCMF.VR/f/briefing/f_briefing_admin.sqf index 4133d95..baec50b 100644 --- a/ARCMF.VR/f/briefing/f_briefing_admin.sqf +++ b/ARCMF.VR/f/briefing/f_briefing_admin.sqf @@ -24,20 +24,21 @@ Increase briefing timer by 1 minute
Decrease briefing timer by 1 minute
+hintSilent 'BRIEFING STARTED!';""> Begin briefing timer
+[{hintSilent ''}, [], 5] call CBA_fnc_waitAndExecute; +[false] remoteExec ['f_fnc_safety', (playableUnits + switchableUnits)];""> End briefing timer
- + Force safety on for all players
- + Force safety off for all players

"; diff --git a/ARCMF.VR/f/briefing/f_loadoutNotes.sqf b/ARCMF.VR/f/briefing/f_loadoutNotes.sqf deleted file mode 100644 index 2dacb20..0000000 --- a/ARCMF.VR/f/briefing/f_loadoutNotes.sqf +++ /dev/null @@ -1,89 +0,0 @@ -private ["_text","_stuff","_weps","_items","_fnc_wepMags","_wepMags","_magArr","_s","_mags","_bp","_maxload"]; - -_fnc_wepMags = { - private ["_w","_magarr"]; - _w = _this select 0; - _wepMags = getArray (configFile >> "CfgWeapons" >> _w >> "magazines"); - _magArr = []; - { - _s = [_mags,_x] call BIS_fnc_findInPairs; - if (_s != -1) then { - _magArr set [count _magArr,([_mags,[_s, 1]] call BIS_fnc_returnNestedElement)]; - _mags = [_mags, _s] call BIS_fnc_removeIndex; - }; - } forEach _wepMags; - - if (count _magArr > 0) then { - _text = _text + " ["; - - { - _text = _text + format ["%1",_x]; - if (count _magarr > (_forEachIndex + 1)) then {_text = _text + "+";} - } forEach _magArr; - - _text = _text + "]"; - }; -}; - -_text = "
NOTE: The loadout shown below is only accurate at mission start.
-
"; -_stuff = []; - -_weps = weapons player - ["Rangefinder","Binocular","Laserdesignator"]; -_wepItems = weaponsItems player; -_mags = (magazines player) call BIS_fnc_consolidateArray; -_items = (items player) call BIS_fnc_consolidateArray; - -if (count _weps > 0) then { - _text = _text + "WEAPONS [#MAGAZINES]:"; - { - _text = _text + format["
%1",getText (configFile >> "CfgWeapons" >> _x >> "displayname")]; - [_x] call _fnc_wepMags; - if ({_x in ["GL_3GL_F","EGLM","UGL_F"]} count (getArray (configFile >> "CfgWeapons" >> _x >> "muzzles")) > 0) then { - _text = _text + "
|- UGL"; - ["UGL_F"] call _fnc_wepMags; - }; - - _attachments = _wepItems select (([_wepItems,_x] call BIS_fnc_findNestedElement) select 0); - _attachments = [_attachments,0] call BIS_fnc_removeIndex; - - { - if (typeName _x != typeName [] && {_x != ""}) then { - _text = _text + format["
|- %1",getText (configFile >> "CfgWeapons" >> _x >> "displayname")]; - }; - } forEach _attachments; - - } forEach _weps; - _text = _text + "
"; -}; - -if (count _mags > 0) then { - _text = _text + "
OTHER [#]:
"; - - { - _text = _text + format["%1 [%2]
",getText (configFile >> "CfgMagazines" >> _x select 0 >> "displayname"),_x select 1]; - } forEach _mags; -}; - -if !(backpack player == "") then { - _text = _text + "
BACKPACK [%FULL]:
"; - _bp = backpack player; - _text = _text + format["%1 [%2",getText (configFile >> "CfgVehicles" >> _bp >> "displayname"), 100*loadBackpack player]+"%]
"; -}; - -if (count _items > 0) then { - _text = _text + "
ITEMS [#]:
"; - - { - _text = _text + format["%1 [%2]
",getText (configFile >> "CfgWeapons" >> _x select 0 >> "displayname"),_x select 1]; - } forEach _items; - - { - _text = _text + format["*%1
",getText (configFile >> "CfgWeapons" >> _x >> "displayname")]; - } forEach assignedItems player; - - _text = _text + "
*Indicates an equipped item."; -}; - -waitUntil {scriptDone f_script_briefing}; -player createDiaryRecord ["diary", ["Loadout", _text]]; \ No newline at end of file diff --git a/ARCMF.VR/f/briefing/f_orbatNotes.sqf b/ARCMF.VR/f/briefing/f_orbatNotes.sqf index 30258dd..137d6ae 100644 --- a/ARCMF.VR/f/briefing/f_orbatNotes.sqf +++ b/ARCMF.VR/f/briefing/f_orbatNotes.sqf @@ -1,9 +1,6 @@ -waitUntil {scriptDone f_script_setGroupIDs}; - private ["_orbatText", "_groups", "_precompileGroups","_maxSlots","_freeSlots"]; -_orbatText = "
NOTE: The roster below is only accurate at mission start.
-
-GROUP LEADERS + MEDICS

"; + +_orbatText = "
NOTE: The roster below is only accurate at mission start.

GROUP LEADERS + MEDICS

"; _groups = []; _hiddenGroups = []; @@ -11,95 +8,108 @@ _hiddenGroups = []; if ((side _x == side group player) && !(_x in _groups) && ({_x in playableUnits} count units _x) > 0) then { _groups pushBack _x; }; -} forEach allGroups; + + false +} count allGroups; _groups = _groups - _hiddenGroups; { _color = "#FFFFFF"; + if (_x == group player) then { _color = switch (side player) do { case west: {"#0080FF"}; case east: {"#B40404"}; - case independent: {"#298A08"}; + case resistance: {"#298A08"}; default {"#8904B1"}; }; }; - _orbatText = _orbatText + format ["%1 %2", _x, name leader _x,_color] + "
"; + _orbatText = _orbatText + format ["%1 %2", _x, name leader _x, _color] + "
"; { if (_x getVariable ["f_var_assignGear",""] == "m" && {_x != leader group _x}) then { - _orbatText = _orbatText + format["|- %1 [M]",name _x] + "
"; + _orbatText = _orbatText + format ["|- %1 [M]", name _x] + "
"; }; - } forEach units _x; -} forEach _groups; -_veharray = []; -{ + false + } count units _x; + + false +} count _groups; - if ({vehicle _x != _x} count units _x > 0 ) then { +_vehArray = []; + +{ + if ({vehicle _x != _x} count units _x > 0) then { { - if (vehicle _x != _x && {!(vehicle _x in _veharray)}) then { - _veharray set [count _veharray,vehicle _x]; + if (vehicle _x != _x && {!(vehicle _x in _vehArray)}) then { + _vehArray pushBack vehicle _x; }; - } forEach units _x; - }; -} forEach _groups; + false + } count units _x; + }; -if (count _veharray > 0) then { + false +} count _groups; -_orbatText = _orbatText + "
VEHICLE CREWS + PASSENGERS
"; +if (count _vehArray > 0) then { + _orbatText = _orbatText + "
VEHICLE CREWS + PASSENGERS
"; { - _vehName = [getText (configFile >> "CfgVehicles" >> (typeOf _x) >> "displayname"),"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_- "] call BIS_fnc_filterString; + _vehName = [getText (configFile >> "CfgVehicles" >> typeOf _x >> "displayname"), "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_- "] call BIS_fnc_filterString; - _orbatText = _orbatText + "
" + format["%1 ",_vehName]; + _orbatText = _orbatText + "
" + format ["%1 ", _vehName]; - _maxSlots = getNumber(configfile >> "CfgVehicles" >> typeof _x >> "transportSoldier") + (count allTurrets [_x, true] - count allTurrets _x); + _maxSlots = getNumber (configfile >> "CfgVehicles" >> typeof _x >> "transportSoldier") + (count allTurrets [_x, true] - count allTurrets _x); _freeSlots = _x emptyPositions "cargo"; if (_maxSlots > 0) then { - _orbatText = _orbatText + format ["[%1/%2]",(_maxSlots-_freeSlots),_maxSlots]; + _orbatText = _orbatText + format ["[%1/%2]", (_maxSlots - _freeSlots), _maxSlots]; }; _orbatText = _orbatText + "
"; { if ((assignedVehicleRole _x select 0) != "CARGO") then { - _veh = vehicle _x; _crewrole = switch (true) do { - case (driver _veh == _x && !((vehicle _x isKindOf "helicopter") || (vehicle _x isKindOf "plane"))):{" [D]"}; - case (driver _veh == _x && ((vehicle _x isKindOf "helicopter") || (vehicle _x isKindOf "plane"))):{" [P]"}; - case (commander _veh == _x):{" [CO]"}; - case (gunner _veh == _x):{" [G]"}; - case (assignedVehicleRole _x select 0 == "Turret" && commander _veh != _x && gunner _veh != _x && driver _veh != _x):{" [C]"}; + case (driver _veh == _x && !((vehicle _x isKindOf "helicopter") || (vehicle _x isKindOf "plane"))): {" [D]"}; + case (driver _veh == _x && ((vehicle _x isKindOf "helicopter") || (vehicle _x isKindOf "plane"))): {" [P]"}; + case (commander _veh == _x): {" [CO]"}; + case (gunner _veh == _x): {" [G]"}; + case (assignedVehicleRole _x select 0 == "Turret" && commander _veh != _x && gunner _veh != _x && driver _veh != _x): {" [C]"}; default {" [C]"}; }; - _orbatText = _orbatText + format["|- %1",name _x] + _crewrole + "
"; + _orbatText = _orbatText + format ["|- %1", name _x] + _crewrole + "
"; }; - } forEach crew _x; + + false + } count crew _x; _groupList = []; { if (!(group _x in _groupList) && {(assignedVehicleRole _x select 0) == "CARGO"} count (units group _x) > 0) then { - _groupList set [count _groupList,group _x]; + _groupList pushBack group _x; }; - } forEach crew _x; + + false + } count crew _x; if (count _groupList > 0) then { { - _orbatText =_orbatText + format["|- %1", _x] + " [CARGO]
"; - } forEach _groupList; - }; + _orbatText = _orbatText + format ["|- %1", _x] + " [CARGO]
"; - } forEach _veharray; + false + } count _groupList; + }; + false + } count _vehArray; }; -waitUntil {scriptDone f_script_briefing}; player createDiaryRecord ["diary", ["Platoon Roster", _orbatText]]; \ No newline at end of file diff --git a/ARCMF.VR/f/cache/fn_cInit.sqf b/ARCMF.VR/f/cache/fn_cInit.sqf deleted file mode 100644 index 5b0bc9e..0000000 --- a/ARCMF.VR/f/cache/fn_cInit.sqf +++ /dev/null @@ -1,43 +0,0 @@ -if (isNil "f_param_caching" || {f_param_caching == 0}) exitWith {}; - -sleep 0.1; -waitUntil {time > (_this select 0)}; - -if (!isDedicated && !(group player getVariable ["f_cacheExcl", false])) then { - (group player) setVariable ["f_cacheExcl", true, true]; -}; - -if !(isServer) exitWith {}; - -if (missionNameSpace getVariable ["f_cInit", false]) exitWith {}; -f_cInit = true; - -{ - if ({_x in playableUnits} count units _x > 0) then {_x setVariable ["f_cacheExcl",true,true];}; -} forEach allGroups; - -_range = f_param_caching; -f_var_cacheSleep = 6; -f_var_cacheRun = true; - -[_range] spawn f_fnc_cTracker; - -if (f_var_debugMode == 1) then { - player globalchat format ["f_fnc_cInit DBG: Starting to track %1 groups, %2 range, %3 sleep",count allGroups,_range,f_var_cacheSleep]; - - [] spawn { - sleep (f_var_cacheSleep * 1.1); - while {f_var_cacheRun} do { - _str1 = "f_fnc_cache DBG:
"; - _str2 = format["Total groups: %1
",count allGroups]; - _str3 = format ["Cached groups:%1
",{_x getvariable "f_cached"} count allGroups]; - _str4 = format ["Activated groups:%1
",{!(_x getvariable "f_cached")} count allGroups]; - _str5 = format ["Excluded groups:%1
",{(_x getvariable "f_cacheExcl")} count allGroups]; - - hintsilent parseText (_str1+_str2+_str3+_str4+_str5); - diag_log (_str1+_str2+_str3+_str4+_str5); - - sleep f_var_cacheSleep; - }; - }; -}; \ No newline at end of file diff --git a/ARCMF.VR/f/cache/fn_cTracker.sqf b/ARCMF.VR/f/cache/fn_cTracker.sqf deleted file mode 100644 index 2407290..0000000 --- a/ARCMF.VR/f/cache/fn_cTracker.sqf +++ /dev/null @@ -1,48 +0,0 @@ -private ["_range","_groups","_debug"]; - -_range = _this select 0; -_groups = allGroups; - -_debug = if (f_var_debugMode == 1) then {true} else {false}; - -while {f_var_cacheRun} do { - { - _groups = allGroups; - if (_debug) then {player globalChat format ["f_fnc_cache DBG: Tracking %1 groups", count _groups]}; - if (isNull _x) then { - _groups = _groups - [_x]; - if (_debug) then {player globalChat format ["f_fnc_cache DBG: Group is null, deleting: %1", _x, count _groups]}; - } else { - _exclude = _x getVariable ["f_cacheExcl", false]; - _cached = _x getVariable ["f_cached", false]; - - if (!_exclude) then { - if (_cached) then { - if (_debug) then {player globalChat format ["f_fnc_cache DBG: Checking group: %1", _x]}; - if ([leader _x, _range] call f_fnc_nearPlayer) then { - if (_debug) then {player globalChat format ["f_fnc_cache DBG: Decaching: %1", _x]}; - _x setVariable ["f_cached", false]; - _x spawn f_fnc_gUncache; - }; - } else { - if !([leader _x, _range * 1.1] call f_fnc_nearPlayer) then { - if (_debug) then {player globalChat format ["f_fnc_cache DBG: Caching: %1", _x]}; - _x setVariable ["f_cached", true]; - [_x] spawn f_fnc_gCache; - }; - }; - - if (_debug) then {player globalChat format ["f_fnc_cache DBG: Group is excluded: %1",_x]}; - }; - }; - } forEach _groups; - - sleep f_var_cacheSleep; -}; - -{ - if (_x getVariable ["f_cached", false]) then { - _x spawn f_fnc_gUncache; - _x setVariable ["f_cached", false]; - }; -} forEach allGroups; \ No newline at end of file diff --git a/ARCMF.VR/f/cache/fn_gCache.sqf b/ARCMF.VR/f/cache/fn_gCache.sqf deleted file mode 100644 index 9cfcae4..0000000 --- a/ARCMF.VR/f/cache/fn_gCache.sqf +++ /dev/null @@ -1,37 +0,0 @@ -private ["_group","_aggressiveness"]; - -_group = [_this, 0, grpNull] call BIS_fnc_param; -_aggressiveness = [_this, 1, f_var_cachingAggressiveness] call BIS_fnc_param; - -{ - switch (_aggressiveness) do { - case 1: { - if ((count (assignedVehicleRole _x) == 0 || {"Driver" != (assignedVehicleRole _x) select 0}) && (_x != leader _group)) then { - _x enableSimulationGlobal false; - }; - }; - case 2: { - if (count (assignedVehicleRole _x) == 0 || {"Driver" != (assignedVehicleRole _x) select 0}) then { - if ((_x != leader _group) || (_x == leader _group && speed _x == 0)) then { - _x enableSimulationGlobal false; - }; - }; - }; - case 3: { - _x enableSimulationGlobal false; - }; - default { - systemChat format ["f_fnc_gCache DBG: f_var_cachingAggressiveness is not an accepted value: %1", f_var_cachingAggressiveness]; - }; - }; - - _x hideObjectGlobal true; - - if (_aggressiveness == 3) then { - if (vehicle _x != _x) then {(vehicle _x) hideObjectGlobal true}; - }; - - sleep 0.1; -} forEach units _group; - -true \ No newline at end of file diff --git a/ARCMF.VR/f/cache/fn_gUncache.sqf b/ARCMF.VR/f/cache/fn_gUncache.sqf deleted file mode 100644 index e54be00..0000000 --- a/ARCMF.VR/f/cache/fn_gUncache.sqf +++ /dev/null @@ -1,14 +0,0 @@ -{ - _x enableSimulationGlobal true; - _x hideObjectGlobal false; - - if (speed leader _this > 0 && vehicle _x == _x) then { - _x setPosATL [(formationPosition _x) select 0, (formationPosition _x) select 1, 0]; - }; - - if (vehicle _x != _x) then {(vehicle _x) hideObjectGlobal false}; - - sleep 0.1; -} forEach units _this; - -true \ No newline at end of file diff --git a/ARCMF.VR/f/groupJoin/f_groupJoinAction.sqf b/ARCMF.VR/f/groupJoin/f_groupJoinAction.sqf deleted file mode 100644 index cddd13c..0000000 --- a/ARCMF.VR/f/groupJoin/f_groupJoinAction.sqf +++ /dev/null @@ -1,36 +0,0 @@ -if (isDedicated) exitWith{}; -if (!isDedicated && (isNull player)) then { - waitUntil {sleep 0.1; !isNull player}; -}; - -private ["_nearUnit", "_nearGroup", "_actionDistance", "_allowDifferentSide"]; -_actionDistance = 2.5; -_allowDifferentSide = [_this, 0, false] call BIS_fnc_param; - -while {true} do { - waitUntil {sleep 0.5; isNil "f_groupJoinAction"}; - - if (vehicle player == player && {isPlayer cursorTarget && player distance cursorTarget < _actionDistance && cursorTarget isKindOf "CAManBase"}) then { - _nearUnit = cursorTarget; - _nearGroup = group cursorTarget; - - if (group player != _nearGroup && alive _nearUnit && {(_allowDifferentSide || side player == side _nearGroup)}) then { - _actionString = format ["Join %1 (%2)", name _nearUnit, _nearGroup]; - f_groupJoinAction = player addAction [_actionString, { - _unit = player; - _grp = (_this select 3); - [player] joinSilent _grp; - [[_grp, leader _grp], "selectLeader", leader _grp, false] call BIS_fnc_mp; - player removeAction f_groupJoinAction; - f_groupJoinAction = nil; - }, _nearGroup, 0, false, true, "", "_this == player"]; - - waitUntil {sleep 0.5;(group player == _nearGroup || cursorTarget != _nearUnit)}; - - if !(isNil "f_groupJoinAction") then { - player removeAction f_groupJoinAction; - f_groupJoinAction = nil; - }; - }; - }; -}; \ No newline at end of file diff --git a/ARCMF.VR/f/safeStart/f_safeStart.sqf b/ARCMF.VR/f/safeStart/f_safeStart.sqf index a0e248a..434d5e2 100644 --- a/ARCMF.VR/f/safeStart/f_safeStart.sqf +++ b/ARCMF.VR/f/safeStart/f_safeStart.sqf @@ -1,13 +1,11 @@ -if (isNil "f_var_mission_timer") then { - f_var_mission_timer = (["f_param_mission_timer", 0] call BIS_fnc_getParamValue) * 60; -}; +[{!isNil "f_var_mission_timer"}, { + if (f_var_mission_timer > 0) then { + if (isServer) then { + #include "f_safeStartLoop.sqf" + }; -if (f_var_mission_timer > 0) then { - if (isServer) then { - [] execVM "f\safeStart\f_safeStartLoop.sqf"; + if (!isDedicated) then { + [true] call f_fnc_safety; + }; }; - - if (!isDedicated) then { - [true] call f_fnc_safety; - }; -}; +}, []] call CBA_fnc_waitUntilAndExecute; diff --git a/ARCMF.VR/f/safeStart/f_safeStartLoop.sqf b/ARCMF.VR/f/safeStart/f_safeStartLoop.sqf index edb589c..6189864 100644 --- a/ARCMF.VR/f/safeStart/f_safeStartLoop.sqf +++ b/ARCMF.VR/f/safeStart/f_safeStartLoop.sqf @@ -1,24 +1,22 @@ -if !(isServer) exitWith {}; +if (!isServer) exitWith {}; -sleep 2; +[{ + [{ + params ["_args","_handlerID"]; -_zeroPad = { - params ["_number"]; - if (count (str _number) == 1) exitWith {format ["0%1", _number]}; - str _number -}; + _mins = floor (f_var_mission_timer / 60); + _secs = f_var_mission_timer mod 60; -while {f_var_mission_timer > 0} do { - _mins = floor (f_var_mission_timer / 60); - _secs = f_var_mission_timer mod 60; - [(format ["BRIEFING TIME: %1:%2", [_mins] call _zeroPad, [_secs] call _zeroPad]),"hintSilent",true] call BIS_fnc_MP; - uiSleep 1; - if (f_var_mission_timer <= 0) exitWith {}; - f_var_mission_timer = f_var_mission_timer - 1; - publicVariable "f_var_mission_timer"; -}; + format ["BRIEFING TIME: %1:%2", [_mins] call ARC_fnc_zeroPad, [_secs] call ARC_fnc_zeroPad] remoteExec ["hintSilent", 0]; -if (f_var_mission_timer <= 0) then { - ["WEAPONS ARE LIVE","hint",true] call BIS_fnc_MP; - [[false],"f_fnc_safety",playableUnits + switchableUnits] call BIS_fnc_MP; -}; + if (f_var_mission_timer <= 0) exitWith { + "WEAPONS ARE LIVE" remoteExec ["hintSilent", 0]; + [false] remoteExec ["f_fnc_safety", (playableUnits + switchableUnits)]; + [_handlerID] call CBA_fnc_removePerFrameHandler; + [{hintSilent ""}, [], 5] call CBA_fnc_waitAndExecute; + }; + + f_var_mission_timer = f_var_mission_timer - 1; + publicVariable "f_var_mission_timer"; + }, 1, []] call CBA_fnc_addPerFrameHandler; +}, [], 2] call CBA_fnc_waitAndExecute; diff --git a/ARCMF.VR/f/setGroupID/f_setGroupIDs.sqf b/ARCMF.VR/f/setGroupID/f_setGroupIDs.sqf index d823320..3f90792 100644 --- a/ARCMF.VR/f/setGroupID/f_setGroupIDs.sqf +++ b/ARCMF.VR/f/setGroupID/f_setGroupIDs.sqf @@ -1,4 +1,4 @@ -_groups = [ +{_x call f_fnc_setGroupID;false} count [ // GROUP IDs: BLUFOR ["GrpBLUFOR_CO_CC","CO","ColorOrange"], ["GrpBLUFOR_1PLT_CO","1PLT","ColorYellow"], @@ -211,6 +211,4 @@ _groups = [ ["GrpINDFOR_PH6","PH6","ColorRed"], ["GrpINDFOR_PH7","PH7","ColorRed"], ["GrpINDFOR_PH8","PH8","ColorRed"] -]; - -{_x call f_fnc_setGroupID;false} count _groups; \ No newline at end of file +]; \ No newline at end of file diff --git a/ARCMF.VR/f/setTeamColours/f_setTeamColours.sqf b/ARCMF.VR/f/setTeamColours/f_setTeamColours.sqf index e9b1ec8..7ca1c2b 100644 --- a/ARCMF.VR/f/setTeamColours/f_setTeamColours.sqf +++ b/ARCMF.VR/f/setTeamColours/f_setTeamColours.sqf @@ -1,59 +1,66 @@ -private ["_unit","_isFireteam","_white","_red","_blue","_yellow","_green"]; +[{!isNull player && {isNull _x} count units (group player) == 0}, { + private ["_unit","_isFireteam","_white","_red","_blue","_yellow","_green"]; -if (!isDedicated && (isNull player)) then { - waitUntil {sleep 0.1; !isNull player}; -}; + _leaders = ["_FTL"]; + _white = ["_FTL"]; + _red = ["_AR","_AAR"]; + _blue = ["_AT","_R","_R_1"]; + _yellow = []; + _green = []; -_leaders = ["_FTL"]; -_white = ["_FTL"]; -_red = ["_AR","_AAR"]; -_blue = ["_AT","_R","_R_1"]; -_yellow = []; -_green = []; + _unit = player; + _isFireteam = false; -sleep 10; + { + if ([_x, format["%1", (leader (group _unit))]] call BIS_fnc_inString) exitWith {_isFireteam = true}; + false + } count _leaders; -_unit = player; -_isFireteam = false; + if (!_isFireteam) exitWith {}; -{ - if ([_x, format["%1",(leader (group _unit))]] call BIS_fnc_inString) exitWith {_isFireteam = true;} -} forEach _leaders; + { + private _unit = _x; -if (!_isFireteam) exitWith {}; + { + if ([_x, format ["%1", _unit]] call BIS_fnc_inString) then { + _unit assignTeam "RED"; + }; -{ - private ["_unit"]; - _unit = _x; + false + } count _red; - { - if ([_x, format ["%1",_unit]] call BIS_fnc_inString) then { - _unit assignTeam "RED"; - }; - } forEach _red; + { + if ([_x, format ["%1", _unit]] call BIS_fnc_inString) then { + _unit assignTeam "blue"; + }; - { - if ([_x, format ["%1",_unit]] call BIS_fnc_inString) then { - _unit assignTeam "blue"; - }; - } forEach _blue; + false + } count _blue; - { - if ([_x, format ["%1",_unit]] call BIS_fnc_inString) then { - _unit assignTeam "yellow"; - }; - } forEach _yellow; + { + if ([_x, format ["%1", _unit]] call BIS_fnc_inString) then { + _unit assignTeam "yellow"; + }; - { - if ([_x, format ["%1",_unit]] call BIS_fnc_inString) then { - _unit assignTeam "green"; - }; - } forEach _green; + false + } count _yellow; - { - if ([_x, format ["%1",_unit]] call BIS_fnc_inString) then { - _unit assignTeam "white"; - }; - } forEach _white; + { + if ([_x, format ["%1", _unit]] call BIS_fnc_inString) then { + _unit assignTeam "green"; + }; + + false + } count _green; + + { + if ([_x, format ["%1", _unit]] call BIS_fnc_inString) then { + _unit assignTeam "white"; + }; + + false + } count _white; -} foreach units (group _unit); + false + } count units (group _unit); +}, []] call CBA_fnc_waitUntilAndExecute; diff --git a/ARCMF.VR/init.sqf b/ARCMF.VR/init.sqf index 0847c54..1b5359c 100644 --- a/ARCMF.VR/init.sqf +++ b/ARCMF.VR/init.sqf @@ -2,34 +2,25 @@ enableSaving [false, false]; enableSentences false; // Briefing -f_script_briefing = [] execVM "briefing.sqf"; +#include "briefing.sqf" // Group IDs -f_script_setGroupIDs = [] execVM "f\setGroupID\f_setGroupIDs.sqf"; +#include "f\setGroupID\f_setGroupIDs.sqf" // Buddy Team Colours -f_script_setTeamColours = [] execVM "f\setTeamColours\f_setTeamColours.sqf"; +#include "f\setTeamColours\f_setTeamColours.sqf" // Fireteam Member Markers -[] spawn f_fnc_SetLocalFTMemberMarkers; +[] call f_fnc_SetLocalFTMemberMarkers; // Group Markers [true, true] call ARC_fnc_initTracker; // ORBAT Notes -[] execVM "f\briefing\f_orbatNotes.sqf"; - -// Loadout Notes -[] execVM "f\briefing\f_loadoutNotes.sqf"; - -// Join Group Action -[false] execVM "f\groupJoin\f_groupJoinAction.sqf"; +#include "f\briefing\f_orbatNotes.sqf" // Mission Timer/Safe Start -[] execVM "f\safeStart\f_safeStart.sqf"; - -// AI Unit Caching -[30] spawn f_fnc_cInit; +#include "f\safeStart\f_safeStart.sqf" // Reinforcements if (isNil "ARC_reinforcements") then { @@ -41,12 +32,6 @@ if (isNil "ARC_adversarialMode") then { ARC_adversarialMode = false; }; -// Note: Caching aggressiveness is set using the f_var_cachingAggressiveness variable; possible values: -// 1 - cache only non-leaders and non-drivers -// 2 - cache all non-moving units, always exclude vehicle drivers -// 3 - cache all units, incl. group leaders and vehicle drivers -f_var_cachingAggressiveness = 2; - // Radio Systems Support [] execVM "f\radios\acre2\acre2_init.sqf"; From cc9554a0c64a91d279a762a0c03640e82696d212 Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Thu, 9 Jun 2016 19:58:15 +0100 Subject: [PATCH 02/20] Convert scheduled radio code to per frame handlers --- ARCMF.VR/briefing.sqf | 2 +- .../fn_SetLocalFTMemberMarkers.sqf | 2 +- ARCMF.VR/f/radios/acre2/acre2_clientInit.sqf | 145 +++++++++--------- ARCMF.VR/f/radios/acre2/acre2_init.sqf | 66 ++------ .../f/setTeamColours/f_setTeamColours.sqf | 2 +- ARCMF.VR/init.sqf | 2 +- 6 files changed, 93 insertions(+), 126 deletions(-) diff --git a/ARCMF.VR/briefing.sqf b/ARCMF.VR/briefing.sqf index 02e3ff0..71957ad 100644 --- a/ARCMF.VR/briefing.sqf +++ b/ARCMF.VR/briefing.sqf @@ -1,4 +1,4 @@ -[{!isNull player}, { +[{isDedicated || !isNull player}, { private _unitfaction = toLower (faction player); if (_unitfaction != toLower (faction (leader group player))) then { diff --git a/ARCMF.VR/f/FTMemberMarkers/fn_SetLocalFTMemberMarkers.sqf b/ARCMF.VR/f/FTMemberMarkers/fn_SetLocalFTMemberMarkers.sqf index a20d9fa..faf8736 100644 --- a/ARCMF.VR/f/FTMemberMarkers/fn_SetLocalFTMemberMarkers.sqf +++ b/ARCMF.VR/f/FTMemberMarkers/fn_SetLocalFTMemberMarkers.sqf @@ -1,4 +1,4 @@ -[{!isNull player}, { +[{isDedicated || !isNull player}, { [{ { private _unit = _x; diff --git a/ARCMF.VR/f/radios/acre2/acre2_clientInit.sqf b/ARCMF.VR/f/radios/acre2/acre2_clientInit.sqf index 15f2c03..6d7f27d 100644 --- a/ARCMF.VR/f/radios/acre2/acre2_clientInit.sqf +++ b/ARCMF.VR/f/radios/acre2/acre2_clientInit.sqf @@ -23,7 +23,7 @@ _ret = ["ACRE_PRC152", _presetName] call acre_api_fnc_setPreset; _ret = ["ACRE_PRC117F", _presetName] call acre_api_fnc_setPreset; _ret = ["ItemRadio", _presetName] call acre_api_fnc_setPreset; -if (!alive _unit) exitWith {[true] call acre_api_fnc_setSpectator;}; +if (!alive _unit) exitWith {[true] call acre_api_fnc_setSpectator}; switch (side _unit) do { case west: { @@ -44,88 +44,87 @@ switch (side _unit) do { }; }; -waitUntil {(_unit getVariable ["f_var_assignGear_done", false])}; -_typeOfUnit = _unit getVariable ["f_var_assignGear", "NIL"]; +[{(player getVariable ["f_var_assignGear_done", false]) && !("ItemRadio" in (items player + assignedItems player)) && [] call acre_api_fnc_isInitialized}, { + systemChat str _this; + params ["_unit"]; -waitUntil {uiSleep 0.3; !("ItemRadio" in (items _unit + assignedItems _unit))}; -uiSleep 1; + _typeOfUnit = _unit getVariable ["f_var_assignGear", "NIL"]; + {_unit removeItem _x} forEach ([] call acre_api_fnc_getCurrentRadioList); -waitUntil {[] call acre_api_fnc_isInitialized}; -{_unit removeItem _x;} forEach ([] call acre_api_fnc_getCurrentRadioList); - -_AN_PRC_343 = switch (side _unit) do { - case west: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "blufor" >> "AN_PRC_343")}; - case east: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "opfor" >> "AN_PRC_343")}; - case resistance: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "indfor" >> "AN_PRC_343")}; - default {[]}; -}; + _AN_PRC_343 = switch (side _unit) do { + case west: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "blufor" >> "AN_PRC_343")}; + case east: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "opfor" >> "AN_PRC_343")}; + case resistance: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "indfor" >> "AN_PRC_343")}; + default {[]}; + }; -_AN_PRC_148 = switch (side _unit) do { - case west: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "blufor" >> "AN_PRC_148")}; - case east: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "opfor" >> "AN_PRC_148")}; - case resistance: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "indfor" >> "AN_PRC_148")}; - default {[]}; -}; + _AN_PRC_148 = switch (side _unit) do { + case west: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "blufor" >> "AN_PRC_148")}; + case east: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "opfor" >> "AN_PRC_148")}; + case resistance: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "indfor" >> "AN_PRC_148")}; + default {[]}; + }; -_AN_PRC_152 = switch (side _unit) do { - case west: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "blufor" >> "AN_PRC_152")}; - case east: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "opfor" >> "AN_PRC_152")}; - case resistance: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "indfor" >> "AN_PRC_152")}; - default {[]}; -}; + _AN_PRC_152 = switch (side _unit) do { + case west: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "blufor" >> "AN_PRC_152")}; + case east: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "opfor" >> "AN_PRC_152")}; + case resistance: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "indfor" >> "AN_PRC_152")}; + default {[]}; + }; -_AN_PRC_117F = switch (side _unit) do { - case west: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "blufor" >> "AN_PRC_117F")}; - case east: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "opfor" >> "AN_PRC_117F")}; - case resistance: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "indfor" >> "AN_PRC_117F")}; - default {[]}; -}; + _AN_PRC_117F = switch (side _unit) do { + case west: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "blufor" >> "AN_PRC_117F")}; + case east: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "opfor" >> "AN_PRC_117F")}; + case resistance: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "indfor" >> "AN_PRC_117F")}; + default {[]}; + }; -_AN_PRC_77 = switch (side _unit) do { - case west: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "blufor" >> "AN_PRC_77")}; - case east: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "opfor" >> "AN_PRC_77")}; - case resistance: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "indfor" >> "AN_PRC_77")}; - default {[]}; -}; + _AN_PRC_77 = switch (side _unit) do { + case west: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "blufor" >> "AN_PRC_77")}; + case east: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "opfor" >> "AN_PRC_77")}; + case resistance: {getArray (missionConfigFile >> "CfgARCMF" >> "acre" >> "indfor" >> "AN_PRC_77")}; + default {[]}; + }; -if (_typeOfUnit != "NIL") then { - if (_typeOfUnit in _AN_PRC_343 || (count _AN_PRC_343 == 1 && toLower (_AN_PRC_343 select 0) == "all")) then { - if (_unit canAdd RADIO_343) then { - _unit addItem RADIO_343; - } else { - RADIO_343 call f_radios_acre2_giveRadioAction; + if (_typeOfUnit != "NIL") then { + if (_typeOfUnit in _AN_PRC_343 || (count _AN_PRC_343 == 1 && toLower (_AN_PRC_343 select 0) == "all")) then { + if (_unit canAdd RADIO_343) then { + _unit addItem RADIO_343; + } else { + RADIO_343 call f_radios_acre2_giveRadioAction; + }; }; - }; - - if (_typeOfUnit in _AN_PRC_148 || (count _AN_PRC_148 == 1 && toLower (_AN_PRC_148 select 0) == "all")) then { - if (_unit canAdd RADIO_148) then { - _unit addItem RADIO_148; - } else { - RADIO_148 call f_radios_acre2_giveRadioAction; + + if (_typeOfUnit in _AN_PRC_148 || (count _AN_PRC_148 == 1 && toLower (_AN_PRC_148 select 0) == "all")) then { + if (_unit canAdd RADIO_148) then { + _unit addItem RADIO_148; + } else { + RADIO_148 call f_radios_acre2_giveRadioAction; + }; }; - }; - - if (_typeOfUnit in _AN_PRC_152 || (count _AN_PRC_152 == 1 && toLower (_AN_PRC_152 select 0) == "all")) then { - if (_unit canAdd RADIO_152) then { - _unit addItem RADIO_152; - } else { - RADIO_152 call f_radios_acre2_giveRadioAction; + + if (_typeOfUnit in _AN_PRC_152 || (count _AN_PRC_152 == 1 && toLower (_AN_PRC_152 select 0) == "all")) then { + if (_unit canAdd RADIO_152) then { + _unit addItem RADIO_152; + } else { + RADIO_152 call f_radios_acre2_giveRadioAction; + }; }; - }; - - if (_typeOfUnit in _AN_PRC_117F || (count _AN_PRC_117F == 1 && toLower (_AN_PRC_117F select 0) == "all")) then { - if (_unit canAdd RADIO_117F) then { - _unit addItem RADIO_117F; - } else { - RADIO_117F call f_radios_acre2_giveRadioAction; + + if (_typeOfUnit in _AN_PRC_117F || (count _AN_PRC_117F == 1 && toLower (_AN_PRC_117F select 0) == "all")) then { + if (_unit canAdd RADIO_117F) then { + _unit addItem RADIO_117F; + } else { + RADIO_117F call f_radios_acre2_giveRadioAction; + }; }; - }; - - if (_typeOfUnit in _AN_PRC_77 || (count _AN_PRC_77 == 1 && toLower (_AN_PRC_77 select 0) == "all")) then { - if (_unit canAdd RADIO_77) then { - _unit addItem RADIO_77; - } else { - RADIO_77 call f_radios_acre2_giveRadioAction; + + if (_typeOfUnit in _AN_PRC_77 || (count _AN_PRC_77 == 1 && toLower (_AN_PRC_77 select 0) == "all")) then { + if (_unit canAdd RADIO_77) then { + _unit addItem RADIO_77; + } else { + RADIO_77 call f_radios_acre2_giveRadioAction; + }; }; }; -}; \ No newline at end of file +}, [_unit]] call CBA_fnc_waitUntilAndExecute; diff --git a/ARCMF.VR/f/radios/acre2/acre2_init.sqf b/ARCMF.VR/f/radios/acre2/acre2_init.sqf index 0ba7c75..20869b0 100644 --- a/ARCMF.VR/f/radios/acre2/acre2_init.sqf +++ b/ARCMF.VR/f/radios/acre2/acre2_init.sqf @@ -1,56 +1,24 @@ f_var_radios = 1; -waitUntil {!isNil "arc_param_babel_west" && !isNil "arc_param_babel_east" && !isNil "arc_param_babel_resistance" && !isNil "arc_param_duplex"}; +[{!isNil "arc_param_babel_west" && !isNil "arc_param_babel_east" && !isNil "arc_param_babel_resistance" && !isNil "arc_param_duplex"}, { + f_acre2_presetSetup = compile preprocessFileLineNumbers "f\radios\acre2\acre2_setupPresets.sqf"; + f_acre2_clientInit = compile preprocessFileLineNumbers "f\radios\acre2\acre2_clientInit.sqf"; + f_fnc_GiveSideRadio = compile preprocessFileLineNumbers "f\radios\acre2\fn_giveSideRadio.sqf"; -f_acre2_presetSetup = compile preprocessFileLineNumbers "f\radios\acre2\acre2_setupPresets.sqf"; -f_acre2_clientInit = compile preprocessFileLineNumbers "f\radios\acre2\acre2_clientInit.sqf"; -f_fnc_GiveSideRadio = compile preprocessFileLineNumbers "f\radios\acre2\fn_giveSideRadio.sqf"; - -f_radios_acre2_giveRadioAction = { - private ["_x"]; - _x = _this; - _unit = player; - - [_x] spawn { - waitUntil {time > 3}; - systemChat format ["[ARCMF] Warning: No room to add radio '%1', report this to the mission maker. You now have a scroll-wheel action to get this radio.", _this select 0]; - }; - - _radioName = getText (configfile >> "CfgWeapons" >> _x >> "displayName"); - _actionID = _unit addAction [format ["[Radios] Give myself a %1 radio", _radioName], { - _radioToGive = (_this select 3) select 0; - _unit = (_this select 0), - if (_unit canAdd _radioToGive) then { - _unit addItem _radioToGive; - _unit removeAction (_this select 2); - } else { - systemChat format ["[ARCMF] Warning: No room to add radio '%1', remove more stuff and try again.", _radioToGive]; - }; - }, [_x], 0, false, false, "", "(_target == _this)"]; - - _radioActions = _unit getVariable ["ARC_radioActions", []]; - _radioActions pushBack _actionID; - _unit setVariable ["ARC_radioActions", _radioActions, true]; - - [_actionID, _unit] spawn { - sleep 300; - if (!isNull (_this select 1)) then { - (_this select 1) removeAction (_this select 0); - }; + f_radios_acre2_giveRadioAction = { + private _radio = _this; + private _radioDisplayName = getText (configfile >> "CfgWeapons" >> _radio >> "displayName"); + systemChat format ["[ARCMF] Warning: No room to add radio '%1'. Get one from the map (Map > ARCMF > Radios).", _radioDisplayName]; }; -}; - -if (!isDedicated && (isNull player)) then { - waitUntil {sleep 0.1; !isNull player}; -}; -#include "acre2_settings.sqf" + [{isDedicated || !isNull player}, { + #include "acre2_settings.sqf" -_presetSetup = [] call f_acre2_presetSetup; + _presetSetup = [] call f_acre2_presetSetup; -if (hasInterface && !isNull player) then { - { - _x call acre_api_fnc_babelAddLanguageType; - } forEach f_radios_settings_acre2_languages; - [] call f_acre2_clientInit; -}; \ No newline at end of file + if (hasInterface) then { + {_x call acre_api_fnc_babelAddLanguageType; false} count f_radios_settings_acre2_languages; + [] call f_acre2_clientInit; + }; + }, []] call CBA_fnc_waitUntilAndExecute; +}, []] call CBA_fnc_waitUntilAndExecute; diff --git a/ARCMF.VR/f/setTeamColours/f_setTeamColours.sqf b/ARCMF.VR/f/setTeamColours/f_setTeamColours.sqf index 7ca1c2b..cff176c 100644 --- a/ARCMF.VR/f/setTeamColours/f_setTeamColours.sqf +++ b/ARCMF.VR/f/setTeamColours/f_setTeamColours.sqf @@ -1,4 +1,4 @@ -[{!isNull player && {isNull _x} count units (group player) == 0}, { +[{isDedicated || !isNull player && {isNull _x} count units (group player) == 0}, { private ["_unit","_isFireteam","_white","_red","_blue","_yellow","_green"]; _leaders = ["_FTL"]; diff --git a/ARCMF.VR/init.sqf b/ARCMF.VR/init.sqf index 1b5359c..704e63f 100644 --- a/ARCMF.VR/init.sqf +++ b/ARCMF.VR/init.sqf @@ -33,7 +33,7 @@ if (isNil "ARC_adversarialMode") then { }; // Radio Systems Support -[] execVM "f\radios\acre2\acre2_init.sqf"; +#include "f\radios\acre2\acre2_init.sqf" // Disable random button on Virtual Arsenal to prevent breaking ACRE [missionNamespace, "arsenalOpened", { From a6b0cb931f95722207568ff5543dc5888a127cb1 Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Thu, 9 Jun 2016 20:06:42 +0100 Subject: [PATCH 03/20] Convert scheduled sandbox code to per frame handlers --- ARCMF.VR/f/assignGear/f_assignGear_jip.sqf | 5 +++-- ARCMF.VR/f/common/f_sandboxHandler.sqf | 5 ++--- ARCMF.VR/f/common/f_sandboxHandler_client.sqf | 10 ++++------ 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/ARCMF.VR/f/assignGear/f_assignGear_jip.sqf b/ARCMF.VR/f/assignGear/f_assignGear_jip.sqf index dfbec40..504a287 100644 --- a/ARCMF.VR/f/assignGear/f_assignGear_jip.sqf +++ b/ARCMF.VR/f/assignGear/f_assignGear_jip.sqf @@ -2,8 +2,9 @@ // This file does not need to be edited by the mission maker. If left untouched, make sure there is always the rifleman loadout defined in each side's file if (didJIP && !(player getVariable ["f_var_assignGear_done", false])) then { - waitUntil {!isNull player}; - ["r", player] call f_fnc_assignGear; + [{!isNull player}, { + ["r", player] call f_fnc_assignGear; + }, []] call CBA_fnc_waitUntilAndExecute; }; ARC_reinforcementPosition = getPos player; diff --git a/ARCMF.VR/f/common/f_sandboxHandler.sqf b/ARCMF.VR/f/common/f_sandboxHandler.sqf index 896c9e8..1fb0432 100644 --- a/ARCMF.VR/f/common/f_sandboxHandler.sqf +++ b/ARCMF.VR/f/common/f_sandboxHandler.sqf @@ -1,13 +1,12 @@ -if ((call ARC_fnc_isRespawnEnabled)) then { +if (call ARC_fnc_isRespawnEnabled) then { { if (!(_x call ARC_fnc_markerExists)) then { createMarker [_x, (call ARC_fnc_getStartingPos)]; }; } forEach ["respawn_west", "respawn_east", "respawn_guerrila"]; - if ((getNumber (missionConfigFile >> "Header" >> "sandbox")) == 1) then { + if (getNumber (missionConfigFile >> "Header" >> "sandbox") == 1) then { ["Initialize", [true]] call BIS_fnc_dynamicGroups; - //_arsenal = "Land_PaperBox_open_full_F" createVehicle (call ARC_fnc_getStartingPos); _arsenal = createVehicle ["Land_PaperBox_open_full_F", (call ARC_fnc_getStartingPos), [], 0, "NONE"]; ["AmmoboxInit", [_arsenal, true]] spawn BIS_fnc_arsenal; _arsenal allowDamage false; diff --git a/ARCMF.VR/f/common/f_sandboxHandler_client.sqf b/ARCMF.VR/f/common/f_sandboxHandler_client.sqf index 1f3facc..fbf7ac1 100644 --- a/ARCMF.VR/f/common/f_sandboxHandler_client.sqf +++ b/ARCMF.VR/f/common/f_sandboxHandler_client.sqf @@ -1,12 +1,10 @@ -[] spawn { - waitUntil {!isNull player}; - if ((call ARC_fnc_isRespawnEnabled)) then { - if ((getNumber (missionConfigFile >> "Header" >> "sandbox")) == 1) then { +[{!isNull player}, { + if (call ARC_fnc_isRespawnEnabled) then { + if (getNumber (missionConfigFile >> "Header" >> "sandbox") == 1) then { ["InitializePlayer", [player, true]] call BIS_fnc_dynamicGroups; - hint "Use the 'U' key to open the group manager. See 'Map >> ARCMF' for some added functionality."; if (!(player getVariable ["ARC_switchCamo_done", false])) then { player call ARC_fnc_switchCamo; }; }; }; -}; +}, []] call CBA_fnc_waitUntilAndExecute; \ No newline at end of file From 4f6dcb4963b5a24341d9af15bfa7d0fa4c95ca8b Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Thu, 9 Jun 2016 20:06:52 +0100 Subject: [PATCH 04/20] Shorten markerExists function --- ARCMF.VR/f/arc/markers/fn_markerExists.sqf | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ARCMF.VR/f/arc/markers/fn_markerExists.sqf b/ARCMF.VR/f/arc/markers/fn_markerExists.sqf index 7d841d5..2a69c6f 100644 --- a/ARCMF.VR/f/arc/markers/fn_markerExists.sqf +++ b/ARCMF.VR/f/arc/markers/fn_markerExists.sqf @@ -1,5 +1 @@ -if (getMarkerColor _this == "") exitWith { - false -}; - -true \ No newline at end of file +([false,true] select (_this in allMapMarkers)) \ No newline at end of file From b00ef329e9360a9c1fe213d70db370bfedb481ff Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Thu, 9 Jun 2016 20:09:20 +0100 Subject: [PATCH 05/20] Remove debug code --- ARCMF.VR/f/radios/acre2/acre2_clientInit.sqf | 1 - 1 file changed, 1 deletion(-) diff --git a/ARCMF.VR/f/radios/acre2/acre2_clientInit.sqf b/ARCMF.VR/f/radios/acre2/acre2_clientInit.sqf index 6d7f27d..1e4d038 100644 --- a/ARCMF.VR/f/radios/acre2/acre2_clientInit.sqf +++ b/ARCMF.VR/f/radios/acre2/acre2_clientInit.sqf @@ -45,7 +45,6 @@ switch (side _unit) do { }; [{(player getVariable ["f_var_assignGear_done", false]) && !("ItemRadio" in (items player + assignedItems player)) && [] call acre_api_fnc_isInitialized}, { - systemChat str _this; params ["_unit"]; _typeOfUnit = _unit getVariable ["f_var_assignGear", "NIL"]; From 3bdf13b2df7b3f3bf0993a57d929bf58b962a91c Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Thu, 9 Jun 2016 20:09:25 +0100 Subject: [PATCH 06/20] Update version --- ARCMF.VR/version.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ARCMF.VR/version.txt b/ARCMF.VR/version.txt index bb7a48b..589268e 100644 --- a/ARCMF.VR/version.txt +++ b/ARCMF.VR/version.txt @@ -1 +1 @@ -1.2.11 \ No newline at end of file +1.3.0 \ No newline at end of file From 10d275b62243d946b3674c81a746f37d33ad6d71 Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Thu, 9 Jun 2016 20:13:57 +0100 Subject: [PATCH 07/20] Remove unused function --- ARCMF.VR/description.ext | 1 - ARCMF.VR/f/common/fn_nearPlayer.sqf | 13 ------------- 2 files changed, 14 deletions(-) delete mode 100644 ARCMF.VR/f/common/fn_nearPlayer.sqf diff --git a/ARCMF.VR/description.ext b/ARCMF.VR/description.ext index dd2f3c0..75ea314 100644 --- a/ARCMF.VR/description.ext +++ b/ARCMF.VR/description.ext @@ -125,7 +125,6 @@ class CfgFunctions { class F { class common { file = "f\common"; - class nearPlayer {}; class processParamsArray { preInit = 1; postInit = 1; diff --git a/ARCMF.VR/f/common/fn_nearPlayer.sqf b/ARCMF.VR/f/common/fn_nearPlayer.sqf deleted file mode 100644 index 1a14ae4..0000000 --- a/ARCMF.VR/f/common/fn_nearPlayer.sqf +++ /dev/null @@ -1,13 +0,0 @@ -private ["_ent","_distance","_pos","_players"]; -_pos = getPosATL (_this select 0); -_distance = _this select 1; - -_players = []; - -{ - if (isPlayer _x) then {_players pushBack _x}; - false -} count playableUnits; - -if (({_x distance _pos < _distance} count _players) > 0) exitWith {true}; -false From f2300842dc23e10a551f825f90351feaaf74d002 Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Thu, 9 Jun 2016 20:14:09 +0100 Subject: [PATCH 08/20] Change formatting to new standard --- ARCMF.VR/f/assignGear/f_assignGear_blufor.sqf | 66 +++++++------------ ARCMF.VR/f/assignGear/f_assignGear_indfor.sqf | 66 +++++++------------ ARCMF.VR/f/assignGear/f_assignGear_opfor.sqf | 66 +++++++------------ 3 files changed, 66 insertions(+), 132 deletions(-) diff --git a/ARCMF.VR/f/assignGear/f_assignGear_blufor.sqf b/ARCMF.VR/f/assignGear/f_assignGear_blufor.sqf index deb4ace..04a3fed 100644 --- a/ARCMF.VR/f/assignGear/f_assignGear_blufor.sqf +++ b/ARCMF.VR/f/assignGear/f_assignGear_blufor.sqf @@ -7,11 +7,9 @@ removeBackpack this; removeHeadgear this; removeGoggles this; -switch (_typeOfUnit) do -{ +switch (_typeOfUnit) do { // LOADOUT: COMMANDER - case "co": - { + case "co": { this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_CableTie"; @@ -44,8 +42,7 @@ switch (_typeOfUnit) do }; // LOADOUT: DEPUTY COMMANDER AND SQUAD LEADER - case "dc": - { + case "dc": { this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_CableTie"; @@ -78,8 +75,7 @@ switch (_typeOfUnit) do }; // LOADOUT: FORWARD AIR CONTROLLER - case "fac": - { + case "fac": { this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_CableTie"; @@ -112,8 +108,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIC - case "m": - { + case "m": { this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; for "_i" from 1 to 2 do {this addItemToUniform "ACE_morphine";}; @@ -143,8 +138,7 @@ switch (_typeOfUnit) do }; // LOADOUT: FIRE TEAM LEADER - case "ftl": - { + case "ftl": { this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_CableTie"; @@ -177,8 +171,7 @@ switch (_typeOfUnit) do }; // LOADOUT: RIFLEMAN - case "r": - { + case "r": { this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_CableTie"; @@ -202,8 +195,7 @@ switch (_typeOfUnit) do }; // LOADOUT: AUTOMATIC RIFLEMAN - case "ar": - { + case "ar": { this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_CableTie"; @@ -226,8 +218,7 @@ switch (_typeOfUnit) do }; // LOADOUT: ASSISTANT AUTOMATIC RIFLEMAN - case "aar": - { + case "aar": { this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_CableTie"; @@ -253,8 +244,7 @@ switch (_typeOfUnit) do }; // LOADOUT: RIFLEMAN (AT) - case "rat": - { + case "rat": { this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_CableTie"; @@ -279,8 +269,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIUM MG TEAM LEADER - case "mmgtl": - { + case "mmgtl": { this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_CableTie"; @@ -313,8 +302,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIUM MG GUNNER - case "mmgg": - { + case "mmgg": { this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_CableTie"; @@ -336,8 +324,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIUM MG AMMO BEARER - case "mmgab": - { + case "mmgab": { this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_CableTie"; @@ -363,8 +350,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIUM AT TEAM LEADER - case "mattl": - { + case "mattl": { this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_CableTie"; @@ -397,8 +383,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIUM AT MISSILE SPECIALIST - case "matg": - { + case "matg": { this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_CableTie"; @@ -425,8 +410,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIUM AT ASSISTANT MISSILE SPECIALIST - case "matab": - { + case "matab": { this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_CableTie"; @@ -453,8 +437,7 @@ switch (_typeOfUnit) do }; // LOADOUT: PILOT - case "p": - { + case "p": { this forceAddUniform "U_B_HeliPilotCoveralls"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; for "_i" from 1 to 2 do {this addItemToUniform "ACE_morphine";}; @@ -474,8 +457,7 @@ switch (_typeOfUnit) do }; // LOADOUT: CO-PILOT - case "cp": - { + case "cp": { this forceAddUniform "U_B_HeliPilotCoveralls"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; for "_i" from 1 to 2 do {this addItemToUniform "ACE_morphine";}; @@ -495,8 +477,7 @@ switch (_typeOfUnit) do }; // LOADOUT: VEHICLE COMMANDER - case "vc": - { + case "vc": { this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_CableTie"; @@ -520,8 +501,7 @@ switch (_typeOfUnit) do }; // LOADOUT: VEHICLE DRIVER - case "vd": - { + case "vd": { this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_CableTie"; @@ -543,8 +523,7 @@ switch (_typeOfUnit) do }; // LOADOUT: VEHICLE GUNNER - case "vg": - { + case "vg": { this forceAddUniform "rhs_uniform_FROG01_wd"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_CableTie"; @@ -566,8 +545,7 @@ switch (_typeOfUnit) do }; // LOADOUT: DEFAULT/UNDEFINED (use RIFLEMAN) - default - { + default { if (_typeOfUnit != "r") then {["r", this] call f_fnc_assignGear;}; if (true) exitWith {player globalChat format ["DEBUG (f\assignGear\f_assignGear_blufor.sqf): Unit = %1. Gear template %2 does not exist, used Rifleman instead.", this, _typeOfUnit]}; }; diff --git a/ARCMF.VR/f/assignGear/f_assignGear_indfor.sqf b/ARCMF.VR/f/assignGear/f_assignGear_indfor.sqf index 9a53953..7069f91 100644 --- a/ARCMF.VR/f/assignGear/f_assignGear_indfor.sqf +++ b/ARCMF.VR/f/assignGear/f_assignGear_indfor.sqf @@ -7,11 +7,9 @@ removeBackpack this; removeHeadgear this; removeGoggles this; -switch (_typeOfUnit) do -{ +switch (_typeOfUnit) do { // LOADOUT: COMMANDER - case "co": - { + case "co": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; @@ -38,8 +36,7 @@ switch (_typeOfUnit) do }; // LOADOUT: DEPUTY COMMANDER AND SQUAD LEADER - case "dc": - { + case "dc": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; @@ -66,8 +63,7 @@ switch (_typeOfUnit) do }; // LOADOUT: FORWARD AIR CONTROLLER - case "fac": - { + case "fac": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; @@ -94,8 +90,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIC - case "m": - { + case "m": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; @@ -121,8 +116,7 @@ switch (_typeOfUnit) do }; // LOADOUT: FIRE TEAM LEADER - case "ftl": - { + case "ftl": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; @@ -149,8 +143,7 @@ switch (_typeOfUnit) do }; // LOADOUT: RIFLEMAN - case "r": - { + case "r": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; @@ -171,8 +164,7 @@ switch (_typeOfUnit) do }; // LOADOUT: AUTOMATIC RIFLEMAN - case "ar": - { + case "ar": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; @@ -194,8 +186,7 @@ switch (_typeOfUnit) do }; // LOADOUT: ASSISTANT AUTOMATIC RIFLEMAN - case "aar": - { + case "aar": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; @@ -218,8 +209,7 @@ switch (_typeOfUnit) do }; // LOADOUT: RIFLEMAN (AT) - case "rat": - { + case "rat": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; @@ -241,8 +231,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIUM MG TEAM LEADER - case "mmgtl": - { + case "mmgtl": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; @@ -269,8 +258,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIUM MG GUNNER - case "mmgg": - { + case "mmgg": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; @@ -290,8 +278,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIUM MG AMMO BEARER - case "mmgab": - { + case "mmgab": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; @@ -314,8 +301,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIUM AT TEAM LEADER - case "mattl": - { + case "mattl": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; @@ -342,8 +328,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIUM AT MISSILE SPECIALIST - case "matg": - { + case "matg": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; @@ -369,8 +354,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIUM AT ASSISTANT MISSILE SPECIALIST - case "matab": - { + case "matab": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; @@ -394,8 +378,7 @@ switch (_typeOfUnit) do }; // LOADOUT: PILOT - case "p": - { + case "p": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_XL50"; @@ -412,8 +395,7 @@ switch (_typeOfUnit) do }; // LOADOUT: CO-PILOT - case "cp": - { + case "cp": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_XL50"; @@ -430,8 +412,7 @@ switch (_typeOfUnit) do }; // LOADOUT: VEHICLE COMMANDER - case "vc": - { + case "vc": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; @@ -458,8 +439,7 @@ switch (_typeOfUnit) do }; // LOADOUT: VEHICLE DRIVER - case "vd": - { + case "vd": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; @@ -480,8 +460,7 @@ switch (_typeOfUnit) do }; // LOADOUT: VEHICLE GUNNER - case "vg": - { + case "vg": { this forceAddUniform "MNP_CombatUniform_Germany"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_EarPlugs"; @@ -502,8 +481,7 @@ switch (_typeOfUnit) do }; // LOADOUT: DEFAULT/UNDEFINED (use RIFLEMAN) - default - { + default { if (_typeOfUnit != "r") then {["r", this] call f_fnc_assignGear;}; if (true) exitWith {player globalChat format ["DEBUG (f\assignGear\f_assignGear_indfor.sqf): Unit = %1. Gear template %2 does not exist, used Rifleman instead.", this, _typeOfUnit]}; }; diff --git a/ARCMF.VR/f/assignGear/f_assignGear_opfor.sqf b/ARCMF.VR/f/assignGear/f_assignGear_opfor.sqf index 04a2110..dd0dd3f 100644 --- a/ARCMF.VR/f/assignGear/f_assignGear_opfor.sqf +++ b/ARCMF.VR/f/assignGear/f_assignGear_opfor.sqf @@ -7,11 +7,9 @@ removeBackpack this; removeHeadgear this; removeGoggles this; -switch (_typeOfUnit) do -{ +switch (_typeOfUnit) do { // LOADOUT: COMMANDER - case "co": - { + case "co": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -44,8 +42,7 @@ switch (_typeOfUnit) do }; // LOADOUT: DEPUTY COMMANDER AND SQUAD LEADER - case "dc": - { + case "dc": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -78,8 +75,7 @@ switch (_typeOfUnit) do }; // LOADOUT: FORWARD AIR CONTROLLER - case "fac": - { + case "fac": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -112,8 +108,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIC - case "m": - { + case "m": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -141,8 +136,7 @@ switch (_typeOfUnit) do }; // LOADOUT: FIRE TEAM LEADER - case "ftl": - { + case "ftl": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -175,8 +169,7 @@ switch (_typeOfUnit) do }; // LOADOUT: RIFLEMAN - case "r": - { + case "r": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -199,8 +192,7 @@ switch (_typeOfUnit) do }; // LOADOUT: AUTOMATIC RIFLEMAN - case "ar": - { + case "ar": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -221,8 +213,7 @@ switch (_typeOfUnit) do }; // LOADOUT: ASSISTANT AUTOMATIC RIFLEMAN - case "aar": - { + case "aar": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -247,8 +238,7 @@ switch (_typeOfUnit) do }; // LOADOUT: RIFLEMAN (AT) - case "rat": - { + case "rat": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -272,8 +262,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIUM MG TEAM LEADER - case "mmgtl": - { + case "mmgtl": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -306,8 +295,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIUM MG GUNNER - case "mmgg": - { + case "mmgg": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -328,8 +316,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIUM MG AMMO BEARER - case "mmgab": - { + case "mmgab": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -354,8 +341,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIUM AT TEAM LEADER - case "mattl": - { + case "mattl": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -388,8 +374,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIUM AT MISSILE SPECIALIST - case "matg": - { + case "matg": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -415,8 +400,7 @@ switch (_typeOfUnit) do }; // LOADOUT: MEDIUM AT ASSISTANT MISSILE SPECIALIST - case "matab": - { + case "matab": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -441,8 +425,7 @@ switch (_typeOfUnit) do }; // LOADOUT: PILOT - case "p": - { + case "p": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -463,8 +446,7 @@ switch (_typeOfUnit) do }; // LOADOUT: CO-PILOT - case "cp": - { + case "cp": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -485,8 +467,7 @@ switch (_typeOfUnit) do }; // LOADOUT: VEHICLE COMMANDER - case "vc": - { + case "vc": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -511,8 +492,7 @@ switch (_typeOfUnit) do }; // LOADOUT: VEHICLE DRIVER - case "vd": - { + case "vd": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -535,8 +515,7 @@ switch (_typeOfUnit) do }; // LOADOUT: VEHICLE GUNNER - case "vg": - { + case "vg": { this forceAddUniform "rhs_uniform_msv_emr"; for "_i" from 1 to 6 do {this addItemToUniform "ACE_fieldDressing";}; this addItemToUniform "ACE_Flashlight_KSF1"; @@ -559,8 +538,7 @@ switch (_typeOfUnit) do }; // LOADOUT: DEFAULT/UNDEFINED (use RIFLEMAN) - default - { + default { if (_typeOfUnit != "r") then {["r", this] call f_fnc_assignGear;}; if (true) exitWith {player globalChat format ["DEBUG (f\assignGear\f_assignGear_blufor.sqf): Unit = %1. Gear template %2 does not exist, used Rifleman instead.", this, _typeOfUnit]}; }; From 4232feb7e099b676c282f06d760c6ff1a5ee8c6f Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Thu, 9 Jun 2016 20:16:29 +0100 Subject: [PATCH 09/20] Remove unused macros --- ARCMF.VR/description.ext | 2 -- ARCMF.VR/f/arc/macros.hpp | 0 2 files changed, 2 deletions(-) delete mode 100644 ARCMF.VR/f/arc/macros.hpp diff --git a/ARCMF.VR/description.ext b/ARCMF.VR/description.ext index 75ea314..49f0b07 100644 --- a/ARCMF.VR/description.ext +++ b/ARCMF.VR/description.ext @@ -1,5 +1,3 @@ -#include "f\arc\macros.hpp" - class Header { gameType = Coop; minPlayers = 1; diff --git a/ARCMF.VR/f/arc/macros.hpp b/ARCMF.VR/f/arc/macros.hpp deleted file mode 100644 index e69de29..0000000 From a6276d213430c744df369597eb6d62475d781824 Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Thu, 9 Jun 2016 22:35:24 +0100 Subject: [PATCH 10/20] Add support for multiple radios of same type --- ARCMF.VR/f/radios/acre2/acre2_clientInit.sqf | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/ARCMF.VR/f/radios/acre2/acre2_clientInit.sqf b/ARCMF.VR/f/radios/acre2/acre2_clientInit.sqf index 1e4d038..e7b10a3 100644 --- a/ARCMF.VR/f/radios/acre2/acre2_clientInit.sqf +++ b/ARCMF.VR/f/radios/acre2/acre2_clientInit.sqf @@ -85,10 +85,19 @@ switch (side _unit) do { default {[]}; }; + #define ADD_RADIO(ARR, RADIO)\ + if (count (ARR select {_x == _typeOfUnit}) == 1 || (count ARR == 1 && toLower (ARR select 0) == "all")) then {\ + _unit addItem RADIO;\ + } else {\ + for "_i" from 1 to count (ARR select {_x == _typeOfUnit}) do {\ + _unit addItem RADIO;\ + }\ + }; + if (_typeOfUnit != "NIL") then { if (_typeOfUnit in _AN_PRC_343 || (count _AN_PRC_343 == 1 && toLower (_AN_PRC_343 select 0) == "all")) then { if (_unit canAdd RADIO_343) then { - _unit addItem RADIO_343; + ADD_RADIO(_AN_PRC_343, RADIO_343); } else { RADIO_343 call f_radios_acre2_giveRadioAction; }; @@ -96,7 +105,7 @@ switch (side _unit) do { if (_typeOfUnit in _AN_PRC_148 || (count _AN_PRC_148 == 1 && toLower (_AN_PRC_148 select 0) == "all")) then { if (_unit canAdd RADIO_148) then { - _unit addItem RADIO_148; + ADD_RADIO(_AN_PRC_148, RADIO_148); } else { RADIO_148 call f_radios_acre2_giveRadioAction; }; @@ -104,7 +113,7 @@ switch (side _unit) do { if (_typeOfUnit in _AN_PRC_152 || (count _AN_PRC_152 == 1 && toLower (_AN_PRC_152 select 0) == "all")) then { if (_unit canAdd RADIO_152) then { - _unit addItem RADIO_152; + ADD_RADIO(_AN_PRC_152, RADIO_152); } else { RADIO_152 call f_radios_acre2_giveRadioAction; }; @@ -112,7 +121,7 @@ switch (side _unit) do { if (_typeOfUnit in _AN_PRC_117F || (count _AN_PRC_117F == 1 && toLower (_AN_PRC_117F select 0) == "all")) then { if (_unit canAdd RADIO_117F) then { - _unit addItem RADIO_117F; + ADD_RADIO(_AN_PRC_117F, RADIO_117F); } else { RADIO_117F call f_radios_acre2_giveRadioAction; }; @@ -120,7 +129,7 @@ switch (side _unit) do { if (_typeOfUnit in _AN_PRC_77 || (count _AN_PRC_77 == 1 && toLower (_AN_PRC_77 select 0) == "all")) then { if (_unit canAdd RADIO_77) then { - _unit addItem RADIO_77; + ADD_RADIO(_AN_PRC_77, RADIO_77); } else { RADIO_77 call f_radios_acre2_giveRadioAction; }; From dae8c8dc2861d5bb6ba176e47aaefaa008cd3785 Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Thu, 9 Jun 2016 23:00:25 +0100 Subject: [PATCH 11/20] Add garrison building function --- ARCMF.VR/f/arc/ai/fn_garrisonBuilding.sqf | 200 +++++++++++++++++++++ ARCMF.VR/f/arc/config.hpp | 2 + ARCMF.VR/f/arc/helpers/fn_arrayShuffle.sqf | 18 ++ 3 files changed, 220 insertions(+) create mode 100644 ARCMF.VR/f/arc/ai/fn_garrisonBuilding.sqf create mode 100644 ARCMF.VR/f/arc/helpers/fn_arrayShuffle.sqf diff --git a/ARCMF.VR/f/arc/ai/fn_garrisonBuilding.sqf b/ARCMF.VR/f/arc/ai/fn_garrisonBuilding.sqf new file mode 100644 index 0000000..425495a --- /dev/null +++ b/ARCMF.VR/f/arc/ai/fn_garrisonBuilding.sqf @@ -0,0 +1,200 @@ +/* + * Author: alganthe + * Handles placing the AI into houses + * + * Arguments: + * 0: The building(s) nearest this position are used + * 1: Limit the building search to those type of building + * 2: Units that will be garrisoned + * 3: Radius to fill building(s) -1 for nearest only default: -1 + * 4: 0: even filling, 1: building by building, 2: random filling default: 0 + * 5: True to fill building(s) from top to bottom default: false + + * Return Value: + * Array of units not garrisoned + * + * Example: + * [position, nil, [unit1, unit2, unit3, unitN], 200, 1, false] call ARC_fnc_garrisonBuilding + */ + +params [ + ["_startingPos", [0,0,0], [[], objNull]], + ["_buildingTypes", ["Building"]], + ["_unitsArray", [], [[], grpNull, objNull]], + ["_fillingRadius", -1], + ["_fillingType", 0], + ["_topDownFilling", false] +]; + +if (_startingPos isEqualType objNull) then { + _startingPos = getPosATL _startingPos; +}; + +if (_startingPos isEqualTo [0,0,0]) exitWith { + player sideChat str "AIOccupyBuilding Error : Invalid position given."; + diag_log "AIOccupyBuilding Error : Invalid position given."; +}; + +if (_unitsArray isEqualType objNull) then { + _unitsArray = units (group _unitsArray); +}; + +if (_unitsArray isEqualType grpNull) then { + _unitsArray = units _unitsArray; +}; + +if (count _unitsArray == 0 || {isNull (_unitsArray select 0)}) exitWith { + player sideChat str "AIOccupyBuilding Error : No units provided."; + diag_log "AIOccupyBuilding Error : No units provided."; +}; + +private _buildings = []; + +if (_fillingRadius == -1) then { + _buildings = nearestObjects [_startingPos, _buildingTypes, 50]; +} else { + _buildings = nearestObjects [_startingPos, _buildingTypes, _fillingRadius]; + _buildings = _buildings call ARC_fnc_arrayShuffle; +}; + +if (count _buildings == 0) exitWith { + player sideChat str "AIOccupyBuilding Error : No building found."; + diag_log "AIOccupyBuilding Error : No building found."; +}; + +private _buildingsIndexes = []; + +if (_topDownFilling) then { + { + private _buildingPos = _x buildingPos -1; + + { + reverse _x; + } foreach _buildingPos; + + _buildingPos sort false; + + { + reverse _x; + } foreach _buildingPos; + + _buildingsIndexes pushback _buildingPos; + } foreach _buildings; +} else { + { + _buildingsIndexes pushback (_x buildingPos -1); + } foreach _buildings; +}; + +// Remove buildings without pos +{ + _buildingsIndexes deleteAt (_buildingsIndexes find _x); +} foreach (_buildingsIndexes select {count _x == 0}); + +private _cnt = 0; +{_cnt = _cnt + count _x} foreach _buildingsIndexes; +private _leftOverAICount = (count _unitsArray) - _cnt; +if (_leftOverAICount > 0) then { + diag_log "AIOccupyBuilding Warning: Not enough spots to place all units"; +}; + +switch (_fillingType) do { + case 0: { + while {count _unitsArray > 0} do { + scopeName "derp"; + if (count _buildingsIndexes == 0) exitWith {breakOut "derp"}; + + private _building = _buildingsIndexes select 0; + + // Remove building if all pos are used + if (_building isEqualTo []) then { + _buildingsIndexes deleteAt 0; + breakTo "derp"; + }; + + private _pos = _building select 0; + + if ( count (_pos nearEntities ["CAManBase", 1]) > 0) then { + _buildingsIndexes set [0, _building - [_pos]]; + breakTo "derp"; + + } else { + private _unit = _unitsArray select 0; + _unit disableAI "FSM"; + _unit disableAI "AUTOCOMBAT"; + _unit forceSpeed 0; + _unit setPos _pos; + _unitsArray deleteAt (_unitsArray find _unit); + _building deleteAt 0; + _buildingsIndexes deleteAt 0; + _buildingsIndexes pushbackUnique _building; + }; + }; + }; + + case 1: { + while {count _unitsArray > 0} do { + scopeName "derp"; + if (count _buildingsIndexes == 0) exitWith {breakOut "derp"}; + + private _building = _buildingsIndexes select 0; + + // Remove building if all pos are used + if (_building isEqualTo []) then { + _buildingsIndexes deleteAt 0; + breakTo "derp"; + }; + + private _pos = _building select 0; + + // Remove building if all pos are used + if ( count (_pos nearEntities ["CAManBase", 1]) > 0) then { + _buildingsIndexes set [0, _building - [_pos]]; + breakTo "derp"; + + } else { + private _unit = _unitsArray select 0; + _unit disableAI "FSM"; + _unit disableAI "AUTOCOMBAT"; + _unit forceSpeed 0; + _unit setPos _pos; + _unitsArray deleteAt (_unitsArray find _unit); + _buildingsIndexes set [0, _building - [_pos]]; + }; + }; + }; + + case 2: { + while {count _unitsArray > 0} do { + scopeName "derp"; + if (count _buildingsIndexes == 0) exitWith {breakOut "derp"}; + + private _building = selectRandom _buildingsIndexes; + + // Remove building if all pos are used + if (_building isEqualTo []) then { + _buildingsIndexes deleteAt (_buildingsIndexes find _building); + breakTo "derp"; + }; + + private _pos = selectRandom _building; + + // Remove pos if unit nearby + if ( count (_pos nearEntities ["CAManBase", 1]) > 0) then { + _buildingsIndexes set [(_buildingsIndexes find _building), _building - [_pos]]; + breakTo "derp"; + + } else { + private _unit = _unitsArray select 0; + _unit disableAI "FSM"; + _unit disableAI "AUTOCOMBAT"; + _unit forceSpeed 0; + _unit setPos _pos; + _unitsArray deleteAt (_unitsArray find _unit); + _buildingsIndexes set [(_buildingsIndexes find _building), _building - [_pos]]; + }; + }; + }; +}; + +_unitsArray diff --git a/ARCMF.VR/f/arc/config.hpp b/ARCMF.VR/f/arc/config.hpp index 8d3aa2a..cd04352 100644 --- a/ARCMF.VR/f/arc/config.hpp +++ b/ARCMF.VR/f/arc/config.hpp @@ -18,6 +18,7 @@ class ARC class pickItemFromAIGear {}; class pickAttachmentsFromAIGear {}; class setupAI {}; + class garrisonBuilding {}; }; class halo { @@ -53,6 +54,7 @@ class ARC class broadcastDiary {}; class getUnitType {}; class zeroPad {}; + class arrayShuffle {}; }; class radios { diff --git a/ARCMF.VR/f/arc/helpers/fn_arrayShuffle.sqf b/ARCMF.VR/f/arc/helpers/fn_arrayShuffle.sqf new file mode 100644 index 0000000..88cf70d --- /dev/null +++ b/ARCMF.VR/f/arc/helpers/fn_arrayShuffle.sqf @@ -0,0 +1,18 @@ +/* + * Author: alganthe + * Shuffles the provided array. + * + * Arguments: + * 0: Array to be shuffled + * + * Return Value: + * Shuffled array + */ + +private _cnt = count _this; + +for "_i" from 1 to _cnt do { + _this pushBack (_this deleteAt floor random _cnt); +}; + +_this From 308070932e8699aef5bb47521299f5a4d515485f Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Thu, 9 Jun 2016 23:03:51 +0100 Subject: [PATCH 12/20] Remove TF47 dependencies --- ARCMF.VR/f/assignGear/f_assignGear_blufor.sqf | 4 ++-- ARCMF.VR/f/assignGear/f_assignGear_indfor.sqf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ARCMF.VR/f/assignGear/f_assignGear_blufor.sqf b/ARCMF.VR/f/assignGear/f_assignGear_blufor.sqf index 04a3fed..a74b2a9 100644 --- a/ARCMF.VR/f/assignGear/f_assignGear_blufor.sqf +++ b/ARCMF.VR/f/assignGear/f_assignGear_blufor.sqf @@ -260,7 +260,7 @@ switch (_typeOfUnit) do { this addHeadgear "rhsusf_lwh_helmet_marpatwd_headset"; this addWeapon "rhs_weap_m16a4_carryhandle"; this addPrimaryWeaponItem "RH_peq15"; - this addWeapon "tf47_at4_HEDP"; + this addWeapon "rhs_weap_M136"; this addWeapon "rhsusf_weap_m9"; this linkItem "ItemMap"; this linkItem "ItemCompass"; @@ -401,7 +401,7 @@ switch (_typeOfUnit) do { this addHeadgear "rhsusf_lwh_helmet_marpatwd_headset"; this addWeapon "rhs_weap_m16a4_carryhandle"; this addPrimaryWeaponItem "RH_peq15"; - this addWeapon "tf47_smaw_green"; + this addWeapon "rhs_weap_smaw_green"; this addSecondaryWeaponItem "tf47_optic_smaw"; this linkItem "ItemMap"; this linkItem "ItemCompass"; diff --git a/ARCMF.VR/f/assignGear/f_assignGear_indfor.sqf b/ARCMF.VR/f/assignGear/f_assignGear_indfor.sqf index 7069f91..898f783 100644 --- a/ARCMF.VR/f/assignGear/f_assignGear_indfor.sqf +++ b/ARCMF.VR/f/assignGear/f_assignGear_indfor.sqf @@ -223,7 +223,7 @@ switch (_typeOfUnit) do { this addHeadgear "MNP_Helmet_Germany"; this addWeapon "hlc_rifle_G36V"; this addPrimaryWeaponItem "RH_LTdocterl"; - this addWeapon "tf47_at4_heat"; + this addWeapon "rhs_weap_M136"; this linkItem "ItemMap"; this linkItem "ItemCompass"; this linkItem "ItemWatch"; @@ -345,7 +345,7 @@ switch (_typeOfUnit) do { this addHeadgear "MNP_Helmet_Germany"; this addWeapon "hlc_rifle_G36V"; this addPrimaryWeaponItem "RH_LTdocterl"; - this addWeapon "tf47_smaw_green"; + this addWeapon "rhs_weap_smaw_green"; this addSecondaryWeaponItem "tf47_optic_smaw"; this linkItem "ItemMap"; this linkItem "ItemCompass"; From 8642eb85adc78b65a75e0d07ae8d8aa023346ee1 Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Thu, 9 Jun 2016 23:45:05 +0100 Subject: [PATCH 13/20] Change group markers to use Eden group IDs and remove "handled" condition --- ARCMF.VR/f/arc/tracker/fn_updateTracker.sqf | 25 +- ARCMF.VR/f/setGroupID/f_setGroupIDs.sqf | 414 ++++++++++---------- ARCMF.VR/f/setGroupID/fn_setGroupID.sqf | 11 +- 3 files changed, 222 insertions(+), 228 deletions(-) diff --git a/ARCMF.VR/f/arc/tracker/fn_updateTracker.sqf b/ARCMF.VR/f/arc/tracker/fn_updateTracker.sqf index 9e4e28b..aaba9f6 100644 --- a/ARCMF.VR/f/arc/tracker/fn_updateTracker.sqf +++ b/ARCMF.VR/f/arc/tracker/fn_updateTracker.sqf @@ -4,7 +4,7 @@ private ["_groupsToDrawMarkers", "_playerSide", "_colour", "_marker"]; ARC_tracker_markers = []; -if (ARC_tracker_enabled and {(!isNil "ACE_player") and {alive ACE_player}}) then { +if (ARC_tracker_enabled && {(!isNil "ACE_player") && {alive ACE_player}}) then { _groupsToDrawMarkers = []; _playerSide = playerSide; _enableGroupMarkers = [false,true] select (getNumber (missionConfigFile >> "CfgARCMF" >> "markers" >> (_playerSide call ARC_fnc_getFactionFromSide) >> "enableGroupMarkers") == 1); @@ -17,22 +17,19 @@ if (ARC_tracker_enabled and {(!isNil "ACE_player") and {alive ACE_player}}) then _groupsToDrawMarkers = _groupsToDrawMarkers select {{isPlayer _x} count units _x > 0}; }; - _defaultHandled = [false,true] select (getNumber (missionConfigFile >> "Header" >> "sandbox") == 1); _markerIndex = 0; { - if (_x getVariable ["ARC_groupHandled", _defaultHandled]) then { - private _markerType = _x call ARC_fnc_getMarkerType; - private _colour = _x getVariable ["ARC_groupColour", format ["Color%1", side _x]]; - - private _marker = createMarkerLocal [format ["ARC_TRACKER_%1", _markerIndex], [(getPos leader _x) select 0, (getPos leader _x) select 1]]; - _marker setMarkerTypeLocal _markerType; - _marker setMarkerColorLocal _colour; - _marker setMarkerTextLocal (groupId _x); - - ARC_tracker_markers pushBack _marker; - _markerIndex = _markerIndex + 1; - }; + private _markerType = _x call ARC_fnc_getMarkerType; + private _colour = _x getVariable ["ARC_groupColour", format ["Color%1", side _x]]; + + private _marker = createMarkerLocal [format ["ARC_TRACKER_%1", _markerIndex], [(getPos leader _x) select 0, (getPos leader _x) select 1]]; + _marker setMarkerTypeLocal _markerType; + _marker setMarkerColorLocal _colour; + _marker setMarkerTextLocal (groupId _x); + + ARC_tracker_markers pushBack _marker; + _markerIndex = _markerIndex + 1; false } count _groupsToDrawMarkers; diff --git a/ARCMF.VR/f/setGroupID/f_setGroupIDs.sqf b/ARCMF.VR/f/setGroupID/f_setGroupIDs.sqf index 3f90792..cb07a93 100644 --- a/ARCMF.VR/f/setGroupID/f_setGroupIDs.sqf +++ b/ARCMF.VR/f/setGroupID/f_setGroupIDs.sqf @@ -1,214 +1,214 @@ {_x call f_fnc_setGroupID;false} count [ // GROUP IDs: BLUFOR - ["GrpBLUFOR_CO_CC","CO","ColorOrange"], - ["GrpBLUFOR_1PLT_CO","1PLT","ColorYellow"], - ["GrpBLUFOR_2PLT_CO","2PLT","ColorYellow"], - - ["GrpBLUFOR_ASL","ASL","ColorRed"], - ["GrpBLUFOR_A1","A1","ColorRed"], - ["GrpBLUFOR_A2","A2","ColorRed"], - ["GrpBLUFOR_A3","A3","ColorRed"], - - ["GrpBLUFOR_BSL","BSL","ColorBlue"], - ["GrpBLUFOR_B1","B1","ColorBlue"], - ["GrpBLUFOR_B2","B2","ColorBlue"], - ["GrpBLUFOR_B3","B3","ColorBlue"], - - ["GrpBLUFOR_CSL","CSL","ColorGreen"], - ["GrpBLUFOR_C1","C1","ColorGreen"], - ["GrpBLUFOR_C2","C2","ColorGreen"], - ["GrpBLUFOR_C3","C3","ColorGreen"], - - ["GrpBLUFOR_DSL","DSL","ColorRed"], - ["GrpBLUFOR_D1","D1","ColorRed"], - ["GrpBLUFOR_D2","D2","ColorRed"], - ["GrpBLUFOR_D3","D3","ColorRed"], - - ["GrpBLUFOR_ESL","ESL","ColorBlue"], - ["GrpBLUFOR_E1","E1","ColorBlue"], - ["GrpBLUFOR_E2","E2","ColorBlue"], - ["GrpBLUFOR_E3","E3","ColorBlue"], - - ["GrpBLUFOR_FSL","FSL","ColorGreen"], - ["GrpBLUFOR_F1","F1","ColorGreen"], - ["GrpBLUFOR_F2","F2","ColorGreen"], - ["GrpBLUFOR_F3","F3","ColorGreen"], - - ["GrpBLUFOR_MMG1","MMG1","ColorOrange"], - ["GrpBLUFOR_MMG2","MMG2","ColorOrange"], - ["GrpBLUFOR_MMG3","MMG3","ColorOrange"], - ["GrpBLUFOR_MMG4","MMG4","ColorOrange"], - ["GrpBLUFOR_MMG5","MMG5","ColorOrange"], - ["GrpBLUFOR_MMG6","MMG6","ColorOrange"], - ["GrpBLUFOR_MMG7","MMG7","ColorOrange"], - ["GrpBLUFOR_MMG8","MMG8","ColorOrange"], - - ["GrpBLUFOR_MAT1","MAT1","ColorOrange"], - ["GrpBLUFOR_MAT2","MAT2","ColorOrange"], - ["GrpBLUFOR_MAT3","MAT3","ColorOrange"], - ["GrpBLUFOR_MAT4","MAT4","ColorOrange"], - ["GrpBLUFOR_MAT5","MAT5","ColorOrange"], - ["GrpBLUFOR_MAT6","MAT6","ColorOrange"], - ["GrpBLUFOR_MAT7","MAT7","ColorOrange"], - ["GrpBLUFOR_MAT8","MAT8","ColorOrange"], - - ["GrpBLUFOR_G1","G1","ColorPink"], - ["GrpBLUFOR_G2","G2","ColorPink"], - ["GrpBLUFOR_G3","G3","ColorPink"], - ["GrpBLUFOR_G4","G4","ColorPink"], - ["GrpBLUFOR_G5","G5","ColorPink"], - ["GrpBLUFOR_G6","G6","ColorPink"], - ["GrpBLUFOR_G7","G7","ColorPink"], - ["GrpBLUFOR_G8","G8","ColorPink"], - - ["GrpBLUFOR_PH1","PH1","ColorRed"], - ["GrpBLUFOR_PH2","PH2","ColorRed"], - ["GrpBLUFOR_PH3","PH3","ColorRed"], - ["GrpBLUFOR_PH4","PH4","ColorRed"], - ["GrpBLUFOR_PH5","PH5","ColorRed"], - ["GrpBLUFOR_PH6","PH6","ColorRed"], - ["GrpBLUFOR_PH7","PH7","ColorRed"], - ["GrpBLUFOR_PH8","PH8","ColorRed"], + ["GrpBLUFOR_CO_CC","ColorOrange"], + ["GrpBLUFOR_1PLT_CO","ColorYellow"], + ["GrpBLUFOR_2PLT_CO","ColorYellow"], + + ["GrpBLUFOR_ASL","ColorRed"], + ["GrpBLUFOR_A1","ColorRed"], + ["GrpBLUFOR_A2","ColorRed"], + ["GrpBLUFOR_A3","ColorRed"], + + ["GrpBLUFOR_BSL","ColorBlue"], + ["GrpBLUFOR_B1","ColorBlue"], + ["GrpBLUFOR_B2","ColorBlue"], + ["GrpBLUFOR_B3","ColorBlue"], + + ["GrpBLUFOR_CSL","ColorGreen"], + ["GrpBLUFOR_C1","ColorGreen"], + ["GrpBLUFOR_C2","ColorGreen"], + ["GrpBLUFOR_C3","ColorGreen"], + + ["GrpBLUFOR_DSL","ColorRed"], + ["GrpBLUFOR_D1","ColorRed"], + ["GrpBLUFOR_D2","ColorRed"], + ["GrpBLUFOR_D3","ColorRed"], + + ["GrpBLUFOR_ESL","ColorBlue"], + ["GrpBLUFOR_E1","ColorBlue"], + ["GrpBLUFOR_E2","ColorBlue"], + ["GrpBLUFOR_E3","ColorBlue"], + + ["GrpBLUFOR_FSL","ColorGreen"], + ["GrpBLUFOR_F1","ColorGreen"], + ["GrpBLUFOR_F2","ColorGreen"], + ["GrpBLUFOR_F3","ColorGreen"], + + ["GrpBLUFOR_MMG1","ColorOrange"], + ["GrpBLUFOR_MMG2","ColorOrange"], + ["GrpBLUFOR_MMG3","ColorOrange"], + ["GrpBLUFOR_MMG4","ColorOrange"], + ["GrpBLUFOR_MMG5","ColorOrange"], + ["GrpBLUFOR_MMG6","ColorOrange"], + ["GrpBLUFOR_MMG7","ColorOrange"], + ["GrpBLUFOR_MMG8","ColorOrange"], + + ["GrpBLUFOR_MAT1","ColorOrange"], + ["GrpBLUFOR_MAT2","ColorOrange"], + ["GrpBLUFOR_MAT3","ColorOrange"], + ["GrpBLUFOR_MAT4","ColorOrange"], + ["GrpBLUFOR_MAT5","ColorOrange"], + ["GrpBLUFOR_MAT6","ColorOrange"], + ["GrpBLUFOR_MAT7","ColorOrange"], + ["GrpBLUFOR_MAT8","ColorOrange"], + + ["GrpBLUFOR_G1","ColorPink"], + ["GrpBLUFOR_G2","ColorPink"], + ["GrpBLUFOR_G3","ColorPink"], + ["GrpBLUFOR_G4","ColorPink"], + ["GrpBLUFOR_G5","ColorPink"], + ["GrpBLUFOR_G6","ColorPink"], + ["GrpBLUFOR_G7","ColorPink"], + ["GrpBLUFOR_G8","ColorPink"], + + ["GrpBLUFOR_PH1","ColorRed"], + ["GrpBLUFOR_PH2","ColorRed"], + ["GrpBLUFOR_PH3","ColorRed"], + ["GrpBLUFOR_PH4","ColorRed"], + ["GrpBLUFOR_PH5","ColorRed"], + ["GrpBLUFOR_PH6","ColorRed"], + ["GrpBLUFOR_PH7","ColorRed"], + ["GrpBLUFOR_PH8","ColorRed"], // GROUP IDs: OPFOR - ["GrpOPFOR_CO_CC","CO","ColorOrange"], - ["GrpOPFOR_1PLT_CO","1PLT","ColorYellow"], - ["GrpOPFOR_2PLT_CO","2PLT","ColorYellow"], - - ["GrpOPFOR_ASL","ASL","ColorRed"], - ["GrpOPFOR_A1","A1","ColorRed"], - ["GrpOPFOR_A2","A2","ColorRed"], - ["GrpOPFOR_A3","A3","ColorRed"], - - ["GrpOPFOR_BSL","BSL","ColorBlue"], - ["GrpOPFOR_B1","B1","ColorBlue"], - ["GrpOPFOR_B2","B2","ColorBlue"], - ["GrpOPFOR_B3","B3","ColorBlue"], - - ["GrpOPFOR_CSL","CSL","ColorGreen"], - ["GrpOPFOR_C1","C1","ColorGreen"], - ["GrpOPFOR_C2","C2","ColorGreen"], - ["GrpOPFOR_C3","C3","ColorGreen"], - - ["GrpOPFOR_DSL","DSL","ColorRed"], - ["GrpOPFOR_D1","D1","ColorRed"], - ["GrpOPFOR_D2","D2","ColorRed"], - ["GrpOPFOR_D3","D3","ColorRed"], - - ["GrpOPFOR_ESL","ESL","ColorBlue"], - ["GrpOPFOR_E1","E1","ColorBlue"], - ["GrpOPFOR_E2","E2","ColorBlue"], - ["GrpOPFOR_E3","E3","ColorBlue"], - - ["GrpOPFOR_FSL","FSL","ColorGreen"], - ["GrpOPFOR_F1","F1","ColorGreen"], - ["GrpOPFOR_F2","F2","ColorGreen"], - ["GrpOPFOR_F3","F3","ColorGreen"], - - ["GrpOPFOR_MMG1","MMG1","ColorOrange"], - ["GrpOPFOR_MMG2","MMG2","ColorOrange"], - ["GrpOPFOR_MMG3","MMG3","ColorOrange"], - ["GrpOPFOR_MMG4","MMG4","ColorOrange"], - ["GrpOPFOR_MMG5","MMG5","ColorOrange"], - ["GrpOPFOR_MMG6","MMG6","ColorOrange"], - ["GrpOPFOR_MMG7","MMG7","ColorOrange"], - ["GrpOPFOR_MMG8","MMG8","ColorOrange"], - - ["GrpOPFOR_MAT1","MAT1","ColorOrange"], - ["GrpOPFOR_MAT2","MAT2","ColorOrange"], - ["GrpOPFOR_MAT3","MAT3","ColorOrange"], - ["GrpOPFOR_MAT4","MAT4","ColorOrange"], - ["GrpOPFOR_MAT5","MAT5","ColorOrange"], - ["GrpOPFOR_MAT6","MAT6","ColorOrange"], - ["GrpOPFOR_MAT7","MAT7","ColorOrange"], - ["GrpOPFOR_MAT8","MAT8","ColorOrange"], - - ["GrpOPFOR_G1","G1","ColorPink"], - ["GrpOPFOR_G2","G2","ColorPink"], - ["GrpOPFOR_G3","G3","ColorPink"], - ["GrpOPFOR_G4","G4","ColorPink"], - ["GrpOPFOR_G5","G5","ColorPink"], - ["GrpOPFOR_G6","G6","ColorPink"], - ["GrpOPFOR_G7","G7","ColorPink"], - ["GrpOPFOR_G8","G8","ColorPink"], - - ["GrpOPFOR_PH1","PH1","ColorRed"], - ["GrpOPFOR_PH2","PH2","ColorRed"], - ["GrpOPFOR_PH3","PH3","ColorRed"], - ["GrpOPFOR_PH4","PH4","ColorRed"], - ["GrpOPFOR_PH5","PH5","ColorRed"], - ["GrpOPFOR_PH6","PH6","ColorRed"], - ["GrpOPFOR_PH7","PH7","ColorRed"], - ["GrpOPFOR_PH8","PH8","ColorRed"], + ["GrpOPFOR_CO_CC","ColorOrange"], + ["GrpOPFOR_1PLT_CO","ColorYellow"], + ["GrpOPFOR_2PLT_CO","ColorYellow"], + + ["GrpOPFOR_ASL","ColorRed"], + ["GrpOPFOR_A1","ColorRed"], + ["GrpOPFOR_A2","ColorRed"], + ["GrpOPFOR_A3","ColorRed"], + + ["GrpOPFOR_BSL","ColorBlue"], + ["GrpOPFOR_B1","ColorBlue"], + ["GrpOPFOR_B2","ColorBlue"], + ["GrpOPFOR_B3","ColorBlue"], + + ["GrpOPFOR_CSL","ColorGreen"], + ["GrpOPFOR_C1","ColorGreen"], + ["GrpOPFOR_C2","ColorGreen"], + ["GrpOPFOR_C3","ColorGreen"], + + ["GrpOPFOR_DSL","ColorRed"], + ["GrpOPFOR_D1","ColorRed"], + ["GrpOPFOR_D2","ColorRed"], + ["GrpOPFOR_D3","ColorRed"], + + ["GrpOPFOR_ESL","ColorBlue"], + ["GrpOPFOR_E1","ColorBlue"], + ["GrpOPFOR_E2","ColorBlue"], + ["GrpOPFOR_E3","ColorBlue"], + + ["GrpOPFOR_FSL","ColorGreen"], + ["GrpOPFOR_F1","ColorGreen"], + ["GrpOPFOR_F2","ColorGreen"], + ["GrpOPFOR_F3","ColorGreen"], + + ["GrpOPFOR_MMG1","ColorOrange"], + ["GrpOPFOR_MMG2","ColorOrange"], + ["GrpOPFOR_MMG3","ColorOrange"], + ["GrpOPFOR_MMG4","ColorOrange"], + ["GrpOPFOR_MMG5","ColorOrange"], + ["GrpOPFOR_MMG6","ColorOrange"], + ["GrpOPFOR_MMG7","ColorOrange"], + ["GrpOPFOR_MMG8","ColorOrange"], + + ["GrpOPFOR_MAT1","ColorOrange"], + ["GrpOPFOR_MAT2","ColorOrange"], + ["GrpOPFOR_MAT3","ColorOrange"], + ["GrpOPFOR_MAT4","ColorOrange"], + ["GrpOPFOR_MAT5","ColorOrange"], + ["GrpOPFOR_MAT6","ColorOrange"], + ["GrpOPFOR_MAT7","ColorOrange"], + ["GrpOPFOR_MAT8","ColorOrange"], + + ["GrpOPFOR_G1","ColorPink"], + ["GrpOPFOR_G2","ColorPink"], + ["GrpOPFOR_G3","ColorPink"], + ["GrpOPFOR_G4","ColorPink"], + ["GrpOPFOR_G5","ColorPink"], + ["GrpOPFOR_G6","ColorPink"], + ["GrpOPFOR_G7","ColorPink"], + ["GrpOPFOR_G8","ColorPink"], + + ["GrpOPFOR_PH1","ColorRed"], + ["GrpOPFOR_PH2","ColorRed"], + ["GrpOPFOR_PH3","ColorRed"], + ["GrpOPFOR_PH4","ColorRed"], + ["GrpOPFOR_PH5","ColorRed"], + ["GrpOPFOR_PH6","ColorRed"], + ["GrpOPFOR_PH7","ColorRed"], + ["GrpOPFOR_PH8","ColorRed"], // GROUP IDs: INDEPENDENT - ["GrpINDFOR_CO_CC","CO","ColorOrange"], - ["GrpINDFOR_1PLT_CO","1PLT","ColorYellow"], - ["GrpINDFOR_2PLT_CO","2PLT","ColorYellow"], - - ["GrpINDFOR_ASL","ASL","ColorRed"], - ["GrpINDFOR_A1","A1","ColorRed"], - ["GrpINDFOR_A2","A2","ColorRed"], - ["GrpINDFOR_A3","A3","ColorRed"], - - ["GrpINDFOR_BSL","BSL","ColorBlue"], - ["GrpINDFOR_B1","B1","ColorBlue"], - ["GrpINDFOR_B2","B2","ColorBlue"], - ["GrpINDFOR_B3","B3","ColorBlue"], - - ["GrpINDFOR_CSL","CSL","ColorGreen"], - ["GrpINDFOR_C1","C1","ColorGreen"], - ["GrpINDFOR_C2","C2","ColorGreen"], - ["GrpINDFOR_C3","C3","ColorGreen"], - - ["GrpINDFOR_DSL","DSL","ColorRed"], - ["GrpINDFOR_D1","D1","ColorRed"], - ["GrpINDFOR_D2","D2","ColorRed"], - ["GrpINDFOR_D3","D3","ColorRed"], - - ["GrpINDFOR_ESL","ESL","ColorBlue"], - ["GrpINDFOR_E1","E1","ColorBlue"], - ["GrpINDFOR_E2","E2","ColorBlue"], - ["GrpINDFOR_E3","E3","ColorBlue"], - - ["GrpINDFOR_FSL","FSL","ColorGreen"], - ["GrpINDFOR_F1","F1","ColorGreen"], - ["GrpINDFOR_F2","F2","ColorGreen"], - ["GrpINDFOR_F3","F3","ColorGreen"], - - ["GrpINDFOR_MMG1","MMG1","ColorOrange"], - ["GrpINDFOR_MMG2","MMG2","ColorOrange"], - ["GrpINDFOR_MMG3","MMG3","ColorOrange"], - ["GrpINDFOR_MMG4","MMG4","ColorOrange"], - ["GrpINDFOR_MMG5","MMG5","ColorOrange"], - ["GrpINDFOR_MMG6","MMG6","ColorOrange"], - ["GrpINDFOR_MMG7","MMG7","ColorOrange"], - ["GrpINDFOR_MMG8","MMG8","ColorOrange"], - - ["GrpINDFOR_MAT1","MAT1","ColorOrange"], - ["GrpINDFOR_MAT2","MAT2","ColorOrange"], - ["GrpINDFOR_MAT3","MAT3","ColorOrange"], - ["GrpINDFOR_MAT4","MAT4","ColorOrange"], - ["GrpINDFOR_MAT5","MAT5","ColorOrange"], - ["GrpINDFOR_MAT6","MAT6","ColorOrange"], - ["GrpINDFOR_MAT7","MAT7","ColorOrange"], - ["GrpINDFOR_MAT8","MAT8","ColorOrange"], - - ["GrpINDFOR_G1","G1","ColorPink"], - ["GrpINDFOR_G2","G2","ColorPink"], - ["GrpINDFOR_G3","G3","ColorPink"], - ["GrpINDFOR_G4","G4","ColorPink"], - ["GrpINDFOR_G5","G5","ColorPink"], - ["GrpINDFOR_G6","G6","ColorPink"], - ["GrpINDFOR_G7","G7","ColorPink"], - ["GrpINDFOR_G8","G8","ColorPink"], - - ["GrpINDFOR_PH1","PH1","ColorRed"], - ["GrpINDFOR_PH2","PH2","ColorRed"], - ["GrpINDFOR_PH3","PH3","ColorRed"], - ["GrpINDFOR_PH4","PH4","ColorRed"], - ["GrpINDFOR_PH5","PH5","ColorRed"], - ["GrpINDFOR_PH6","PH6","ColorRed"], - ["GrpINDFOR_PH7","PH7","ColorRed"], - ["GrpINDFOR_PH8","PH8","ColorRed"] + ["GrpINDFOR_CO_CC","ColorOrange"], + ["GrpINDFOR_1PLT_CO","ColorYellow"], + ["GrpINDFOR_2PLT_CO","ColorYellow"], + + ["GrpINDFOR_ASL","ColorRed"], + ["GrpINDFOR_A1","ColorRed"], + ["GrpINDFOR_A2","ColorRed"], + ["GrpINDFOR_A3","ColorRed"], + + ["GrpINDFOR_BSL","ColorBlue"], + ["GrpINDFOR_B1","ColorBlue"], + ["GrpINDFOR_B2","ColorBlue"], + ["GrpINDFOR_B3","ColorBlue"], + + ["GrpINDFOR_CSL","ColorGreen"], + ["GrpINDFOR_C1","ColorGreen"], + ["GrpINDFOR_C2","ColorGreen"], + ["GrpINDFOR_C3","ColorGreen"], + + ["GrpINDFOR_DSL","ColorRed"], + ["GrpINDFOR_D1","ColorRed"], + ["GrpINDFOR_D2","ColorRed"], + ["GrpINDFOR_D3","ColorRed"], + + ["GrpINDFOR_ESL","ColorBlue"], + ["GrpINDFOR_E1","ColorBlue"], + ["GrpINDFOR_E2","ColorBlue"], + ["GrpINDFOR_E3","ColorBlue"], + + ["GrpINDFOR_FSL","ColorGreen"], + ["GrpINDFOR_F1","ColorGreen"], + ["GrpINDFOR_F2","ColorGreen"], + ["GrpINDFOR_F3","ColorGreen"], + + ["GrpINDFOR_MMG1","ColorOrange"], + ["GrpINDFOR_MMG2","ColorOrange"], + ["GrpINDFOR_MMG3","ColorOrange"], + ["GrpINDFOR_MMG4","ColorOrange"], + ["GrpINDFOR_MMG5","ColorOrange"], + ["GrpINDFOR_MMG6","ColorOrange"], + ["GrpINDFOR_MMG7","ColorOrange"], + ["GrpINDFOR_MMG8","ColorOrange"], + + ["GrpINDFOR_MAT1","ColorOrange"], + ["GrpINDFOR_MAT2","ColorOrange"], + ["GrpINDFOR_MAT3","ColorOrange"], + ["GrpINDFOR_MAT4","ColorOrange"], + ["GrpINDFOR_MAT5","ColorOrange"], + ["GrpINDFOR_MAT6","ColorOrange"], + ["GrpINDFOR_MAT7","ColorOrange"], + ["GrpINDFOR_MAT8","ColorOrange"], + + ["GrpINDFOR_G1","ColorPink"], + ["GrpINDFOR_G2","ColorPink"], + ["GrpINDFOR_G3","ColorPink"], + ["GrpINDFOR_G4","ColorPink"], + ["GrpINDFOR_G5","ColorPink"], + ["GrpINDFOR_G6","ColorPink"], + ["GrpINDFOR_G7","ColorPink"], + ["GrpINDFOR_G8","ColorPink"], + + ["GrpINDFOR_PH1","ColorRed"], + ["GrpINDFOR_PH2","ColorRed"], + ["GrpINDFOR_PH3","ColorRed"], + ["GrpINDFOR_PH4","ColorRed"], + ["GrpINDFOR_PH5","ColorRed"], + ["GrpINDFOR_PH6","ColorRed"], + ["GrpINDFOR_PH7","ColorRed"], + ["GrpINDFOR_PH8","ColorRed"] ]; \ No newline at end of file diff --git a/ARCMF.VR/f/setGroupID/fn_setGroupID.sqf b/ARCMF.VR/f/setGroupID/fn_setGroupID.sqf index c1fb2e8..8ebdd62 100644 --- a/ARCMF.VR/f/setGroupID/fn_setGroupID.sqf +++ b/ARCMF.VR/f/setGroupID/fn_setGroupID.sqf @@ -1,9 +1,6 @@ -private ["_grp","_name"]; +params ["_grpID", "_color"]; -if (!isNil (_this select 0)) then { - _grp = call compile format ["%1", _this select 0]; - _name = _this select 1; - _grp setGroupId [format ["%1", _name], "GroupColor0"]; - _grp setVariable ["ARC_groupColour", (_this select 2), true]; - _grp setVariable ["ARC_groupHandled", true, true]; +if (!isNil _grpID) then { + private _grp = call compile format ["%1", _grpID]; + _grp setVariable ["ARC_groupColour", _color, true]; }; \ No newline at end of file From 6d8908da3f74ed6dc2e4b2e159b111911471540e Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Fri, 10 Jun 2016 00:11:02 +0100 Subject: [PATCH 14/20] Remove keyboard search and update params --- ARCMF.VR/f/spect/config.hpp | 1 + ARCMF.VR/f/spect/fn_CamInit.sqf | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/ARCMF.VR/f/spect/config.hpp b/ARCMF.VR/f/spect/config.hpp index bd444ed..717544a 100644 --- a/ARCMF.VR/f/spect/config.hpp +++ b/ARCMF.VR/f/spect/config.hpp @@ -545,6 +545,7 @@ class RscSpectList colorText[] = {1,1,1,1}; font = "PuristaMedium"; maxHistoryDelay = 1; + disableKeyboardSearch = 1; shadow = 1; sizeEx = "(((((safezoneW / safezoneH) min 0.9) / 1.2) / 25) * 1)"; soundCollapse[] = {"\A3\ui_f\data\sound\RscCombo\soundCollapse",0.1,1}; diff --git a/ARCMF.VR/f/spect/fn_CamInit.sqf b/ARCMF.VR/f/spect/fn_CamInit.sqf index 09d3cec..ff63457 100644 --- a/ARCMF.VR/f/spect/fn_CamInit.sqf +++ b/ARCMF.VR/f/spect/fn_CamInit.sqf @@ -2,9 +2,13 @@ // [player, objNull, 4, 1, true] call f_fnc_CamInit; _this spawn { - _unit = [_this, 0, player,[objNull]] call BIS_fnc_param; - _oldUnit = [_this, 1, objNull,[objNull]] call BIS_fnc_param; - _forced = [_this, 4, false,[false]] call BIS_fnc_param; + params [ + ["_unit", objNull], + ["_oldUnit", objNull], + ["_respawn", 1], + ["_respawnDelay", 3], + ["_forced", false] + ]; ARC_cam_preCamGroup = group player; ARC_cam_preCamSide = playerSide; @@ -12,10 +16,10 @@ _this spawn { ARC_cam_preCamPos = getPos player; ARC_cam_preCamLoadout = [player, "init", false] call BIS_fnc_exportInventory; - if (isNil "f_cam_isJIP") then { f_cam_isJIP = false; }; - if (isNull _unit) then { _unit = cameraOn; f_cam_isJIP = true; }; + if (isNil "f_cam_isJIP") then {f_cam_isJIP = false}; + if (isNull _unit) then {_unit = cameraOn; f_cam_isJIP = true}; if (typeOf _unit != "seagull" && !_forced || !hasInterface) exitWith {}; - waituntil {missionNamespace getVariable ["BIS_fnc_feedback_allowDeathScreen", true] || isNull (_oldUnit) || f_cam_isJIP || _forced }; + waituntil {missionNamespace getVariable ["BIS_fnc_feedback_allowDeathScreen", true] || isNull (_oldUnit) || f_cam_isJIP || _forced}; if (!isNil "BIS_fnc_feedback_allowPP") then { BIS_fnc_feedback_allowPP = false; @@ -59,7 +63,6 @@ _this spawn { _listBox = 2100; lbClear _listBox; - // set inital values. #include "macros.hpp" f_cam_controls = [F_CAM_HELPFRAME,F_CAM_HELPBACK,F_CAM_MOUSEHANDLER,F_CAM_UNITLIST,F_CAM_HELPCANCEL,F_CAM_HELPCANCEL,F_CAM_MINIMAP,F_CAM_FULLMAP,F_CAM_BUTTIONFILTER,F_CAM_BUTTIONTAGS,F_CAM_BUTTIONTAGSNAME,F_CAM_BUTTIONFIRSTPERSON,F_CAM_BUTTONRESPAWN,F_CAM_TOGGLELIST,F_CAM_TRACERS]; f_cam_units = []; @@ -242,7 +245,6 @@ _this spawn { false } count (allUnits + vehicles); - // spawn sub scripts f_cam_updatevalues_script = [] spawn f_fnc_UpdateValues; ["f_spect_tags", "onEachFrame", {_this call f_fnc_DrawTags}] call BIS_fnc_addStackedEventHandler; ["f_spect_cams", "onEachFrame", {_this call f_fnc_FreeCam}] call BIS_fnc_addStackedEventHandler; From 2fb8a5878f0fa3f3cec57b1e35577b417f324e6e Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Fri, 10 Jun 2016 00:29:14 +0100 Subject: [PATCH 15/20] Stop empty briefing sections from showing --- ARCMF.VR/f/briefing/f_briefing_blufor.sqf | 8 ++++++-- ARCMF.VR/f/briefing/f_briefing_civ.sqf | 8 ++++++-- ARCMF.VR/f/briefing/f_briefing_indfor.sqf | 8 ++++++-- ARCMF.VR/f/briefing/f_briefing_opfor.sqf | 8 ++++++-- 4 files changed, 24 insertions(+), 8 deletions(-) diff --git a/ARCMF.VR/f/briefing/f_briefing_blufor.sqf b/ARCMF.VR/f/briefing/f_briefing_blufor.sqf index b2bde04..e0f3afa 100644 --- a/ARCMF.VR/f/briefing/f_briefing_blufor.sqf +++ b/ARCMF.VR/f/briefing/f_briefing_blufor.sqf @@ -29,7 +29,9 @@ if (_specialTasks != "") then { _exe = format ["%1Special Tasks
%2
", _exe, _specialTasks]; }; -player createDiaryRecord ["diary", ["Execution", _exe]]; +if (_exe != "") then { + player createDiaryRecord ["diary", ["Execution", _exe]]; +}; _mission = [_side, "mission"] call ARC_fnc_buildBriefingFromConfig; if (_mission != "") then { @@ -53,4 +55,6 @@ if (_ff != "") then { _situation = format ["%1Friendly Forces
%2
", _situation, _ff]; }; -player createDiaryRecord ["diary", ["Situation", _situation]]; \ No newline at end of file +if (_situation != "") then { + player createDiaryRecord ["diary", ["Situation", _situation]]; +}; \ No newline at end of file diff --git a/ARCMF.VR/f/briefing/f_briefing_civ.sqf b/ARCMF.VR/f/briefing/f_briefing_civ.sqf index 92876c8..5014388 100644 --- a/ARCMF.VR/f/briefing/f_briefing_civ.sqf +++ b/ARCMF.VR/f/briefing/f_briefing_civ.sqf @@ -29,7 +29,9 @@ if (_specialTasks != "") then { _exe = format ["%1Special Tasks
%2
", _exe, _specialTasks]; }; -player createDiaryRecord ["diary", ["Execution", _exe]]; +if (_exe != "") then { + player createDiaryRecord ["diary", ["Execution", _exe]]; +}; _mission = [_side, "mission"] call ARC_fnc_buildBriefingFromConfig; if (_mission != "") then { @@ -53,4 +55,6 @@ if (_ff != "") then { _situation = format ["%1Friendly Forces
%2
", _situation, _ff]; }; -player createDiaryRecord ["diary", ["Situation", _situation]]; \ No newline at end of file +if (_situation != "") then { + player createDiaryRecord ["diary", ["Situation", _situation]]; +}; \ No newline at end of file diff --git a/ARCMF.VR/f/briefing/f_briefing_indfor.sqf b/ARCMF.VR/f/briefing/f_briefing_indfor.sqf index 336ba1c..1efb17b 100644 --- a/ARCMF.VR/f/briefing/f_briefing_indfor.sqf +++ b/ARCMF.VR/f/briefing/f_briefing_indfor.sqf @@ -29,7 +29,9 @@ if (_specialTasks != "") then { _exe = format ["%1Special Tasks
%2
", _exe, _specialTasks]; }; -player createDiaryRecord ["diary", ["Execution", _exe]]; +if (_exe != "") then { + player createDiaryRecord ["diary", ["Execution", _exe]]; +}; _mission = [_side, "mission"] call ARC_fnc_buildBriefingFromConfig; if (_mission != "") then { @@ -53,4 +55,6 @@ if (_ff != "") then { _situation = format ["%1Friendly Forces
%2
", _situation, _ff]; }; -player createDiaryRecord ["diary", ["Situation", _situation]]; \ No newline at end of file +if (_situation != "") then { + player createDiaryRecord ["diary", ["Situation", _situation]]; +}; \ No newline at end of file diff --git a/ARCMF.VR/f/briefing/f_briefing_opfor.sqf b/ARCMF.VR/f/briefing/f_briefing_opfor.sqf index a9b26a4..04cdad8 100644 --- a/ARCMF.VR/f/briefing/f_briefing_opfor.sqf +++ b/ARCMF.VR/f/briefing/f_briefing_opfor.sqf @@ -29,7 +29,9 @@ if (_specialTasks != "") then { _exe = format ["%1Special Tasks
%2
", _exe, _specialTasks]; }; -player createDiaryRecord ["diary", ["Execution", _exe]]; +if (_exe != "") then { + player createDiaryRecord ["diary", ["Execution", _exe]]; +}; _mission = [_side, "mission"] call ARC_fnc_buildBriefingFromConfig; if (_mission != "") then { @@ -53,4 +55,6 @@ if (_ff != "") then { _situation = format ["%1Friendly Forces
%2
", _situation, _ff]; }; -player createDiaryRecord ["diary", ["Situation", _situation]]; \ No newline at end of file +if (_situation != "") then { + player createDiaryRecord ["diary", ["Situation", _situation]]; +}; \ No newline at end of file From beba894fbfabc45d58fc550e808ca9f1d1f482bf Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Fri, 10 Jun 2016 00:48:31 +0100 Subject: [PATCH 16/20] Update SQM item numbers --- ARCMF.VR/mission.sqm | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/ARCMF.VR/mission.sqm b/ARCMF.VR/mission.sqm index 7ad96fd..3dffdee 100644 --- a/ARCMF.VR/mission.sqm +++ b/ARCMF.VR/mission.sqm @@ -16,10 +16,10 @@ class EditorData }; class Camera { - pos[]={89.470169,100.63174,17.556202}; - dir[]={0.10757873,-0.93172836,0.34689862}; - up[]={0.27597755,0.36315939,0.88991886}; - aside[]={0.95514244,-1.7695129e-007,-0.2962046}; + pos[]={103.63173,141.03195,-29.328512}; + dir[]={0.008236832,-0.78485399,0.619654}; + up[]={0.010431439,0.61966306,0.78480291}; + aside[]={0.99993205,-5.363836e-008,-0.013291912}; }; }; binarizationWanted=0; @@ -70,7 +70,7 @@ class Mission }; class Entities { - items=180; + items=179; class Item0 { dataType="Group"; @@ -23699,18 +23699,5 @@ class Mission id=1660; type="HeadlessClient_F"; }; - class Item179 - { - dataType="Logic"; - class PositionInfo - { - position[]={0,5,2}; - }; - name="HC3"; - isPlayable=1; - description="HC3"; - id=1662; - type="HeadlessClient_F"; - }; }; }; From 6120e1748a6dd477866bbcf4785b005227d207dc Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Fri, 10 Jun 2016 00:48:38 +0100 Subject: [PATCH 17/20] Remove broken prop --- ARCMF.VR/description.ext | 1 - 1 file changed, 1 deletion(-) diff --git a/ARCMF.VR/description.ext b/ARCMF.VR/description.ext index 49f0b07..bf53dc9 100644 --- a/ARCMF.VR/description.ext +++ b/ARCMF.VR/description.ext @@ -8,7 +8,6 @@ class Header { onLoadName = "ARCMF"; onLoadMission = "ARCOMM Mission Framework."; author = "Kingsley, tryteyker, Nelson"; -overviewPicture = "splash.paa"; loadScreen = "splash.paa"; enableDebugConsole = 1; disabledAI = 1; From 3dbb50ab3747cee22fafe8cdf520d91711a1f1c5 Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Fri, 10 Jun 2016 01:05:32 +0100 Subject: [PATCH 18/20] Revert groupID changes --- ARCMF.VR/f/setGroupID/f_setGroupIDs.sqf | 414 ++++++++++++------------ ARCMF.VR/f/setGroupID/fn_setGroupID.sqf | 5 +- 2 files changed, 210 insertions(+), 209 deletions(-) diff --git a/ARCMF.VR/f/setGroupID/f_setGroupIDs.sqf b/ARCMF.VR/f/setGroupID/f_setGroupIDs.sqf index cb07a93..3f90792 100644 --- a/ARCMF.VR/f/setGroupID/f_setGroupIDs.sqf +++ b/ARCMF.VR/f/setGroupID/f_setGroupIDs.sqf @@ -1,214 +1,214 @@ {_x call f_fnc_setGroupID;false} count [ // GROUP IDs: BLUFOR - ["GrpBLUFOR_CO_CC","ColorOrange"], - ["GrpBLUFOR_1PLT_CO","ColorYellow"], - ["GrpBLUFOR_2PLT_CO","ColorYellow"], - - ["GrpBLUFOR_ASL","ColorRed"], - ["GrpBLUFOR_A1","ColorRed"], - ["GrpBLUFOR_A2","ColorRed"], - ["GrpBLUFOR_A3","ColorRed"], - - ["GrpBLUFOR_BSL","ColorBlue"], - ["GrpBLUFOR_B1","ColorBlue"], - ["GrpBLUFOR_B2","ColorBlue"], - ["GrpBLUFOR_B3","ColorBlue"], - - ["GrpBLUFOR_CSL","ColorGreen"], - ["GrpBLUFOR_C1","ColorGreen"], - ["GrpBLUFOR_C2","ColorGreen"], - ["GrpBLUFOR_C3","ColorGreen"], - - ["GrpBLUFOR_DSL","ColorRed"], - ["GrpBLUFOR_D1","ColorRed"], - ["GrpBLUFOR_D2","ColorRed"], - ["GrpBLUFOR_D3","ColorRed"], - - ["GrpBLUFOR_ESL","ColorBlue"], - ["GrpBLUFOR_E1","ColorBlue"], - ["GrpBLUFOR_E2","ColorBlue"], - ["GrpBLUFOR_E3","ColorBlue"], - - ["GrpBLUFOR_FSL","ColorGreen"], - ["GrpBLUFOR_F1","ColorGreen"], - ["GrpBLUFOR_F2","ColorGreen"], - ["GrpBLUFOR_F3","ColorGreen"], - - ["GrpBLUFOR_MMG1","ColorOrange"], - ["GrpBLUFOR_MMG2","ColorOrange"], - ["GrpBLUFOR_MMG3","ColorOrange"], - ["GrpBLUFOR_MMG4","ColorOrange"], - ["GrpBLUFOR_MMG5","ColorOrange"], - ["GrpBLUFOR_MMG6","ColorOrange"], - ["GrpBLUFOR_MMG7","ColorOrange"], - ["GrpBLUFOR_MMG8","ColorOrange"], - - ["GrpBLUFOR_MAT1","ColorOrange"], - ["GrpBLUFOR_MAT2","ColorOrange"], - ["GrpBLUFOR_MAT3","ColorOrange"], - ["GrpBLUFOR_MAT4","ColorOrange"], - ["GrpBLUFOR_MAT5","ColorOrange"], - ["GrpBLUFOR_MAT6","ColorOrange"], - ["GrpBLUFOR_MAT7","ColorOrange"], - ["GrpBLUFOR_MAT8","ColorOrange"], - - ["GrpBLUFOR_G1","ColorPink"], - ["GrpBLUFOR_G2","ColorPink"], - ["GrpBLUFOR_G3","ColorPink"], - ["GrpBLUFOR_G4","ColorPink"], - ["GrpBLUFOR_G5","ColorPink"], - ["GrpBLUFOR_G6","ColorPink"], - ["GrpBLUFOR_G7","ColorPink"], - ["GrpBLUFOR_G8","ColorPink"], - - ["GrpBLUFOR_PH1","ColorRed"], - ["GrpBLUFOR_PH2","ColorRed"], - ["GrpBLUFOR_PH3","ColorRed"], - ["GrpBLUFOR_PH4","ColorRed"], - ["GrpBLUFOR_PH5","ColorRed"], - ["GrpBLUFOR_PH6","ColorRed"], - ["GrpBLUFOR_PH7","ColorRed"], - ["GrpBLUFOR_PH8","ColorRed"], + ["GrpBLUFOR_CO_CC","CO","ColorOrange"], + ["GrpBLUFOR_1PLT_CO","1PLT","ColorYellow"], + ["GrpBLUFOR_2PLT_CO","2PLT","ColorYellow"], + + ["GrpBLUFOR_ASL","ASL","ColorRed"], + ["GrpBLUFOR_A1","A1","ColorRed"], + ["GrpBLUFOR_A2","A2","ColorRed"], + ["GrpBLUFOR_A3","A3","ColorRed"], + + ["GrpBLUFOR_BSL","BSL","ColorBlue"], + ["GrpBLUFOR_B1","B1","ColorBlue"], + ["GrpBLUFOR_B2","B2","ColorBlue"], + ["GrpBLUFOR_B3","B3","ColorBlue"], + + ["GrpBLUFOR_CSL","CSL","ColorGreen"], + ["GrpBLUFOR_C1","C1","ColorGreen"], + ["GrpBLUFOR_C2","C2","ColorGreen"], + ["GrpBLUFOR_C3","C3","ColorGreen"], + + ["GrpBLUFOR_DSL","DSL","ColorRed"], + ["GrpBLUFOR_D1","D1","ColorRed"], + ["GrpBLUFOR_D2","D2","ColorRed"], + ["GrpBLUFOR_D3","D3","ColorRed"], + + ["GrpBLUFOR_ESL","ESL","ColorBlue"], + ["GrpBLUFOR_E1","E1","ColorBlue"], + ["GrpBLUFOR_E2","E2","ColorBlue"], + ["GrpBLUFOR_E3","E3","ColorBlue"], + + ["GrpBLUFOR_FSL","FSL","ColorGreen"], + ["GrpBLUFOR_F1","F1","ColorGreen"], + ["GrpBLUFOR_F2","F2","ColorGreen"], + ["GrpBLUFOR_F3","F3","ColorGreen"], + + ["GrpBLUFOR_MMG1","MMG1","ColorOrange"], + ["GrpBLUFOR_MMG2","MMG2","ColorOrange"], + ["GrpBLUFOR_MMG3","MMG3","ColorOrange"], + ["GrpBLUFOR_MMG4","MMG4","ColorOrange"], + ["GrpBLUFOR_MMG5","MMG5","ColorOrange"], + ["GrpBLUFOR_MMG6","MMG6","ColorOrange"], + ["GrpBLUFOR_MMG7","MMG7","ColorOrange"], + ["GrpBLUFOR_MMG8","MMG8","ColorOrange"], + + ["GrpBLUFOR_MAT1","MAT1","ColorOrange"], + ["GrpBLUFOR_MAT2","MAT2","ColorOrange"], + ["GrpBLUFOR_MAT3","MAT3","ColorOrange"], + ["GrpBLUFOR_MAT4","MAT4","ColorOrange"], + ["GrpBLUFOR_MAT5","MAT5","ColorOrange"], + ["GrpBLUFOR_MAT6","MAT6","ColorOrange"], + ["GrpBLUFOR_MAT7","MAT7","ColorOrange"], + ["GrpBLUFOR_MAT8","MAT8","ColorOrange"], + + ["GrpBLUFOR_G1","G1","ColorPink"], + ["GrpBLUFOR_G2","G2","ColorPink"], + ["GrpBLUFOR_G3","G3","ColorPink"], + ["GrpBLUFOR_G4","G4","ColorPink"], + ["GrpBLUFOR_G5","G5","ColorPink"], + ["GrpBLUFOR_G6","G6","ColorPink"], + ["GrpBLUFOR_G7","G7","ColorPink"], + ["GrpBLUFOR_G8","G8","ColorPink"], + + ["GrpBLUFOR_PH1","PH1","ColorRed"], + ["GrpBLUFOR_PH2","PH2","ColorRed"], + ["GrpBLUFOR_PH3","PH3","ColorRed"], + ["GrpBLUFOR_PH4","PH4","ColorRed"], + ["GrpBLUFOR_PH5","PH5","ColorRed"], + ["GrpBLUFOR_PH6","PH6","ColorRed"], + ["GrpBLUFOR_PH7","PH7","ColorRed"], + ["GrpBLUFOR_PH8","PH8","ColorRed"], // GROUP IDs: OPFOR - ["GrpOPFOR_CO_CC","ColorOrange"], - ["GrpOPFOR_1PLT_CO","ColorYellow"], - ["GrpOPFOR_2PLT_CO","ColorYellow"], - - ["GrpOPFOR_ASL","ColorRed"], - ["GrpOPFOR_A1","ColorRed"], - ["GrpOPFOR_A2","ColorRed"], - ["GrpOPFOR_A3","ColorRed"], - - ["GrpOPFOR_BSL","ColorBlue"], - ["GrpOPFOR_B1","ColorBlue"], - ["GrpOPFOR_B2","ColorBlue"], - ["GrpOPFOR_B3","ColorBlue"], - - ["GrpOPFOR_CSL","ColorGreen"], - ["GrpOPFOR_C1","ColorGreen"], - ["GrpOPFOR_C2","ColorGreen"], - ["GrpOPFOR_C3","ColorGreen"], - - ["GrpOPFOR_DSL","ColorRed"], - ["GrpOPFOR_D1","ColorRed"], - ["GrpOPFOR_D2","ColorRed"], - ["GrpOPFOR_D3","ColorRed"], - - ["GrpOPFOR_ESL","ColorBlue"], - ["GrpOPFOR_E1","ColorBlue"], - ["GrpOPFOR_E2","ColorBlue"], - ["GrpOPFOR_E3","ColorBlue"], - - ["GrpOPFOR_FSL","ColorGreen"], - ["GrpOPFOR_F1","ColorGreen"], - ["GrpOPFOR_F2","ColorGreen"], - ["GrpOPFOR_F3","ColorGreen"], - - ["GrpOPFOR_MMG1","ColorOrange"], - ["GrpOPFOR_MMG2","ColorOrange"], - ["GrpOPFOR_MMG3","ColorOrange"], - ["GrpOPFOR_MMG4","ColorOrange"], - ["GrpOPFOR_MMG5","ColorOrange"], - ["GrpOPFOR_MMG6","ColorOrange"], - ["GrpOPFOR_MMG7","ColorOrange"], - ["GrpOPFOR_MMG8","ColorOrange"], - - ["GrpOPFOR_MAT1","ColorOrange"], - ["GrpOPFOR_MAT2","ColorOrange"], - ["GrpOPFOR_MAT3","ColorOrange"], - ["GrpOPFOR_MAT4","ColorOrange"], - ["GrpOPFOR_MAT5","ColorOrange"], - ["GrpOPFOR_MAT6","ColorOrange"], - ["GrpOPFOR_MAT7","ColorOrange"], - ["GrpOPFOR_MAT8","ColorOrange"], - - ["GrpOPFOR_G1","ColorPink"], - ["GrpOPFOR_G2","ColorPink"], - ["GrpOPFOR_G3","ColorPink"], - ["GrpOPFOR_G4","ColorPink"], - ["GrpOPFOR_G5","ColorPink"], - ["GrpOPFOR_G6","ColorPink"], - ["GrpOPFOR_G7","ColorPink"], - ["GrpOPFOR_G8","ColorPink"], - - ["GrpOPFOR_PH1","ColorRed"], - ["GrpOPFOR_PH2","ColorRed"], - ["GrpOPFOR_PH3","ColorRed"], - ["GrpOPFOR_PH4","ColorRed"], - ["GrpOPFOR_PH5","ColorRed"], - ["GrpOPFOR_PH6","ColorRed"], - ["GrpOPFOR_PH7","ColorRed"], - ["GrpOPFOR_PH8","ColorRed"], + ["GrpOPFOR_CO_CC","CO","ColorOrange"], + ["GrpOPFOR_1PLT_CO","1PLT","ColorYellow"], + ["GrpOPFOR_2PLT_CO","2PLT","ColorYellow"], + + ["GrpOPFOR_ASL","ASL","ColorRed"], + ["GrpOPFOR_A1","A1","ColorRed"], + ["GrpOPFOR_A2","A2","ColorRed"], + ["GrpOPFOR_A3","A3","ColorRed"], + + ["GrpOPFOR_BSL","BSL","ColorBlue"], + ["GrpOPFOR_B1","B1","ColorBlue"], + ["GrpOPFOR_B2","B2","ColorBlue"], + ["GrpOPFOR_B3","B3","ColorBlue"], + + ["GrpOPFOR_CSL","CSL","ColorGreen"], + ["GrpOPFOR_C1","C1","ColorGreen"], + ["GrpOPFOR_C2","C2","ColorGreen"], + ["GrpOPFOR_C3","C3","ColorGreen"], + + ["GrpOPFOR_DSL","DSL","ColorRed"], + ["GrpOPFOR_D1","D1","ColorRed"], + ["GrpOPFOR_D2","D2","ColorRed"], + ["GrpOPFOR_D3","D3","ColorRed"], + + ["GrpOPFOR_ESL","ESL","ColorBlue"], + ["GrpOPFOR_E1","E1","ColorBlue"], + ["GrpOPFOR_E2","E2","ColorBlue"], + ["GrpOPFOR_E3","E3","ColorBlue"], + + ["GrpOPFOR_FSL","FSL","ColorGreen"], + ["GrpOPFOR_F1","F1","ColorGreen"], + ["GrpOPFOR_F2","F2","ColorGreen"], + ["GrpOPFOR_F3","F3","ColorGreen"], + + ["GrpOPFOR_MMG1","MMG1","ColorOrange"], + ["GrpOPFOR_MMG2","MMG2","ColorOrange"], + ["GrpOPFOR_MMG3","MMG3","ColorOrange"], + ["GrpOPFOR_MMG4","MMG4","ColorOrange"], + ["GrpOPFOR_MMG5","MMG5","ColorOrange"], + ["GrpOPFOR_MMG6","MMG6","ColorOrange"], + ["GrpOPFOR_MMG7","MMG7","ColorOrange"], + ["GrpOPFOR_MMG8","MMG8","ColorOrange"], + + ["GrpOPFOR_MAT1","MAT1","ColorOrange"], + ["GrpOPFOR_MAT2","MAT2","ColorOrange"], + ["GrpOPFOR_MAT3","MAT3","ColorOrange"], + ["GrpOPFOR_MAT4","MAT4","ColorOrange"], + ["GrpOPFOR_MAT5","MAT5","ColorOrange"], + ["GrpOPFOR_MAT6","MAT6","ColorOrange"], + ["GrpOPFOR_MAT7","MAT7","ColorOrange"], + ["GrpOPFOR_MAT8","MAT8","ColorOrange"], + + ["GrpOPFOR_G1","G1","ColorPink"], + ["GrpOPFOR_G2","G2","ColorPink"], + ["GrpOPFOR_G3","G3","ColorPink"], + ["GrpOPFOR_G4","G4","ColorPink"], + ["GrpOPFOR_G5","G5","ColorPink"], + ["GrpOPFOR_G6","G6","ColorPink"], + ["GrpOPFOR_G7","G7","ColorPink"], + ["GrpOPFOR_G8","G8","ColorPink"], + + ["GrpOPFOR_PH1","PH1","ColorRed"], + ["GrpOPFOR_PH2","PH2","ColorRed"], + ["GrpOPFOR_PH3","PH3","ColorRed"], + ["GrpOPFOR_PH4","PH4","ColorRed"], + ["GrpOPFOR_PH5","PH5","ColorRed"], + ["GrpOPFOR_PH6","PH6","ColorRed"], + ["GrpOPFOR_PH7","PH7","ColorRed"], + ["GrpOPFOR_PH8","PH8","ColorRed"], // GROUP IDs: INDEPENDENT - ["GrpINDFOR_CO_CC","ColorOrange"], - ["GrpINDFOR_1PLT_CO","ColorYellow"], - ["GrpINDFOR_2PLT_CO","ColorYellow"], - - ["GrpINDFOR_ASL","ColorRed"], - ["GrpINDFOR_A1","ColorRed"], - ["GrpINDFOR_A2","ColorRed"], - ["GrpINDFOR_A3","ColorRed"], - - ["GrpINDFOR_BSL","ColorBlue"], - ["GrpINDFOR_B1","ColorBlue"], - ["GrpINDFOR_B2","ColorBlue"], - ["GrpINDFOR_B3","ColorBlue"], - - ["GrpINDFOR_CSL","ColorGreen"], - ["GrpINDFOR_C1","ColorGreen"], - ["GrpINDFOR_C2","ColorGreen"], - ["GrpINDFOR_C3","ColorGreen"], - - ["GrpINDFOR_DSL","ColorRed"], - ["GrpINDFOR_D1","ColorRed"], - ["GrpINDFOR_D2","ColorRed"], - ["GrpINDFOR_D3","ColorRed"], - - ["GrpINDFOR_ESL","ColorBlue"], - ["GrpINDFOR_E1","ColorBlue"], - ["GrpINDFOR_E2","ColorBlue"], - ["GrpINDFOR_E3","ColorBlue"], - - ["GrpINDFOR_FSL","ColorGreen"], - ["GrpINDFOR_F1","ColorGreen"], - ["GrpINDFOR_F2","ColorGreen"], - ["GrpINDFOR_F3","ColorGreen"], - - ["GrpINDFOR_MMG1","ColorOrange"], - ["GrpINDFOR_MMG2","ColorOrange"], - ["GrpINDFOR_MMG3","ColorOrange"], - ["GrpINDFOR_MMG4","ColorOrange"], - ["GrpINDFOR_MMG5","ColorOrange"], - ["GrpINDFOR_MMG6","ColorOrange"], - ["GrpINDFOR_MMG7","ColorOrange"], - ["GrpINDFOR_MMG8","ColorOrange"], - - ["GrpINDFOR_MAT1","ColorOrange"], - ["GrpINDFOR_MAT2","ColorOrange"], - ["GrpINDFOR_MAT3","ColorOrange"], - ["GrpINDFOR_MAT4","ColorOrange"], - ["GrpINDFOR_MAT5","ColorOrange"], - ["GrpINDFOR_MAT6","ColorOrange"], - ["GrpINDFOR_MAT7","ColorOrange"], - ["GrpINDFOR_MAT8","ColorOrange"], - - ["GrpINDFOR_G1","ColorPink"], - ["GrpINDFOR_G2","ColorPink"], - ["GrpINDFOR_G3","ColorPink"], - ["GrpINDFOR_G4","ColorPink"], - ["GrpINDFOR_G5","ColorPink"], - ["GrpINDFOR_G6","ColorPink"], - ["GrpINDFOR_G7","ColorPink"], - ["GrpINDFOR_G8","ColorPink"], - - ["GrpINDFOR_PH1","ColorRed"], - ["GrpINDFOR_PH2","ColorRed"], - ["GrpINDFOR_PH3","ColorRed"], - ["GrpINDFOR_PH4","ColorRed"], - ["GrpINDFOR_PH5","ColorRed"], - ["GrpINDFOR_PH6","ColorRed"], - ["GrpINDFOR_PH7","ColorRed"], - ["GrpINDFOR_PH8","ColorRed"] + ["GrpINDFOR_CO_CC","CO","ColorOrange"], + ["GrpINDFOR_1PLT_CO","1PLT","ColorYellow"], + ["GrpINDFOR_2PLT_CO","2PLT","ColorYellow"], + + ["GrpINDFOR_ASL","ASL","ColorRed"], + ["GrpINDFOR_A1","A1","ColorRed"], + ["GrpINDFOR_A2","A2","ColorRed"], + ["GrpINDFOR_A3","A3","ColorRed"], + + ["GrpINDFOR_BSL","BSL","ColorBlue"], + ["GrpINDFOR_B1","B1","ColorBlue"], + ["GrpINDFOR_B2","B2","ColorBlue"], + ["GrpINDFOR_B3","B3","ColorBlue"], + + ["GrpINDFOR_CSL","CSL","ColorGreen"], + ["GrpINDFOR_C1","C1","ColorGreen"], + ["GrpINDFOR_C2","C2","ColorGreen"], + ["GrpINDFOR_C3","C3","ColorGreen"], + + ["GrpINDFOR_DSL","DSL","ColorRed"], + ["GrpINDFOR_D1","D1","ColorRed"], + ["GrpINDFOR_D2","D2","ColorRed"], + ["GrpINDFOR_D3","D3","ColorRed"], + + ["GrpINDFOR_ESL","ESL","ColorBlue"], + ["GrpINDFOR_E1","E1","ColorBlue"], + ["GrpINDFOR_E2","E2","ColorBlue"], + ["GrpINDFOR_E3","E3","ColorBlue"], + + ["GrpINDFOR_FSL","FSL","ColorGreen"], + ["GrpINDFOR_F1","F1","ColorGreen"], + ["GrpINDFOR_F2","F2","ColorGreen"], + ["GrpINDFOR_F3","F3","ColorGreen"], + + ["GrpINDFOR_MMG1","MMG1","ColorOrange"], + ["GrpINDFOR_MMG2","MMG2","ColorOrange"], + ["GrpINDFOR_MMG3","MMG3","ColorOrange"], + ["GrpINDFOR_MMG4","MMG4","ColorOrange"], + ["GrpINDFOR_MMG5","MMG5","ColorOrange"], + ["GrpINDFOR_MMG6","MMG6","ColorOrange"], + ["GrpINDFOR_MMG7","MMG7","ColorOrange"], + ["GrpINDFOR_MMG8","MMG8","ColorOrange"], + + ["GrpINDFOR_MAT1","MAT1","ColorOrange"], + ["GrpINDFOR_MAT2","MAT2","ColorOrange"], + ["GrpINDFOR_MAT3","MAT3","ColorOrange"], + ["GrpINDFOR_MAT4","MAT4","ColorOrange"], + ["GrpINDFOR_MAT5","MAT5","ColorOrange"], + ["GrpINDFOR_MAT6","MAT6","ColorOrange"], + ["GrpINDFOR_MAT7","MAT7","ColorOrange"], + ["GrpINDFOR_MAT8","MAT8","ColorOrange"], + + ["GrpINDFOR_G1","G1","ColorPink"], + ["GrpINDFOR_G2","G2","ColorPink"], + ["GrpINDFOR_G3","G3","ColorPink"], + ["GrpINDFOR_G4","G4","ColorPink"], + ["GrpINDFOR_G5","G5","ColorPink"], + ["GrpINDFOR_G6","G6","ColorPink"], + ["GrpINDFOR_G7","G7","ColorPink"], + ["GrpINDFOR_G8","G8","ColorPink"], + + ["GrpINDFOR_PH1","PH1","ColorRed"], + ["GrpINDFOR_PH2","PH2","ColorRed"], + ["GrpINDFOR_PH3","PH3","ColorRed"], + ["GrpINDFOR_PH4","PH4","ColorRed"], + ["GrpINDFOR_PH5","PH5","ColorRed"], + ["GrpINDFOR_PH6","PH6","ColorRed"], + ["GrpINDFOR_PH7","PH7","ColorRed"], + ["GrpINDFOR_PH8","PH8","ColorRed"] ]; \ No newline at end of file diff --git a/ARCMF.VR/f/setGroupID/fn_setGroupID.sqf b/ARCMF.VR/f/setGroupID/fn_setGroupID.sqf index 8ebdd62..1568342 100644 --- a/ARCMF.VR/f/setGroupID/fn_setGroupID.sqf +++ b/ARCMF.VR/f/setGroupID/fn_setGroupID.sqf @@ -1,6 +1,7 @@ -params ["_grpID", "_color"]; +params ["_grpID", "_name", "_color"]; if (!isNil _grpID) then { private _grp = call compile format ["%1", _grpID]; + _grp setGroupId [_name, "GroupColor0"]; _grp setVariable ["ARC_groupColour", _color, true]; -}; \ No newline at end of file +}; From f37e9447c89f3a51343a8b851b1b41f7270b2588 Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Fri, 10 Jun 2016 01:05:43 +0100 Subject: [PATCH 19/20] Add Kerama map --- ARCMF.VR/f/arc/sandbox.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ARCMF.VR/f/arc/sandbox.hpp b/ARCMF.VR/f/arc/sandbox.hpp index c3a258a..30b1d4b 100644 --- a/ARCMF.VR/f/arc/sandbox.hpp +++ b/ARCMF.VR/f/arc/sandbox.hpp @@ -103,4 +103,8 @@ class CfgSandbox { startingPosition[] = {1686.72,102.895,0}; camouflage = "woodland"; }; + class kerama { + startingPosition[] = {13242.7,17007.3,0}; + camouflage = "mtp"; + }; }; \ No newline at end of file From 6256e4b5e4b91b6c769657417e278eb334e2242c Mon Sep 17 00:00:00 2001 From: James Kingsley Date: Fri, 10 Jun 2016 01:06:07 +0100 Subject: [PATCH 20/20] Add Kerama to build script --- tools/build_sandbox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build_sandbox.py b/tools/build_sandbox.py index bbb6fcb..fd8b769 100644 --- a/tools/build_sandbox.py +++ b/tools/build_sandbox.py @@ -56,7 +56,7 @@ def copy_folder(src, dst): os.remove(new_ext); os.remove(new_sqm); -for t in ["VR","utes","Sara","fallujah","Chernarus","Chernarus_Summer","Takistan","Zargabad","Desert_E","ProvingGrounds_PMC","Shapur_BAF","mbg_celle2","Stratis","bozcaada","Kunduz","Altis","vt5","mske","torabora","FDF_Isle1_a","Woodland_ACR","Bootcamp_ACR"]: +for t in ["VR","utes","Sara","fallujah","Chernarus","Chernarus_Summer","Takistan","Zargabad","Desert_E","ProvingGrounds_PMC","Shapur_BAF","mbg_celle2","Stratis","bozcaada","Kunduz","Altis","vt5","mske","torabora","FDF_Isle1_a","Woodland_ACR","Bootcamp_ACR","kerama"]: try: subprocess.check_output([ "makepbo",