mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into agmScopesPort
This commit is contained in:
commit
632a3f5e0a
@ -1,62 +0,0 @@
|
||||
class CfgPatches {
|
||||
class AGM_Backpacks {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = 0.60;
|
||||
requiredAddons[] = {AGM_Core, AGM_Interaction};
|
||||
version = "0.95";
|
||||
versionStr = "0.95";
|
||||
versionAr[] = {0,95,0};
|
||||
author[] = {"bux", "commy2"};
|
||||
authorUrl = "https://github.com/commy2/";
|
||||
};
|
||||
};
|
||||
|
||||
class CfgFunctions {
|
||||
class AGM_Backpacks {
|
||||
class AGM_Backpacks {
|
||||
file = "\AGM_Backpacks\functions";
|
||||
class getBackpackAssignedUnit;
|
||||
class isBackpack;
|
||||
class openInventory;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_InventoryOpened_EventHandlers {
|
||||
class CAManBase {
|
||||
class AGM_Backpacks_openInventory {
|
||||
clientInventoryOpened = "if (_this select 0 == AGM_player) then {_this call AGM_Backpacks_fnc_openInventory};";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class AGM_SelfActions {
|
||||
class AGM_Equipment {
|
||||
class AGM_LockBackpack {
|
||||
displayName = "$STR_AGM_Backpacks_LockBackpack";
|
||||
condition = "[backpackContainer _player] call AGM_Backpacks_fnc_isBackpack && {!((backpackContainer _player) getVariable ['AGM_LockedInventory', false])}";
|
||||
statement = "(backpackContainer _player) setVariable ['AGM_LockedInventory', true, true]";
|
||||
showDisabled = 0;
|
||||
priority = 2.5;
|
||||
icon = ""; // @todo
|
||||
hotkey = "L";
|
||||
enableInside = 1;
|
||||
};
|
||||
class AGM_UnlockBackpack {
|
||||
displayName = "$STR_AGM_Backpacks_UnlockBackpack";
|
||||
condition = "[backpackContainer _player] call AGM_Backpacks_fnc_isBackpack && {(backpackContainer _player) getVariable ['AGM_LockedInventory', false]}";
|
||||
statement = "(backpackContainer _player) setVariable ['AGM_LockedInventory', false, true]";
|
||||
showDisabled = 0;
|
||||
priority = 2.5;
|
||||
icon = ""; // @todo
|
||||
hotkey = "L";
|
||||
enableInside = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Author: bux, commy2
|
||||
*
|
||||
* Handle the open inventory event. Don't open the inventory if it's locked and display message.
|
||||
*
|
||||
* Argument:
|
||||
* Input from "InventoryOpened" eventhandler
|
||||
*
|
||||
* Return value:
|
||||
* Don't open the inventory dialog? (Bool)
|
||||
*/
|
||||
|
||||
private ["_target", "_isBackpack", "_isLocked", "_return"];
|
||||
|
||||
_target = _this select 1;
|
||||
|
||||
_isBackpack = [_target] call AGM_Backpacks_fnc_isBackpack;
|
||||
_isLocked = _target getVariable ["AGM_LockedInventory", false];
|
||||
|
||||
_return = false;
|
||||
if (_isBackpack) then {
|
||||
// target is a backpack
|
||||
private "_unit";
|
||||
_unit = [_target] call AGM_Backpacks_fnc_getBackpackAssignedUnit;
|
||||
|
||||
if (!alive _unit || {_unit getVariable ["AGM_isUnconscious", false]}) exitWith {};
|
||||
|
||||
if (_isLocked) then {
|
||||
// target is a locked backpack
|
||||
[format [localize "STR_AGM_Backpacks_BackpackLocked", [_unit] call AGM_Core_fnc_getName]] call AGM_Core_fnc_displayTextStructured;
|
||||
_return = true;
|
||||
} else {
|
||||
// target is a not-locked backpack
|
||||
if (_unit getVariable ["AGM_LockedInventory", false]) then {
|
||||
[localize "STR_AGM_Backpacks_InventoryLocked"] call AGM_Core_fnc_displayTextStructured;
|
||||
_return = true;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
// target is not a backpack
|
||||
if (_isLocked) then {
|
||||
[localize "STR_AGM_Backpacks_InventoryLocked"] call AGM_Core_fnc_displayTextStructured;
|
||||
_return = true;
|
||||
};
|
||||
};
|
||||
_return
|
@ -1,47 +0,0 @@
|
||||
|
||||
class CfgPatches {
|
||||
class AGM_Difficulties {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = 0.60;
|
||||
requiredAddons[] = {AGM_Core};
|
||||
version = "0.95";
|
||||
versionStr = "0.95";
|
||||
versionAr[] = {0,95,0};
|
||||
author[] = {"commy2"};
|
||||
authorUrl = "https://github.com/commy2/";
|
||||
};
|
||||
};
|
||||
|
||||
class CfgDifficulties {
|
||||
class Mercenary {
|
||||
class Flags {
|
||||
armor[] = {0,0};
|
||||
friendlyTag[] = {0,0};
|
||||
enemyTag[] = {0,0};
|
||||
mineTag[] = {0,0};
|
||||
hud[] = {0,1};//{1,1};
|
||||
hudPerm[] = {0,0};
|
||||
hudWp[] = {0,0};
|
||||
hudWpPerm[] = {0,0};
|
||||
autoSpot[] = {0,1};
|
||||
map[] = {0,0};
|
||||
weaponCursor[] = {0,1};//{1,1};
|
||||
autoGuideAT[] = {0,0};
|
||||
clockIndicator[] = {0,0};
|
||||
3rdPersonView[] = {0,0};
|
||||
autoAim[] = {0,0};
|
||||
unlimitedSaves[] = {0,0};
|
||||
deathMessages[] = {0,1};//{1,1};
|
||||
netStats[] = {0,1};//{1,1};
|
||||
vonID[] = {0,1};
|
||||
cameraShake[] = {1,0};
|
||||
hudGroupInfo[] = {0,0};
|
||||
extendetInfoType[] = {0,0};
|
||||
roughLanding[] = {0,0};
|
||||
windEnabled[] = {1,0};
|
||||
autoTrimEnabled[] = {0,0};
|
||||
stressDamageEnabled[] = {1,0};
|
||||
};
|
||||
};
|
||||
};
|
@ -1,87 +0,0 @@
|
||||
class controls {
|
||||
class ButtonPlayer: RscActiveText {
|
||||
text = "";
|
||||
w = 0;
|
||||
h = 0;
|
||||
sizeEx = 0;
|
||||
onButtonClick = "";
|
||||
};
|
||||
class CA_PlayerName: RscText {
|
||||
x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfilePicture: RscPicture {
|
||||
x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfileBackground: RscText {
|
||||
x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class Separator1: RscPicture {
|
||||
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ColorBlack: RscButton {
|
||||
idc = 36732;
|
||||
x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.2,0.2,1};
|
||||
colorBackgroundActive[] = {0,0,0,1};
|
||||
colorFocused[] = {0,0,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""AGM_Map_drawColor"", ""ColorBlack""]";
|
||||
};
|
||||
class ColorRed: RscButton {
|
||||
idc = 36733;
|
||||
x = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.2,0.2,1};
|
||||
colorBackgroundActive[] = {1,0,0,1};
|
||||
colorFocused[] = {1,0,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""AGM_Map_drawColor"", ""ColorRed""]";
|
||||
};
|
||||
class ColorGreen: RscButton {
|
||||
idc = 36734;
|
||||
x = "0.6 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.8,0.2,1};
|
||||
colorBackgroundActive[] = {0,1,0,1};
|
||||
colorFocused[] = {0,1,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""AGM_Map_drawColor"", ""ColorGreen""]";
|
||||
};
|
||||
class ColorBlue: RscButton {
|
||||
idc = 36735;
|
||||
x = "0.9 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.2,0.8,1};
|
||||
colorBackgroundActive[] = {0,0,1,1};
|
||||
colorFocused[] = {0,0,1,1};
|
||||
onButtonClick = "missionNamespace setVariable [""AGM_Map_drawColor"", ""ColorBlue""]";
|
||||
};
|
||||
class ColorYellow: RscButton {
|
||||
idc = 36736;
|
||||
x = "1.2 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.8,0.2,1};
|
||||
colorBackgroundActive[] = {1,1,0,1};
|
||||
colorFocused[] = {1,1,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""AGM_Map_drawColor"", ""ColorYellow""]";
|
||||
};
|
||||
class ColorWhite: RscButton {
|
||||
idc = 36737;
|
||||
x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.8,0.8,1};
|
||||
colorBackgroundActive[] = {1,1,1,1};
|
||||
colorFocused[] = {1,1,1,1};
|
||||
onButtonClick = "missionNamespace setVariable [""AGM_Map_drawColor"", ""ColorWhite""]";
|
||||
};
|
||||
};
|
@ -1,154 +0,0 @@
|
||||
// by CAA-Picard
|
||||
|
||||
if (!hasInterface) exitWith{};
|
||||
|
||||
[] spawn {
|
||||
while {true} do {
|
||||
sleep 5;
|
||||
_markers = [];
|
||||
|
||||
while {AGM_Map_BFT_Enabled and {(!isNil "AGM_player") and {alive AGM_player}}} do {
|
||||
|
||||
_groups = [];
|
||||
_playerSide = call AGM_Core_fnc_playerSide;
|
||||
|
||||
if (AGM_Map_BFT_HideAiGroups) then {
|
||||
_groups = [allGroups, {side _this == _playerSide}] call AGM_Core_fnc_filter;
|
||||
} else {
|
||||
_groups = [allGroups, {
|
||||
_anyPlayers = {
|
||||
[_x] call AGM_Core_fnc_isPlayer
|
||||
} count units _this;
|
||||
(side _this == _playerSide) && _anyPlayers > 0
|
||||
}] call AGM_Core_fnc_filter;
|
||||
};
|
||||
|
||||
{
|
||||
deleteMarkerLocal _x;
|
||||
} forEach _markers;
|
||||
_markers = [];
|
||||
|
||||
for "_i" from 0 to (count _groups - 1) do {
|
||||
_group1 = _groups select _i;
|
||||
|
||||
_markerType = [_group1] call AGM_Core_fnc_getMarkerType;
|
||||
|
||||
_colour = format ["Color%1", side _group1];
|
||||
|
||||
_marker = createMarkerLocal [format ["AGM_BFT_%1", _i], [(getPos leader _group1) select 0, (getPos leader _group1) select 1]];
|
||||
_marker setMarkerTypeLocal _markerType;
|
||||
_marker setMarkerColorLocal _colour;
|
||||
_marker setMarkerTextLocal (groupID _group1);
|
||||
|
||||
_markers pushBack _marker;
|
||||
};
|
||||
|
||||
sleep AGM_Map_BFT_Interval;
|
||||
};
|
||||
|
||||
// Delete markers as soon as the player dies
|
||||
{
|
||||
deleteMarkerLocal _x;
|
||||
} forEach _markers;
|
||||
};
|
||||
};
|
||||
|
||||
[] spawn {
|
||||
// Init variables
|
||||
AGM_Map_mapToolsShown = 0;
|
||||
AGM_Map_pos = [0,0];
|
||||
AGM_Map_angle = 0;
|
||||
AGM_Map_dragging = false;
|
||||
AGM_Map_rotating = false;
|
||||
AGM_Map_mapGpsShow = true;
|
||||
AGM_Map_drawing = false;
|
||||
AGM_Map_tempLineMarker = [];
|
||||
AGM_Map_lineMarkers = [];
|
||||
|
||||
AGM_Map_drawColor = "ColorBlack";
|
||||
AGM_Map_drawingControls = [36732, 36733, 36734, 36735, 36736, 36737];
|
||||
|
||||
AGM_Map_fnc_installEvents = {
|
||||
_d = _this;
|
||||
diag_log format ["Installing EH in display %1", _d];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseMoving", {_this call AGM_Map_fnc_handleMouseMove;}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonDown", {[1, _this] call AGM_Map_fnc_handleMouseButton;}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonUp", {[0, _this] call AGM_Map_fnc_handleMouseButton}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["Draw", {[] call AGM_Map_fnc_updateMapToolMarkers;}];
|
||||
(finddisplay _d) displayAddEventHandler ["KeyDown", {_this call AGM_Map_fnc_handleKeyDown;}];
|
||||
};
|
||||
|
||||
// Wait until the briefing map is detected
|
||||
// display = 37 for SP
|
||||
// display = 52 for host server on MP;
|
||||
// display = 53 for MP clients)
|
||||
waitUntil {(!isNull findDisplay 37) || (!isNull findDisplay 52) || (!isNull findDisplay 53) || (!isNull findDisplay 12)};
|
||||
|
||||
if (isNull findDisplay 12) then {
|
||||
// Install event handlers on the map control of the briefing screen (control = 51)
|
||||
AGM_Map_syncMarkers = true;
|
||||
if (!isNull findDisplay 52) then {
|
||||
52 call AGM_Map_fnc_installEvents;
|
||||
} else {
|
||||
if (!isNull findDisplay 53) then {
|
||||
53 call AGM_Map_fnc_installEvents;
|
||||
} else {
|
||||
37 call AGM_Map_fnc_installEvents;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
// Briefing screen was skipped; the player is JIP, create the markers defined during the briefing
|
||||
AGM_Map_syncMarkers = false;
|
||||
{
|
||||
_x call AGM_Map_fnc_addLineMarker;
|
||||
} forEach AGM_Map_serverLineMarkers;
|
||||
};
|
||||
|
||||
// Wait until the main map display is detected (display = 12)
|
||||
waitUntil { !isNull findDisplay 12 };
|
||||
// Install event handlers on the map control and display (control = 51)
|
||||
AGM_Map_syncMarkers = false;
|
||||
12 call AGM_Map_fnc_installEvents;
|
||||
|
||||
// Update the size and rotation of map tools
|
||||
[] call AGM_Map_fnc_updateMapToolMarkers;
|
||||
|
||||
while {true} do {
|
||||
waitUntil {visibleMap};
|
||||
|
||||
// Show and update map tools if required
|
||||
[] call AGM_Map_fnc_updateMapToolMarkers;
|
||||
// Show GPS if required
|
||||
[AGM_Map_mapGpsShow] call AGM_Map_fnc_openMapGps;
|
||||
|
||||
// Update visibility of maptools and gps, handling inventory changes
|
||||
[] spawn {
|
||||
while {visibleMap} do {
|
||||
// Show/Hide draw buttons
|
||||
if ("AGM_MapTools" in items player) then {
|
||||
{ ((finddisplay 12) displayctrl _x) ctrlShow true; } forEach AGM_Map_drawingControls;
|
||||
} else {
|
||||
{ ((finddisplay 12) displayctrl _x) ctrlShow false; } forEach AGM_Map_drawingControls;
|
||||
if (AGM_Map_drawing) then {
|
||||
call AGM_Map_fnc_cancelDrawing;
|
||||
};
|
||||
};
|
||||
sleep 1;
|
||||
};
|
||||
};
|
||||
|
||||
waitUntil {!visibleMap};
|
||||
|
||||
// Hide GPS
|
||||
[false] call AGM_Map_fnc_openMapGps;
|
||||
// Hide Map tools
|
||||
deleteMarkerLocal "AGM_MapToolFixed";
|
||||
deleteMarkerLocal "AGM_MapToolRotatingNormal";
|
||||
deleteMarkerLocal "AGM_MapToolRotatingSmall";
|
||||
AGM_Map_mapToolFixed = nil;
|
||||
AGM_Map_mapToolRotatingNormal = nil;
|
||||
AGM_Map_mapToolRotatingSmall = nil;
|
||||
// Cancel drawing
|
||||
call AGM_Map_fnc_cancelDrawing;
|
||||
};
|
||||
};
|
@ -1,423 +0,0 @@
|
||||
class CfgPatches {
|
||||
class AGM_Map {
|
||||
units[] = {};
|
||||
weapons[] = {"AGM_MapTools"};
|
||||
requiredVersion = 0.60;
|
||||
requiredAddons[] = {AGM_Core, AGM_Interaction};
|
||||
version = "0.95";
|
||||
versionStr = "0.95";
|
||||
versionAr[] = {0,95,0};
|
||||
author[] = {"KoffeinFlummi","CAA-Picard"};
|
||||
authorUrl = "https://github.com/KoffeinFlummi/";
|
||||
};
|
||||
};
|
||||
|
||||
class CfgFunctions {
|
||||
class AGM_Map {
|
||||
class AGM_Map {
|
||||
file = "AGM_Map\functions";
|
||||
class addLineMarker;
|
||||
class blueForceTracking;
|
||||
class calculateMapScale;
|
||||
class cancelDrawing;
|
||||
class canDraw;
|
||||
class canUseMapTools;
|
||||
class canUseMapGPS;
|
||||
class copyMapMarkers;
|
||||
class handleKeyDown;
|
||||
class handleMouseButton;
|
||||
class handleMouseMove;
|
||||
class handleMouseZChanged;
|
||||
class isInsideMapTool;
|
||||
class openMapGps;
|
||||
class removeLineMarker;
|
||||
class sendMapMarkers;
|
||||
class updateMapToolMarkers;
|
||||
class updateLineMarker;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class AGM_Map {
|
||||
serverInit = "call compile preprocessFileLineNumbers '\AGM_Map\serverInit.sqf'";
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class AGM_Map {
|
||||
clientInit = "call compile preprocessFileLineNumbers 'AGM_Map\clientInit.sqf'";
|
||||
};
|
||||
};
|
||||
|
||||
class CfgWeapons {
|
||||
class AGM_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
|
||||
class AGM_MapTools: AGM_ItemCore {
|
||||
displayName = "$STR_AGM_MapTools_Name";
|
||||
descriptionShort = "$STR_AGM_MapTools_Description";
|
||||
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||
picture = "\AGM_Map\UI\maptool_item.paa";
|
||||
scope = 2;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class AGM_SelfActions {
|
||||
|
||||
class AGM_MapTools {
|
||||
displayName = "$STR_AGM_Map_MapTools_Menu";
|
||||
condition = "(call AGM_Map_fnc_canUseMapTools) || (call AGM_Map_fnc_canUseMapGPS)";
|
||||
statement = "";
|
||||
exceptions[] = {"AGM_Drag_isNotDragging", "AGM_Core_notOnMap"};
|
||||
showDisabled = 0;
|
||||
priority = 100;
|
||||
subMenu[] = {"AGM_MapTools", 1};
|
||||
enableInside = 1;
|
||||
|
||||
class AGM_MapToolsHide {
|
||||
displayName = "$STR_AGM_Map_MapToolsHide";
|
||||
condition = "(call AGM_Map_fnc_canUseMapTools) && {AGM_Map_mapToolsShown > 0}";
|
||||
statement = "AGM_Map_mapToolsShown = 0; [] call AGM_Map_fnc_updateMapToolMarkers";
|
||||
exceptions[] = {"AGM_Drag_isNotDragging", "AGM_Core_notOnMap"};
|
||||
showDisabled = 1;
|
||||
priority = 5;
|
||||
enableInside = 1;
|
||||
};
|
||||
class AGM_MapToolsShowNormal {
|
||||
displayName = "$STR_AGM_Map_MapToolsShowNormal";
|
||||
condition = "(call AGM_Map_fnc_canUseMapTools) && {AGM_Map_mapToolsShown != 1}";
|
||||
statement = "AGM_Map_mapToolsShown = 1; [] call AGM_Map_fnc_updateMapToolMarkers";
|
||||
exceptions[] = {"AGM_Drag_isNotDragging", "AGM_Core_notOnMap"};
|
||||
showDisabled = 1;
|
||||
priority = 4;
|
||||
enableInside = 1;
|
||||
};
|
||||
class AGM_MapToolsShowSmall {
|
||||
displayName = "$STR_AGM_Map_MapToolsShowSmall";
|
||||
condition = "(call AGM_Map_fnc_canUseMapTools) && {AGM_Map_mapToolsShown != 2}";
|
||||
statement = "AGM_Map_mapToolsShown = 2; [] call AGM_Map_fnc_updateMapToolMarkers";
|
||||
exceptions[] = {"AGM_Drag_isNotDragging", "AGM_Core_notOnMap"};
|
||||
showDisabled = 1;
|
||||
priority = 3;
|
||||
enableInside = 1;
|
||||
};
|
||||
class AGM_MapToolsAlignNorth {
|
||||
displayName = "$STR_AGM_Map_MapToolsAlignNorth";
|
||||
condition = "(call AGM_Map_fnc_canUseMapTools) && {AGM_Map_mapToolsShown != 0}";
|
||||
statement = "AGM_Map_angle = 0; [] call AGM_Map_fnc_updateMapToolMarkers";
|
||||
exceptions[] = {"AGM_Drag_isNotDragging", "AGM_Core_notOnMap"};
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
enableInside = 1;
|
||||
};
|
||||
class AGM_MapToolsAlignCompass {
|
||||
displayName = "$STR_AGM_Map_MapToolsAlignCompass";
|
||||
condition = "(call AGM_Map_fnc_canUseMapTools) && {AGM_Map_mapToolsShown != 0} && {(""ItemCompass"" in assignedItems player) || {""ItemGPS"" in assignedItems player}}";
|
||||
statement = "AGM_Map_angle = getDir player; [] call AGM_Map_fnc_updateMapToolMarkers";
|
||||
exceptions[] = {"AGM_Drag_isNotDragging", "AGM_Core_notOnMap"};
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
enableInside = 1;
|
||||
};
|
||||
class AGM_MapGpsShow {
|
||||
displayName = "$STR_AGM_Map_MapGpsShow";
|
||||
condition = "(call AGM_Map_fnc_canUseMapGPS) && {!AGM_Map_mapGpsShow}";
|
||||
statement = "AGM_Map_mapGpsShow = true; [AGM_Map_mapGpsShow] call AGM_Map_fnc_openMapGps";
|
||||
exceptions[] = {"AGM_Drag_isNotDragging", "AGM_Core_notOnMap"};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
enableInside = 1;
|
||||
};
|
||||
class AGM_MapGpsHide {
|
||||
displayName = "$STR_AGM_Map_MapGpsHide";
|
||||
condition = "(call AGM_Map_fnc_canUseMapGPS) && AGM_Map_mapGpsShow";
|
||||
statement = "AGM_Map_mapGpsShow = false; [AGM_Map_mapGpsShow] call AGM_Map_fnc_openMapGps";
|
||||
exceptions[] = {"AGM_Drag_isNotDragging", "AGM_Core_notOnMap"};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
enableInside = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class AGM_Actions {
|
||||
class AGM_CopyMap {
|
||||
displayName = "$STR_AGM_Map_CopyMap";
|
||||
condition = "isPlayer AGM_Interaction_Target && {""ItemMap"" in assignedItems player} && {""AGM_MapTools"" in items player} && {""ItemMap"" in assignedItems AGM_Interaction_Target}";
|
||||
statement = "[player, ""AGM_Map_fnc_sendMapMarkers"", AGM_Interaction_Target] call AGM_Core_fnc_execRemoteFnc";
|
||||
showDisabled = 0;
|
||||
priority = -1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class NATO_Box_Base;
|
||||
class EAST_Box_Base;
|
||||
class IND_Box_Base;
|
||||
class FIA_Box_Base_F;
|
||||
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(AGM_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Box_East_Support_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(AGM_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(AGM_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Box_FIA_Support_F: FIA_Box_Base_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(AGM_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class AGM_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(AGM_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Module_F;
|
||||
class AGM_ModuleBlueForceTracking: Module_F {
|
||||
author = "AGM Team";
|
||||
category = "AGM";
|
||||
displayName = "Blue Force Tracking";
|
||||
function = "AGM_Map_fnc_blueForceTracking";
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = "\AGM_Map\UI\IconBFTracking_ca.paa";
|
||||
class Arguments {
|
||||
class Interval {
|
||||
displayName = "Interval";
|
||||
description = "How often the markers should be refreshed (in seconds)";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class HideAiGroups {
|
||||
displayName = "Hide AI groups?";
|
||||
description = "Hide markers for 'AI only' groups?";
|
||||
typeName = "BOOL";
|
||||
class values {
|
||||
class Yes { name = "Yes"; value = 1; };
|
||||
class No { name = "No"; value = 0; default = 1; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class RscControlsGroup;
|
||||
class RscActiveText;
|
||||
class RscPicture;
|
||||
class RscText;
|
||||
class RscObject;
|
||||
class RscButton;
|
||||
class RscButtonMenuOK;
|
||||
class RscButtonMenuCancel;
|
||||
class RscButtonMenu;
|
||||
class RscEdit;
|
||||
|
||||
class RscMapControl {
|
||||
sizeExGrid = 0.032;
|
||||
};
|
||||
|
||||
// REGULAR MAP
|
||||
class RscDisplayMainMap {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// DIARY
|
||||
class RscDisplayDiary {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
class controls {
|
||||
class ButtonPlayer: RscActiveText {
|
||||
text = "";
|
||||
w = 0;
|
||||
h = 0;
|
||||
sizeEx = 0;
|
||||
onButtonClick = "";
|
||||
};
|
||||
class CA_PlayerName: RscText {
|
||||
x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfilePicture: RscPicture {
|
||||
x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfileBackground: RscText {
|
||||
x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class Separator1: RscPicture {
|
||||
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// BRIEFING SCREEN
|
||||
class RscDisplayGetReady: RscDisplayMainMap {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
class RscDisplayClientGetReady: RscDisplayGetReady {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
class RscDisplayServerGetReady: RscDisplayGetReady {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// MARKERS
|
||||
class CfgMarkers {
|
||||
class Flag;
|
||||
|
||||
// Reenable NATO symbols ...
|
||||
class b_unknown: Flag {scope = 2;};
|
||||
|
||||
// ... and disable all the useless ones
|
||||
// If you think that some of these are needed, create an issue; But until
|
||||
// there's a better way to place markers, there should be only the most
|
||||
// important markers here.
|
||||
// Keep in mind that all of these can still be placed in the editor.
|
||||
class b_hq: b_unknown {scope = 1;};
|
||||
class b_installation: b_unknown {scope = 1;};
|
||||
class b_maint: b_unknown {scope = 1;};
|
||||
class b_med: b_unknown {scope = 1;};
|
||||
class b_service: b_unknown {scope = 1;};
|
||||
class b_support: b_unknown {scope = 1;};
|
||||
|
||||
class n_unknown: b_unknown {};
|
||||
class n_hq: n_unknown {scope = 1;};
|
||||
class n_installation: n_unknown {scope = 1;};
|
||||
class u_installation: n_unknown {scope = 1;}; // i have no idea...
|
||||
class n_maint: n_unknown {scope = 1;};
|
||||
class n_med: n_unknown {scope = 1;};
|
||||
class n_service: n_unknown {scope = 1;};
|
||||
class n_support: n_unknown {scope = 1;};
|
||||
|
||||
class o_unknown: b_unknown {};
|
||||
class o_hq: o_unknown {scope = 1;};
|
||||
class o_installation: o_unknown {scope = 1;};
|
||||
class o_maint: o_unknown {scope = 1;};
|
||||
class o_med: o_unknown {scope = 1;};
|
||||
class o_service: o_unknown {scope = 1;};
|
||||
class o_support: o_unknown {scope = 1;};
|
||||
|
||||
// disable all civy markers (harbor etc.)
|
||||
class c_unknown: b_unknown {scope = 1;};
|
||||
|
||||
// disable quantity indicators (fire team/squad/platoon ...)
|
||||
class group_0: b_unknown {scope = 1;};
|
||||
|
||||
|
||||
class AGM_MapToolFixed {
|
||||
name = "MapToolFixed";
|
||||
icon = "\AGM_Map\data\mapToolFixed.paa";
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
|
||||
class AGM_MapToolRotatingNormal {
|
||||
name = "MapToolRotating";
|
||||
icon = "\AGM_Map\data\mapToolRotatingNormal.paa";
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
|
||||
class AGM_MapToolRotatingSmall {
|
||||
name = "MapToolRotating";
|
||||
icon = "\AGM_Map\data\mapToolRotatingSmall.paa";
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
};
|
||||
|
||||
class AGM_Parameters_Numeric {
|
||||
AGM_Map_BFT_Interval = 1;
|
||||
};
|
||||
class AGM_Parameters_Boolean {
|
||||
AGM_Map_EveryoneCanDrawOnBriefing = 1;
|
||||
AGM_Map_BFT_Enabled = 0;
|
||||
AGM_Map_BFT_HideAiGroups = 0;
|
||||
};
|
||||
|
||||
#include "MapGpsUI.hpp"
|
@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Author: KoffeinFlummi
|
||||
*
|
||||
* Initializes the blue force tracking module.
|
||||
*
|
||||
* Arguments:
|
||||
* Whatever the module provides. (I dunno.)
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*/
|
||||
|
||||
if !(hasInterface) exitWith {};
|
||||
|
||||
_logic = _this select 0;
|
||||
_units = _this select 1;
|
||||
_activated = _this select 2;
|
||||
|
||||
if !(_activated) exitWith {};
|
||||
|
||||
_logic spawn {
|
||||
waitUntil {alive player};
|
||||
|
||||
AGM_Map_BFT_Enabled = true;
|
||||
[_this, "AGM_Map_BFT_Interval", "Interval"] call AGM_Core_fnc_readNumericParameterFromModule;
|
||||
[_this, "AGM_Map_BFT_HideAiGroups", "HideAiGroups"] call AGM_Core_fnc_readBooleanParameterFromModule;
|
||||
|
||||
diag_log text "[AGM]: Blue Force Tracking Module initialized.";
|
||||
};
|
@ -1,4 +0,0 @@
|
||||
// by CAA-Picard
|
||||
|
||||
(missionNameSpace getVariable ["AGM_Map_syncMarkers", true] && {AGM_Map_EveryoneCanDrawOnBriefing}) ||
|
||||
{(!isNull player) && {"AGM_MapTools" in items player}}
|
@ -1,5 +0,0 @@
|
||||
// by CAA-Picard
|
||||
|
||||
visibleMap &&
|
||||
{alive player} &&
|
||||
{"ItemGPS" in assignedItems player}
|
@ -1,8 +0,0 @@
|
||||
// by CAA-Picard
|
||||
|
||||
visibleMap &&
|
||||
{alive player} &&
|
||||
{"ItemMap" in assignedItems player} &&
|
||||
{"AGM_MapTools" in items player} &&
|
||||
{!AGM_Map_dragging} &&
|
||||
{!AGM_Map_rotating}
|
@ -1,17 +0,0 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Cancel the drawing of the current line marker
|
||||
*
|
||||
* Argument:
|
||||
* None
|
||||
*
|
||||
* Return value:
|
||||
* Nothing
|
||||
*/
|
||||
|
||||
AGM_Map_drawing = false;
|
||||
if (count AGM_Map_tempLineMarker > 0) then {
|
||||
deleteMarkerLocal (AGM_Map_tempLineMarker select 0);
|
||||
};
|
||||
AGM_Map_tempLineMarker = [];
|
@ -1,21 +0,0 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Copy markers to mapd
|
||||
*
|
||||
* Argument:
|
||||
* 0: Array of markers to copy (Array)
|
||||
*
|
||||
* Return value:
|
||||
* Return
|
||||
*/
|
||||
|
||||
_lineMarkers = _this;
|
||||
|
||||
{
|
||||
_marker = _x;
|
||||
|
||||
if (({(_x select 0) == (_marker select 0)} count AGM_Map_lineMarkers) == 0) then {
|
||||
_marker call AGM_Map_fnc_addLineMarker;
|
||||
};
|
||||
} forEach _lineMarkers;
|
@ -1,98 +0,0 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Handle mouse buttons.
|
||||
*
|
||||
* Argument:
|
||||
* 0: 1 if mouse down down, 0 if mouse button up (Number)
|
||||
* 1: Parameters of the mouse button event
|
||||
*
|
||||
* Return value:
|
||||
* Boolean, true if event was handled
|
||||
*/
|
||||
|
||||
private ["_dir", "_params", "_control", "_button", "_screenPos", "_shiftKey", "_ctrlKey", "_handled", "_pos"];
|
||||
|
||||
_dir = _this select 0;
|
||||
_params = _this select 1;
|
||||
_control = _params select 0;
|
||||
_button = _params select 1;
|
||||
_screenPos = [_params select 2, _params select 3];
|
||||
_shiftKey = _params select 4;
|
||||
_ctrlKey = _params select 5;
|
||||
_altKey = _params select 6;
|
||||
_handled = false;
|
||||
|
||||
// If it's not a left button event, exit
|
||||
if (_button != 0) exitWith {};
|
||||
|
||||
// If releasing
|
||||
if (_dir != 1 && (AGM_Map_dragging or AGM_Map_rotating)) exitWith {
|
||||
AGM_Map_dragging = false;
|
||||
AGM_Map_rotating = false;
|
||||
_handled = true;
|
||||
_handled
|
||||
};
|
||||
|
||||
// If clicking
|
||||
if (_dir == 1) exitWith {
|
||||
|
||||
if !(call AGM_Map_fnc_canDraw) exitWith {_handled = false;};
|
||||
|
||||
// Transform mouse screen position to coordinates
|
||||
_pos = _control ctrlMapScreenToWorld _screenPos;
|
||||
_pos set [count _pos, 0];
|
||||
|
||||
if (AGM_Map_drawing) exitWith {
|
||||
// Already drawing -> Add tempLineMarker to permanent list
|
||||
if (AGM_Map_syncMarkers) then {
|
||||
deleteMarkerLocal (AGM_Map_tempLineMarker select 0);
|
||||
[AGM_Map_tempLineMarker, "AGM_Map_fnc_addLineMarker", 2] call AGM_Core_fnc_execRemoteFnc;
|
||||
// Log who drew on the briefing screen
|
||||
(text format ["[AGM] Server: Player %1 drew on the briefing screen", name player]) call AGM_Core_fnc_serverLog;
|
||||
} else {
|
||||
AGM_Map_tempLineMarker call AGM_Map_fnc_updateLineMarker;
|
||||
AGM_Map_lineMarkers pushBack (+AGM_Map_tempLineMarker);
|
||||
};
|
||||
AGM_Map_tempLineMarker = [];
|
||||
AGM_Map_drawing = false;
|
||||
_handled = true;
|
||||
};
|
||||
|
||||
if (_altKey) exitWith {
|
||||
// Start drawing
|
||||
AGM_Map_drawing = true;
|
||||
// Create tempLineMarker
|
||||
_gui = format ["%1%2%3%4", random (100), random (100), random (100), random (100)];
|
||||
AGM_Map_tempLineMarker = [_gui, + _pos, + _pos, AGM_Map_drawColor];
|
||||
_marker = createMarkerLocal [_gui, [0,0]];
|
||||
AGM_Map_tempLineMarker call AGM_Map_fnc_updateLineMarker;
|
||||
_handled = true;
|
||||
};
|
||||
|
||||
AGM_Map_dragging = false;
|
||||
AGM_Map_rotating = false;
|
||||
|
||||
// If no map tool marker then exit
|
||||
if (isNil "AGM_Map_mapToolFixed") exitWith {_handled = false;};
|
||||
|
||||
// Check if clicking the maptool
|
||||
if (_pos call AGM_Map_fnc_isInsideMapTool) exitWith {
|
||||
// Store data for dragging
|
||||
AGM_Map_startPos = + AGM_Map_pos;
|
||||
AGM_Map_startDragPos = + _pos;
|
||||
if (_ctrlKey) then {
|
||||
// Store data for rotating
|
||||
AGM_Map_startAngle = + AGM_Map_angle;
|
||||
AGM_Map_startDragAngle = (180 + ((AGM_Map_startDragPos select 0) - (AGM_Map_startPos select 0)) atan2 ((AGM_Map_startDragPos select 1) - (AGM_Map_startPos select 1)) mod 360);
|
||||
// Start rotating
|
||||
AGM_Map_rotating = true;
|
||||
} else {
|
||||
// Start dragging
|
||||
AGM_Map_dragging = true;
|
||||
};
|
||||
_handled = true;
|
||||
};
|
||||
};
|
||||
|
||||
_handled
|
@ -1,61 +0,0 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Handle mouse movement over the map tool.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Map Control
|
||||
* 1: Mouse position on screen coordinates
|
||||
*
|
||||
* Return value:
|
||||
* Boolean, true if event was handled
|
||||
*/
|
||||
|
||||
private ["_control", "_pos"];
|
||||
|
||||
_control = _this select 0;
|
||||
_pos = [_this select 1, _this select 2];
|
||||
AGM_Map_mousePos = _control ctrlMapScreenToWorld _pos;
|
||||
AGM_Map_mousePos set [count AGM_Map_mousePos, 0];
|
||||
|
||||
// If cannot draw then exit
|
||||
if !(call AGM_Map_fnc_canDraw) exitWith {
|
||||
// If was drawing, cancel
|
||||
if (AGM_Map_drawing) then {
|
||||
call AGM_Map_fnc_cancelDrawing;
|
||||
};
|
||||
false
|
||||
};
|
||||
|
||||
// Handle drawing
|
||||
if (AGM_Map_drawing) exitWith {
|
||||
AGM_Map_tempLineMarker set [2, AGM_Map_mousePos];
|
||||
AGM_Map_tempLineMarker call AGM_Map_fnc_updateLineMarker;
|
||||
false
|
||||
};
|
||||
|
||||
// Handle Map tools
|
||||
if (isNil "AGM_Map_mapToolFixed") exitWith {false};
|
||||
|
||||
// Translation
|
||||
if (AGM_Map_dragging) exitWith {
|
||||
AGM_Map_pos set [0, (AGM_Map_startPos select 0) + (AGM_Map_mousePos select 0) - (AGM_Map_startDragPos select 0)];
|
||||
AGM_Map_pos set [1, (AGM_Map_startPos select 1) + (AGM_Map_mousePos select 1) - (AGM_Map_startDragPos select 1)];
|
||||
|
||||
// Update the size and rotation of the maptool
|
||||
[] call AGM_Map_fnc_updateMapToolMarkers;
|
||||
true
|
||||
};
|
||||
|
||||
// Rotation
|
||||
if (AGM_Map_rotating) exitWith {
|
||||
// Get new angle
|
||||
_angle = (180 + ((AGM_Map_mousePos select 0) - (AGM_Map_startPos select 0)) atan2 ((AGM_Map_mousePos select 1) - (AGM_Map_startPos select 1)) mod 360);
|
||||
AGM_Map_angle = AGM_Map_startAngle + _angle - AGM_Map_startDragAngle;
|
||||
|
||||
// Update the size and rotation of the maptool
|
||||
[] call AGM_Map_fnc_updateMapToolMarkers;
|
||||
true
|
||||
};
|
||||
|
||||
false
|
@ -1,36 +0,0 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Handle mouse wheel.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Control
|
||||
* 1: Scroll Amount
|
||||
*
|
||||
* Return value:
|
||||
* Boolean, true if event was handled
|
||||
*/
|
||||
|
||||
private ["_dir", "_params", "_control", "_button", "_screenPos", "_shiftKey", "_ctrlKey", "_handled", "_pos"];
|
||||
|
||||
_control = _this select 0;
|
||||
_dir = _this select 1;
|
||||
diag_log "Scroll";
|
||||
diag_log _this;
|
||||
_handled = false;
|
||||
|
||||
// If drawing, change line color
|
||||
if (count AGM_Map_tempLineMarker > 0) then {
|
||||
AGM_Map_drawColor = if (_dir > 0) then {AGM_Map_drawColor + 1} else {AGM_Map_drawColor - 1};
|
||||
if (AGM_Map_drawColor >= count AGM_Map_drawColors) then {
|
||||
AGM_Map_drawColor = AGM_Map_drawColor - count AGM_Map_drawColors;
|
||||
};
|
||||
if (AGM_Map_drawColor < 0) then {
|
||||
AGM_Map_drawColor = AGM_Map_drawColor + count AGM_Map_drawColors;
|
||||
};
|
||||
AGM_Map_tempLineMarker set [3, AGM_Map_drawColor];
|
||||
AGM_Map_tempLineMarker call AGM_Map_fnc_updateLineMarker;
|
||||
|
||||
_handled = true;
|
||||
};
|
||||
_handled
|
@ -1,42 +0,0 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Opens or closes the gps on the map screen, showing coordinates
|
||||
*
|
||||
* Argument:
|
||||
* 0: Open GPS? (Boolean)
|
||||
*
|
||||
* Return value:
|
||||
* Nothing
|
||||
*/
|
||||
|
||||
|
||||
_open = _this select 0;
|
||||
_isOpen = !(isNull (uiNamespace getVariable ['AGM_Map_mapGpsDisplay', displayNull]));
|
||||
|
||||
if (_open && {"ItemGPS" in assignedItems player} && {!_isOpen}) then {
|
||||
("AGM_mapGpsLayer" call BIS_fnc_rscLayer) cutRsc ["RscAGM_MapGps","PLAIN"];
|
||||
|
||||
// Spawn a thread to update gps display
|
||||
[] spawn {
|
||||
disableSerialization;
|
||||
while {!(isNull (uiNamespace getVariable ['AGM_Map_mapGpsDisplay', displayNull]))} do {
|
||||
if !("ItemGPS" in assignedItems player) exitWith {};
|
||||
|
||||
_mapGpsDisplay = uiNamespace getVariable ['AGM_Map_mapGpsDisplay', displayNull];
|
||||
_ctrl = _mapGpsDisplay displayCtrl 913590;
|
||||
_ctrl ctrlSetText str(round(getDir player));
|
||||
_ctrl = _mapGpsDisplay displayCtrl 913591;
|
||||
_ctrl ctrlSetText str(round((getPosASL player) select 2));
|
||||
_ctrl = _mapGpsDisplay displayCtrl 913592;
|
||||
_ctrl ctrlSetText mapGridPosition player;
|
||||
|
||||
sleep 0.5;
|
||||
};
|
||||
("AGM_mapGpsLayer" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
|
||||
};
|
||||
|
||||
} else {
|
||||
("AGM_mapGpsLayer" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
|
||||
};
|
||||
|
@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Remove the line marker
|
||||
*
|
||||
* Argument:
|
||||
* 0: Marker Name (string)
|
||||
*
|
||||
* Return value:
|
||||
* Return
|
||||
*/
|
||||
|
||||
_name = _this select 0;
|
||||
|
||||
deleteMarkerLocal _name;
|
||||
{
|
||||
if ((_x select 0) == _name) exitWith {
|
||||
AGM_Map_lineMarkers = AGM_Map_lineMarkers - [_x];
|
||||
};
|
||||
} forEach AGM_Map_lineMarkers;
|
||||
|
||||
if (isServer && AGM_Map_syncMarkers) then {
|
||||
{
|
||||
if ((_x select 0) == _name) exitWith {
|
||||
AGM_Map_serverLineMarkers = AGM_Map_serverLineMarkers - [_x];
|
||||
publicVariable "AGM_Map_serverLineMarkers";
|
||||
};
|
||||
} forEach AGM_Map_serverLineMarkers;
|
||||
};
|
@ -1,13 +0,0 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Send Map markers to other player
|
||||
*
|
||||
* Argument:
|
||||
* 0: Target player (Unit)
|
||||
*
|
||||
* Return value:
|
||||
* Return
|
||||
*/
|
||||
|
||||
[AGM_Map_lineMarkers, "AGM_Map_fnc_copyMapMarkers", _this] call AGM_Core_fnc_execRemoteFnc;
|
@ -1,71 +0,0 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Update the map tool markers, position, size, rotation and visibility.
|
||||
*
|
||||
* Argument:
|
||||
* None
|
||||
*
|
||||
* Return value:
|
||||
* Nothing
|
||||
*/
|
||||
|
||||
#define TEXTURE_WIDTH_IN_M 6205
|
||||
#define CENTER_OFFSET_Y_PERC 0.1606
|
||||
#define CONSTANT_SCALE 0.2
|
||||
|
||||
// If markers exist and they should'nt, delete them
|
||||
if (!("AGM_MapTools" in items player) || {AGM_Map_mapToolsShown == 0}) then {
|
||||
// If markers exist, delete them
|
||||
if (!isNil "AGM_Map_mapToolFixed") then {
|
||||
deleteMarkerLocal "AGM_MapToolFixed";
|
||||
AGM_Map_mapToolFixed = nil;
|
||||
};
|
||||
};
|
||||
if (!("AGM_MapTools" in items player) || {AGM_Map_mapToolsShown != 1}) then {
|
||||
if (!isNil "AGM_Map_mapToolRotatingNormal") then {
|
||||
deleteMarkerLocal "AGM_MapToolRotatingNormal";
|
||||
AGM_Map_mapToolRotatingNormal = nil;
|
||||
};
|
||||
};
|
||||
if (!("AGM_MapTools" in items player) || {AGM_Map_mapToolsShown != 2}) then {
|
||||
if (!isNil "AGM_Map_mapToolRotatingSmall") then {
|
||||
deleteMarkerLocal "AGM_MapToolRotatingSmall";
|
||||
AGM_Map_mapToolRotatingSmall = nil;
|
||||
};
|
||||
};
|
||||
|
||||
if (!("AGM_MapTools" in items player)|| {AGM_Map_mapToolsShown == 0}) exitWith {};
|
||||
|
||||
// If markers don't exist and should, create them
|
||||
if (isNil "AGM_Map_mapToolFixed") then {
|
||||
AGM_Map_mapToolFixed = createMarkerLocal ["AGM_MapToolFixed", AGM_Map_pos];
|
||||
"AGM_MapToolFixed" setMarkerType "AGM_MapToolFixed";
|
||||
};
|
||||
if ((isNil "AGM_Map_mapToolRotatingNormal") && {AGM_Map_mapToolsShown == 1}) then {
|
||||
AGM_Map_mapToolRotatingNormal = createMarkerLocal ["AGM_MapToolRotatingNormal", AGM_Map_pos];
|
||||
"AGM_MapToolRotatingNormal" setMarkerType "AGM_MapToolRotatingNormal";
|
||||
};
|
||||
if ((isNil "AGM_Map_mapToolRotatingSmall") && {AGM_Map_mapToolsShown == 2}) then {
|
||||
AGM_Map_mapToolRotatingSmall = createMarkerLocal ["AGM_MapToolRotatingSmall", AGM_Map_pos];
|
||||
"AGM_MapToolRotatingSmall" setMarkerType "AGM_MapToolRotatingSmall";
|
||||
};
|
||||
|
||||
_rotatingMarker = ["AGM_MapToolRotatingNormal", "AGM_MapToolRotatingSmall"] select (AGM_Map_mapToolsShown - 1);
|
||||
_textureWidth = [TEXTURE_WIDTH_IN_M, TEXTURE_WIDTH_IN_M / 2] select (AGM_Map_mapToolsShown - 1);
|
||||
|
||||
// Update scale of both parts
|
||||
_scale = _textureWidth * CONSTANT_SCALE * (call AGM_Map_fnc_calculateMapScale);
|
||||
"AGM_MapToolFixed" setMarkerSizeLocal [_scale,_scale];
|
||||
_rotatingMarker setMarkerSizeLocal [_scale,_scale];
|
||||
|
||||
// Position of the fixed part
|
||||
_xPos = AGM_Map_pos select 0;
|
||||
_yPos = (AGM_Map_pos select 1) + _textureWidth * CENTER_OFFSET_Y_PERC;
|
||||
"AGM_MapToolFixed" setMarkerPosLocal [_xPos,_yPos];
|
||||
|
||||
// Position and rotation of the rotating part
|
||||
_xPos = (AGM_Map_pos select 0) + sin(AGM_Map_angle) * _textureWidth * CENTER_OFFSET_Y_PERC;
|
||||
_yPos = (AGM_Map_pos select 1) + cos(AGM_Map_angle) * _textureWidth * CENTER_OFFSET_Y_PERC;
|
||||
_rotatingMarker setMarkerPosLocal [_xPos,_yPos];
|
||||
_rotatingMarker setMarkerDirLocal AGM_Map_angle;
|
@ -1,4 +0,0 @@
|
||||
// by CAA-Picard
|
||||
|
||||
AGM_Map_serverLineMarkers = [];
|
||||
publicVariable "AGM_Map_serverLineMarkers";
|
Binary file not shown.
@ -1,4 +0,0 @@
|
||||
// by commy2
|
||||
|
||||
//0 spawn compile preprocessFileLineNumbers "\AGM_Movement\fatigue.sqf";
|
||||
0 spawn compile preprocessFileLineNumbers "\AGM_Movement\showWeight.sqf";
|
@ -1,223 +0,0 @@
|
||||
// PATCH CONFIG
|
||||
class CfgPatches {
|
||||
class AGM_Movement {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = 0.10;
|
||||
requiredAddons[] = {AGM_Core};
|
||||
version = "0.95";
|
||||
versionStr = "0.95";
|
||||
versionAr[] = {0,95,0};
|
||||
author[] = {"commy2", "KoffeinFlummi", "Tachii"};
|
||||
authorUrl = "https://github.com/commy2/";
|
||||
};
|
||||
};
|
||||
|
||||
class CfgFunctions {
|
||||
class AGM_Movement {
|
||||
class AGM_Movement {
|
||||
file = "AGM_Movement\functions";
|
||||
class blinking;
|
||||
class canClimb;
|
||||
class climb;
|
||||
class fatigueModule;
|
||||
class heartbeat;
|
||||
class getWeight;
|
||||
class handleClimb;
|
||||
class recoil;
|
||||
class stumble;
|
||||
class vision;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class AGM_Movement {
|
||||
clientInit = "call compile preprocessFileLineNumbers '\AGM_Movement\clientInit.sqf'";
|
||||
};
|
||||
};
|
||||
|
||||
class AGM_Core_Default_Keys {
|
||||
class climb {
|
||||
displayName = "$STR_AGM_Movement_Climb";
|
||||
condition = "_player == _vehicle";
|
||||
statement = "[_player] call AGM_Movement_fnc_climb";
|
||||
key = 47;
|
||||
shift = 0;
|
||||
control = 1;
|
||||
alt = 0;
|
||||
};
|
||||
};
|
||||
|
||||
/*class CfgInventoryGlobalVariable {
|
||||
maxSoldierLoad = 1200;
|
||||
};*/
|
||||
|
||||
class CfgFatigue {
|
||||
MinValue1 = 0.2;
|
||||
MinValue2 = 0.8;
|
||||
NormalRunSpeed = 7.2;
|
||||
TiredRunSpeedLimit = 0.8;
|
||||
FrequencyMin = 0.2;
|
||||
FrequencyMax = 1.0;
|
||||
TotalLoadCoef = 1.1;
|
||||
MaxDuty = 10;
|
||||
};
|
||||
|
||||
class CfgSounds {
|
||||
class AGM_Heartbeat {
|
||||
name = "AGM_Heartbeat";
|
||||
sound[] = {"AGM_Movement\sounds\heartbeat.ogg",1,1};
|
||||
titles[] = {};
|
||||
};
|
||||
};
|
||||
|
||||
class AGM_Core_Options {
|
||||
class useImperial {
|
||||
displayName = "$STR_AGM_Movement_UseImperial";
|
||||
default = 0;
|
||||
};
|
||||
};
|
||||
|
||||
// leaving this for compatibility
|
||||
class CfgVehicles {
|
||||
class Module_F;
|
||||
class AGM_ModuleFatigue: Module_F {
|
||||
author = "AGM Team";
|
||||
category = "AGM";
|
||||
displayName = "Fatigue System";
|
||||
function = "AGM_Movement_fnc_fatigueModule";
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = "\AGM_Movement\UI\IconFatigue_ca.paa";
|
||||
class Arguments {
|
||||
class CoefFatigue {
|
||||
displayName = "Getting Tired Coef.";
|
||||
description = "Multiplier for the rate of getting tired. Default: 1";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class CoefRecover {
|
||||
displayName = "Recover Coef.";
|
||||
description = "Multiplier for the time to rest after getting tired. Default: 1";
|
||||
defaultValue = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgMovesBasic {
|
||||
class ManActions {
|
||||
AGM_Climb = "AGM_Climb";
|
||||
};
|
||||
|
||||
class Actions {
|
||||
class RifleStandActionsNoAdjust;
|
||||
class RifleLowStandActionsNoAdjust;
|
||||
|
||||
// WEAPON RAISED - RUNNING
|
||||
class RifleStandActionsRunF: RifleStandActionsNoAdjust {
|
||||
getOver = "AovrPercMrunSrasWrflDf";
|
||||
};
|
||||
class RifleStandActionsRunFL: RifleStandActionsNoAdjust {
|
||||
getOver = "AovrPercMrunSrasWrflDf";
|
||||
};
|
||||
class RifleStandActionsRunFR: RifleStandActionsNoAdjust {
|
||||
getOver = "AovrPercMrunSrasWrflDf";
|
||||
};
|
||||
// WEAPON RAISED - SPRINTING
|
||||
class RifleStandEvasiveActionsF: RifleStandActionsNoAdjust {
|
||||
getOver = "AovrPercMrunSrasWrflDf";
|
||||
};
|
||||
class RifleStandEvasiveActionsFL: RifleStandActionsNoAdjust {
|
||||
getOver = "AovrPercMrunSrasWrflDf";
|
||||
};
|
||||
class RifleStandEvasiveActionsFR: RifleStandActionsNoAdjust {
|
||||
getOver = "AovrPercMrunSrasWrflDf";
|
||||
};
|
||||
// WEAPON LOWERED - RUNNING
|
||||
class RifleLowStandActionsRunF: RifleLowStandActionsNoAdjust {
|
||||
getOver = "AovrPercMrunSrasWrflDf";
|
||||
};
|
||||
class RifleLowStandActionsRunFL: RifleLowStandActionsNoAdjust {
|
||||
getOver = "AovrPercMrunSrasWrflDf";
|
||||
};
|
||||
class RifleLowStandActionsRunFR: RifleLowStandActionsNoAdjust {
|
||||
getOver = "AovrPercMrunSrasWrflDf";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgMovesMaleSdr: CfgMovesBasic {
|
||||
class StandBase;
|
||||
class States {
|
||||
// better slow walk with lowered rifle animation
|
||||
class AmovPercMstpSrasWrflDnon;
|
||||
class AmovPercMrunSrasWrflDf: AmovPercMstpSrasWrflDnon {
|
||||
InterpolateTo[] = {"AovrPercMrunSrasWrflDf",0.22,"AmovPercMrunSlowWrflDf",0.025,"AmovPercMwlkSrasWrflDf",0.025,"AmovPknlMrunSrasWrflDf",0.03,"AmovPercMrunSlowWrflDf_AmovPpneMstpSrasWrflDnon",0.02,"AmovPercMevaSrasWrflDf",0.025,"Unconscious",0.01,"AmovPercMtacSrasWrflDf",0.02,"AmovPercMrunSrasWrflDfl",0.02,"AmovPercMrunSrasWrflDfl_ldst",0.02,"AmovPercMrunSrasWrflDfr",0.02,"AmovPercMrunSrasWrflDfr_ldst",0.02,"AmovPercMstpSrasWrflDnon",0.02,"AmovPercMrunSrasWrflDl",0.02,"AmovPercMrunSrasWrflDbl",0.02,"AmovPercMrunSrasWrflDb",0.02,"AmovPercMrunSrasWrflDbr",0.02,"AmovPercMrunSrasWrflDr",0.02,"AmovPknlMstpSlowWrflDnon_relax",0.1,"AmovPercMrunSrasWrflDf_ldst",0.02,"AmovPercMrunSrasWrflDf",0.02};
|
||||
};
|
||||
|
||||
class AmovPercMstpSlowWrflDnon;
|
||||
class AmovPercMwlkSlowWrflDf: AmovPercMstpSlowWrflDnon {
|
||||
speed = 0.3; //0.206897;
|
||||
file = "\A3\anims_f\Data\Anim\Sdr\Mov\Erc\Wlk\Low\Rfl\AmovPercMwlkSlowWrflDf_ver2";
|
||||
leftHandIKCurve[] = {1};
|
||||
};
|
||||
class AmovPercMwlkSlowWrflDfl: AmovPercMwlkSlowWrflDf {
|
||||
leftHandIKCurve[] = {};
|
||||
};
|
||||
class AmovPercMwlkSlowWrflDfr: AmovPercMwlkSlowWrflDf {
|
||||
leftHandIKCurve[] = {};
|
||||
};
|
||||
class AmovPercMwlkSlowWrflDb: AmovPercMwlkSlowWrflDf {
|
||||
leftHandIKCurve[] = {};
|
||||
};
|
||||
class AmovPercMwlkSlowWrflDbl: AmovPercMwlkSlowWrflDf {
|
||||
leftHandIKCurve[] = {};
|
||||
};
|
||||
class AmovPercMwlkSlowWrflDbr: AmovPercMwlkSlowWrflDf {
|
||||
leftHandIKCurve[] = {};
|
||||
};
|
||||
class AmovPercMwlkSlowWrflDl: AmovPercMwlkSlowWrflDf {
|
||||
leftHandIKCurve[] = {};
|
||||
};
|
||||
class AmovPercMwlkSlowWrflDr: AmovPercMwlkSlowWrflDf {
|
||||
leftHandIKCurve[] = {};
|
||||
};
|
||||
|
||||
// enable optics in prone left and right stance
|
||||
class AidlPpneMstpSrasWrflDnon_G0S;
|
||||
class AadjPpneMstpSrasWrflDleft: AidlPpneMstpSrasWrflDnon_G0S {
|
||||
enableOptics = 1;
|
||||
};
|
||||
class AadjPpneMstpSrasWrflDright: AidlPpneMstpSrasWrflDnon_G0S {
|
||||
enableOptics = 1;
|
||||
};
|
||||
class AadjPpneMstpSrasWrflDup;
|
||||
class AadjPpneMstpSrasWrflDdown: AadjPpneMstpSrasWrflDup {
|
||||
enableOptics = 1;
|
||||
};
|
||||
|
||||
class AidlPpneMstpSrasWpstDnon_G0S;
|
||||
class AadjPpneMstpSrasWpstDleft: AidlPpneMstpSrasWpstDnon_G0S {
|
||||
enableOptics = 2;
|
||||
};
|
||||
class AadjPpneMstpSrasWpstDright: AidlPpneMstpSrasWpstDnon_G0S {
|
||||
enableOptics = 2;
|
||||
};
|
||||
class AadjPpneMstpSrasWpstDup;
|
||||
class AadjPpneMstpSrasWpstDdown: AadjPpneMstpSrasWpstDup {
|
||||
enableOptics = 2;
|
||||
};
|
||||
|
||||
// climb animation
|
||||
class AmovPercMstpSnonWnonDnon: StandBase {
|
||||
ConnectTo[] += {"AGM_Climb",0.02};
|
||||
};
|
||||
|
||||
class AmovPercMstpSnonWnonDnon_AcrgPknlMstpSnonWnonDnon_getInMedium;
|
||||
class AGM_Climb: AmovPercMstpSnonWnonDnon_AcrgPknlMstpSnonWnonDnon_getInMedium {
|
||||
canReload = 0;
|
||||
forceAim = 1;
|
||||
};
|
||||
};
|
||||
};
|
@ -1,55 +0,0 @@
|
||||
// by commy2
|
||||
|
||||
#define THRESHOLD_1 0.8
|
||||
#define THRESHOLD_2 0.9
|
||||
#define THRESHOLD_3 0.99
|
||||
|
||||
// init onEachFrame EH
|
||||
AGM_UpdatePlayerFatigue_EHID = ["AGM_UpdatePlayerFatigue", "onEachFrame", {
|
||||
_player = AGM_player;
|
||||
|
||||
// calc new fatigue
|
||||
_fatigue = getFatigue _player;
|
||||
_fatigueOld = _player getVariable ["AGM_Fatigue", getFatigue _player];
|
||||
|
||||
if (_fatigue > _fatigueOld) then {
|
||||
_fatigue = _fatigueOld + (missionNamespace getVariable ["AGM_Fatigue_CoefFatigue", 1]) * (_fatigue - _fatigueOld) max 0 min 1;
|
||||
} else {
|
||||
_fatigue = _fatigueOld - (missionNamespace getVariable ["AGM_Fatigue_CoefRecover", 1]) * (_fatigueOld - _fatigue) max 0 min 1;
|
||||
};
|
||||
|
||||
_player setFatigue _fatigue;
|
||||
_player setVariable ["AGM_Fatigue", _fatigue];
|
||||
|
||||
["Fatigue", _player, {getFatigue _this}] call AGM_Debug_fnc_log;
|
||||
}] call BIS_fnc_addStackedEventHandler;
|
||||
|
||||
// init script ehids
|
||||
_handleRecoil = scriptNull;
|
||||
_handleBlinking = scriptNull;
|
||||
_handleHeartbeat = scriptNull;
|
||||
_handleStumble = scriptNull;
|
||||
|
||||
// apply fatigue effects
|
||||
while {true} do {
|
||||
_fatigue = getFatigue AGM_player;
|
||||
|
||||
if (_fatigue > THRESHOLD_1) then {
|
||||
if (scriptDone _handleHeartbeat) then {
|
||||
_handleHeartbeat = call AGM_Movement_fnc_heartbeat;
|
||||
};
|
||||
if (_fatigue > THRESHOLD_2) then {
|
||||
if (scriptDone _handleBlinking) then {
|
||||
_handleBlinking = call AGM_Movement_fnc_blinking;
|
||||
};
|
||||
|
||||
if (_fatigue > THRESHOLD_3) then {
|
||||
if (scriptDone _handleStumble) then {
|
||||
_handleStumble = call AGM_Movement_fnc_stumble;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
sleep 0.5;
|
||||
};
|
@ -1,23 +0,0 @@
|
||||
// by commy2
|
||||
|
||||
private "_script_handle";
|
||||
|
||||
_script_handle = _this spawn {
|
||||
if (!isTouchingGround player) exitWith {};
|
||||
|
||||
_ppEffect = ppEffectCreate ["ColorCorrections", 1240];
|
||||
_ppEffect ppEffectEnable true;
|
||||
_ppEffect ppEffectForceInNVG true;
|
||||
_ppEffect ppEffectAdjust [0, -1, 0, [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]];
|
||||
_ppEffect ppEffectCommit 0.2;
|
||||
sleep 0.2;
|
||||
|
||||
_ppEffect ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [1, 1, 1, 1], [0.5, 0.5, 0.5, 0.5]];
|
||||
_ppEffect ppEffectCommit 0.2;
|
||||
sleep 0.2;
|
||||
|
||||
_ppEffect ppEffectEnable false;
|
||||
ppEffectDestroy _ppEffect;
|
||||
sleep 2 + random 2;
|
||||
};
|
||||
_script_handle
|
@ -1,21 +0,0 @@
|
||||
// by commy2
|
||||
|
||||
private "_unit";
|
||||
|
||||
_unit = _this select 0;
|
||||
|
||||
if !([_unit] call AGM_Movement_fnc_canClimb) exitWith {
|
||||
[localize "STR_AGM_Movement_CanNotClimb"] call AGM_Core_fnc_displayTextStructured;
|
||||
};
|
||||
|
||||
if !(_unit getVariable ["AGM_isClimbInit", false]) then {
|
||||
_unit addEventHandler ["AnimDone", {
|
||||
if (local (_this select 0) && {_this select 1 == "AGM_Climb"}) then {_this call AGM_Movement_fnc_handleClimb};
|
||||
}];
|
||||
|
||||
_unit setVariable ["AGM_isClimbInit", true];
|
||||
};
|
||||
|
||||
[_unit] call AGM_Core_fnc_fixLoweredRifleAnimation;
|
||||
[_unit, "AmovPercMstpSnonWnonDnon", 2] call AGM_Core_fnc_doAnimation;
|
||||
[_unit, "AGM_Climb", 0] call AGM_Core_fnc_doAnimation;
|
@ -1,14 +0,0 @@
|
||||
// by commy2
|
||||
|
||||
_logic = _this select 0;
|
||||
_units = _this select 1;
|
||||
_activated = _this select 2;
|
||||
|
||||
if !(_activated) exitWith {};
|
||||
|
||||
AGM_Fatigue_Module = true;
|
||||
|
||||
AGM_Fatigue_CoefFatigue = parseNumber (_logic getVariable "CoefFatigue");
|
||||
AGM_Fatigue_CoefRecover = parseNumber (_logic getVariable "CoefRecover");
|
||||
|
||||
diag_log text "[AGM]: Fatigue Module Initialized.";
|
@ -1,17 +0,0 @@
|
||||
// by commy2
|
||||
|
||||
#define FACTOR_POUND_TO_KILOGRAMM 1/2.2046
|
||||
|
||||
private ["_unit", "_weight"];
|
||||
|
||||
_unit = _this select 0;
|
||||
|
||||
_weight = loadAbs _unit * 0.1;
|
||||
|
||||
if (profileNamespace getVariable ["AGM_useImperial", false]) then {
|
||||
_weight = format ["%1lb", (round (_weight * 100)) / 100];
|
||||
} else {
|
||||
_weight = format ["%1kg", (round (_weight * FACTOR_POUND_TO_KILOGRAMM * 100)) / 100];
|
||||
};
|
||||
|
||||
_weight
|
@ -1,9 +0,0 @@
|
||||
// by commy2
|
||||
|
||||
private "_script_handle";
|
||||
|
||||
_script_handle = _this spawn {
|
||||
playSound "AGM_Heartbeat";
|
||||
sleep 8;
|
||||
};
|
||||
_script_handle
|
@ -1,15 +0,0 @@
|
||||
// by commy2
|
||||
|
||||
private "_script_handle";
|
||||
|
||||
_script_handle = _this spawn {
|
||||
_recoilFactor = _this select 0;
|
||||
_recoverThreshold = _this select 1;
|
||||
|
||||
player setUnitRecoilCoefficient (_recoilFactor * unitRecoilCoefficient player);
|
||||
|
||||
waitUntil {getFatigue player < _recoverThreshold};
|
||||
|
||||
player setUnitRecoilCoefficient (_recoilFactor / unitRecoilCoefficient player);
|
||||
};
|
||||
_script_handle
|
@ -1,16 +0,0 @@
|
||||
// by commy2
|
||||
|
||||
_this spawn {
|
||||
if (isTouchingGround player) then {
|
||||
_animation = switch (currentWeapon player) do {
|
||||
case "" : {"AmovPpneMstpSnonWnonDnon"};
|
||||
case (primaryWeapon player) : {"AmovPpneMstpSrasWrflDnon"};
|
||||
case (secondaryWeapon player) : {"AmovPpneMstpSrasWrflDnon"};
|
||||
case (handgunWeapon player) : {"AmovPpneMstpSrasWpstDnon"};
|
||||
case (binocular player) : {"AmovPpneMstpSrasWbinDnon"};
|
||||
default {"AmovPpneMstpSnonWnonDnon"};
|
||||
};
|
||||
[player, _animation] call AGM_Core_fnc_doAnimation;
|
||||
};
|
||||
sleep 6;
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
// by commy2
|
||||
|
||||
private "_script_handle";
|
||||
|
||||
_script_handle = _this spawn {
|
||||
_ppEffect = ppEffectCreate ["radialBlur", 1241];
|
||||
|
||||
_ppEffect ppEffectEnable true;
|
||||
_ppEffect ppEffectForceInNVG true;
|
||||
_ppEffect ppEffectAdjust [0.01, 0.01, 0.1, 0.1];
|
||||
_ppEffect ppEffectCommit 0;
|
||||
|
||||
sleep 0.5;
|
||||
|
||||
_ppEffect ppEffectEnable false;
|
||||
ppEffectDestroy _ppEffect;
|
||||
};
|
||||
_script_handle
|
@ -1,10 +0,0 @@
|
||||
//by commy2
|
||||
|
||||
while {true} do {
|
||||
waitUntil {!isNull (findDisplay 602)};
|
||||
waitUntil {
|
||||
_player = AGM_player;
|
||||
findDisplay 602 displayCtrl 111 ctrlSetText format ["%1 - %2 %3", [_player] call AGM_Core_fnc_getName, localize "STR_AGM_Movement_Weight", [_player] call AGM_Movement_fnc_getWeight];
|
||||
isNull (findDisplay 602)
|
||||
};
|
||||
};
|
Binary file not shown.
@ -1,5 +0,0 @@
|
||||
|
||||
// by commy2
|
||||
|
||||
//["Soldier", {_player = AGM_player; if (currentWeapon _player in (_player getVariable ["AGM_SafeMode_safedWeapons", []])) then {[false] call AGM_SafeMode_setSafeModeVisual}] call AGM_Core_fnc_addInfoDisplayEventHandler;
|
||||
//@todo addEventHandler infoDisplayChanged with select 1 == "Soldier"
|
@ -1,46 +0,0 @@
|
||||
// PATCH CONFIG
|
||||
class CfgPatches {
|
||||
class AGM_SafeMode {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = 0.60;
|
||||
requiredAddons[] = {AGM_Core};
|
||||
version = "0.95";
|
||||
versionStr = "0.95";
|
||||
versionAr[] = {0,95,0};
|
||||
author[] = {"commy2"};
|
||||
authorUrl = "https://github.com/commy2/";
|
||||
};
|
||||
};
|
||||
|
||||
class CfgFunctions {
|
||||
class AGM_SafeMode {
|
||||
class AGM_SafeMode {
|
||||
file = "AGM_SafeMode\functions";
|
||||
class firstMode;
|
||||
class lockSafety;
|
||||
class playChangeFiremodeSound;
|
||||
class setSafeModeVisual;
|
||||
class unlockSafety;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class AGM_SafeMode {
|
||||
clientInit = "call compile preprocessFileLineNumbers '\AGM_SafeMode\clientInit.sqf';";
|
||||
};
|
||||
};
|
||||
|
||||
class AGM_Core_Default_Keys {
|
||||
class safeWeapon {
|
||||
displayName = "$STR_AGM_SafeMode_SafeMode";
|
||||
condition = "[_player] call AGM_Core_fnc_canUseWeapon";
|
||||
statement = "[_player, currentWeapon _player, currentMuzzle _player] call AGM_SafeMode_fnc_lockSafety";
|
||||
exceptions[] = {"AGM_Interaction_isNotEscorting"};
|
||||
key = 41;
|
||||
shift = 0;
|
||||
control = 1;
|
||||
alt = 0;
|
||||
};
|
||||
};
|
@ -1,65 +0,0 @@
|
||||
// by commy2
|
||||
|
||||
private ["_unit", "_weapon", "_muzzle", "_safedWeapons"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_weapon = _this select 1;
|
||||
_muzzle = _this select 2;
|
||||
|
||||
// don't immediately switch back
|
||||
if (inputAction "nextWeapon" > 0) exitWith {};
|
||||
|
||||
_safedWeapons = _unit getVariable ["AGM_SafeMode_safedWeapons", []];
|
||||
|
||||
if (_weapon in _safedWeapons) exitWith {
|
||||
_this call AGM_SafeMode_fnc_unlockSafety;
|
||||
};
|
||||
|
||||
_safedWeapons pushBack _weapon;
|
||||
|
||||
_unit setVariable ["AGM_SafeMode_safedWeapons", _safedWeapons];
|
||||
|
||||
if (_unit getVariable ["AGM_SafeWeapon_actionID", -1] == -1) then {
|
||||
private ["_condition", "_statement", "_id"];
|
||||
|
||||
_condition = {
|
||||
if (
|
||||
[_this select 1] call AGM_Core_fnc_canUseWeapon
|
||||
&& {
|
||||
if (currentMuzzle (_this select 1) in ((_this select 1) getVariable ["AGM_SafeMode_safedWeapons", []])) then {
|
||||
if (inputAction "nextWeapon" > 0) exitWith {
|
||||
[_this select 1, currentWeapon (_this select 1), currentMuzzle (_this select 1)] call AGM_SafeMode_fnc_unlockSafety;
|
||||
false
|
||||
};
|
||||
true
|
||||
} else {false}
|
||||
}
|
||||
) then {
|
||||
// player hud
|
||||
[false] call AGM_SafeMode_fnc_setSafeModeVisual;
|
||||
true
|
||||
} else {
|
||||
// player hud
|
||||
[true] call AGM_SafeMode_fnc_setSafeModeVisual;
|
||||
false
|
||||
}
|
||||
};
|
||||
|
||||
_statement = {
|
||||
[_this select 1, currentWeapon (_this select 1), currentMuzzle (_this select 1)] call AGM_SafeMode_fnc_unlockSafety;
|
||||
};
|
||||
|
||||
//_id = [_unit, format ["<t color=""#FFFF00"" >%1</t>", localize "STR_AGM_SafeMode_TakeOffSafety"], "DefaultAction", _condition, {}, {true}, _statement, 10] call AGM_Core_fnc_addActionMenuEventHandler;
|
||||
_id = [_unit, "DefaultAction", _condition, {}] call AGM_Core_fnc_addActionEventHandler;
|
||||
|
||||
_unit setVariable ["AGM_SafeWeapon_actionID", _id];
|
||||
};
|
||||
|
||||
_unit selectWeapon _muzzle;//_weapon
|
||||
|
||||
// play fire mode selector sound
|
||||
[_unit, _weapon, _muzzle] call AGM_SafeMode_fnc_playChangeFiremodeSound;
|
||||
|
||||
private "_picture";
|
||||
_picture = getText (configFile >> "CfgWeapons" >> _weapon >> "picture");
|
||||
[localize "STR_AGM_SafeMode_PutOnSafety", _picture] call AGM_Core_fnc_displayTextPicture;
|
@ -1,530 +0,0 @@
|
||||
// SEE LICENSE.TXT FOR LICENSING INFORMATION
|
||||
|
||||
class CfgPatches {
|
||||
class AGM_Smallarms {
|
||||
units[] = {};
|
||||
weapons[] = {}; //{"AGM_acc_flashlight_tls"};
|
||||
requiredVersion = 0.60;
|
||||
requiredAddons[] = {AGM_Core};
|
||||
version = "0.95";
|
||||
versionStr = "0.95";
|
||||
versionAr[] = {0,95,0};
|
||||
author[] = {"TaoSensai", "KoffeinFlummi"};
|
||||
authorUrl = "https://github.com/Taosenai/tmr";
|
||||
};
|
||||
};
|
||||
|
||||
// EVERYTHING BELOW BELONGS TO TAOSENSAI
|
||||
|
||||
//////////////////////////////////////////////////////
|
||||
// TMR strings update for weapons and magazines:
|
||||
// 1. Change displayname to match TMR standards.
|
||||
// 3. Add displaynameshort to TMR standards.
|
||||
//////////////////////////////////////////////////////
|
||||
|
||||
class CfgMagazines {
|
||||
class CA_Magazine;
|
||||
|
||||
// Magazine updates:
|
||||
// 1. Update all magazines with tracer mix to use 1 in 5 mix. Full tracer mags should not be changed!
|
||||
// 2. Remove tracers at bottom of magazine.
|
||||
// 3. Do string updates.
|
||||
|
||||
// 5.56mm ////////////////////////////////////
|
||||
|
||||
class 30Rnd_556x45_Stanag : CA_Magazine {
|
||||
displayname = "5.56mm 30Rnd Mag";
|
||||
displaynameshort = "5.56mm";
|
||||
|
||||
tracersEvery = 0;
|
||||
lastRoundsTracer = 0;
|
||||
};
|
||||
|
||||
class 30Rnd_556x45_Stanag_Tracer_Red: 30Rnd_556x45_Stanag {
|
||||
displayname = "5.56mm 30Rnd Tracer Mag";
|
||||
displaynameshort = "5.56mm";
|
||||
};
|
||||
|
||||
class 30Rnd_556x45_Stanag_Tracer_Green: 30Rnd_556x45_Stanag {
|
||||
displayname = "5.56mm 30Rnd Tracer Mag";
|
||||
displaynameshort = "5.56mm";
|
||||
};
|
||||
|
||||
class 30Rnd_556x45_Stanag_Tracer_Yellow: 30Rnd_556x45_Stanag {
|
||||
displayname = "5.56mm 30Rnd Tracer Mag";
|
||||
displaynameshort = "5.56mm";
|
||||
};
|
||||
|
||||
class 20Rnd_556x45_UW_mag: 30Rnd_556x45_Stanag {
|
||||
displayname = "5.56mm 20Rnd MEA Mag";
|
||||
displaynameshort = "5.56mm MEA";
|
||||
};
|
||||
|
||||
// 6.5mm //////////////////////////////////////////
|
||||
|
||||
class 30Rnd_65x39_caseless_mag : CA_Magazine { // MX!!
|
||||
displayname = "6.5mm 30Rnd Mag";
|
||||
displaynameshort = "6.5mm";
|
||||
|
||||
tracersEvery = 0;
|
||||
lastRoundsTracer = 0;
|
||||
};
|
||||
|
||||
class 30Rnd_65x39_caseless_mag_Tracer : 30Rnd_65x39_caseless_mag { // MX!!
|
||||
displayname = "6.5mm 30Rnd Tracer Mag";
|
||||
displaynameshort = "6.5mm Tracer";
|
||||
};
|
||||
|
||||
class 30Rnd_65x39_caseless_green : 30Rnd_65x39_caseless_mag { // Katiba!!
|
||||
displayname = "6.5mm 30Rnd Mag";
|
||||
displaynameshort = "6.5mm";
|
||||
|
||||
tracersEvery = 0;
|
||||
lastRoundsTracer = 0;
|
||||
};
|
||||
|
||||
class 30Rnd_65x39_caseless_green_Tracer : 30Rnd_65x39_caseless_green { // Katiba!!
|
||||
displayname = "6.5mm 30Rnd Tracer Magazine";
|
||||
displaynameshort = "6.5mm Tracer";
|
||||
};
|
||||
|
||||
class 100Rnd_65x39_caseless_mag : CA_Magazine {
|
||||
displayname = "6.5mm 100Rnd Mag";
|
||||
displaynameshort = "6.5mm";
|
||||
|
||||
tracersEvery = 5;
|
||||
lastRoundsTracer = 3;
|
||||
};
|
||||
|
||||
class 100Rnd_65x39_caseless_mag_Tracer : 100Rnd_65x39_caseless_mag {
|
||||
displayname = "6.5mm 100Rnd Tracer Mag";
|
||||
displaynameshort = "6.5mm Tracer";
|
||||
};
|
||||
|
||||
class 200Rnd_65x39_cased_Box : 100Rnd_65x39_caseless_mag {
|
||||
displayname = "6.5mm 200Rnd Box";
|
||||
displaynameshort = "6.5mm";
|
||||
|
||||
tracersEvery = 5;
|
||||
lastRoundsTracer = 3;
|
||||
};
|
||||
class 200Rnd_65x39_cased_Box_Tracer: 200Rnd_65x39_cased_Box {
|
||||
displayname = "6.5mm 200Rnd Tracer Box";
|
||||
displaynameshort = "6.5mm Tracer";
|
||||
};
|
||||
|
||||
// 7.62mm //////////////////////////////////////////
|
||||
|
||||
class 20Rnd_762x51_Mag: CA_Magazine {
|
||||
displayname = "7.62mm 20Rnd Mag";
|
||||
displaynameshort = "7.62mm";
|
||||
};
|
||||
|
||||
class 150Rnd_762x51_Box : CA_Magazine {
|
||||
displayname = "7.62mm 150Rnd Box";
|
||||
|
||||
tracersEvery = 5;
|
||||
lastRoundsTracer = 3;
|
||||
};
|
||||
|
||||
class 150Rnd_762x51_Box_Tracer : 150Rnd_762x51_Box {
|
||||
displayname = "7.62mm 150Rnd Tracer Box";
|
||||
};
|
||||
|
||||
// Anti-materiel ///////////////////////////////
|
||||
|
||||
class 7Rnd_408_Mag: CA_Magazine {
|
||||
displayname = ".408 7Rnd Mag";
|
||||
};
|
||||
|
||||
class 5Rnd_127x108_Mag: CA_Magazine {
|
||||
displayname = "12.7mm 5Rnd Mag";
|
||||
};
|
||||
|
||||
// SMG & Pistol ////////////////////////////
|
||||
|
||||
class 30Rnd_9x21_Mag : CA_Magazine {
|
||||
displayname = "9mm 30Rnd Mag";
|
||||
displaynameshort = "9mm";
|
||||
|
||||
lastRoundsTracer = 0;
|
||||
};
|
||||
|
||||
class 16Rnd_9x21_Mag: 30Rnd_9x21_Mag {
|
||||
displayname = "9mm 17Rnd Mag";
|
||||
displaynameshort = "9mm";
|
||||
|
||||
count = 17;
|
||||
};
|
||||
|
||||
class 30Rnd_45ACP_Mag_SMG_01 : 30Rnd_9x21_Mag {
|
||||
displayname = ".45 25Rnd Mag";
|
||||
displaynameshort = ".45";
|
||||
|
||||
picture = "\A3\weapons_f\data\ui\M_30Rnd_9x21_CA.paa";
|
||||
|
||||
count = 25;
|
||||
|
||||
tracersEvery = 0;
|
||||
lastRoundsTracer = 0;
|
||||
};
|
||||
|
||||
class 9Rnd_45ACP_Mag : 30Rnd_45ACP_Mag_SMG_01 {
|
||||
displayname = ".45 8Rnd Mag";
|
||||
displaynameshort = ".45";
|
||||
|
||||
count = 8;
|
||||
};
|
||||
|
||||
class 30Rnd_45ACP_Mag_SMG_01_Tracer_Green: 30Rnd_45ACP_Mag_SMG_01 {
|
||||
displayname = ".45 25Rnd Tracer Mag";
|
||||
};
|
||||
};
|
||||
|
||||
class Mode_SemiAuto;
|
||||
class Mode_Burst;
|
||||
class Mode_FullAuto;
|
||||
|
||||
// config inheritance of weapon slot info v1.32
|
||||
class SlotInfo;
|
||||
class CowsSlot: SlotInfo {};
|
||||
class PointerSlot: SlotInfo {
|
||||
//compatibleItems[] = {"acc_flashlight","acc_pointer_IR", "AGM_acc_flashlight_tls"};
|
||||
};
|
||||
|
||||
class CfgWeapons {
|
||||
|
||||
// config inheritance of weapon slot info v1.32 for launchers
|
||||
class Launcher;
|
||||
class Launcher_Base_F: Launcher {
|
||||
class WeaponSlotsInfo {};
|
||||
};
|
||||
|
||||
// config inheritance of weapon slot info v1.32 for assault rifles
|
||||
class RifleCore;
|
||||
class Rifle: RifleCore {
|
||||
class WeaponSlotsInfo {
|
||||
class MuzzleSlot: SlotInfo {};
|
||||
class CowsSlot: CowsSlot {};
|
||||
class PointerSlot: PointerSlot {};
|
||||
};
|
||||
};
|
||||
class Rifle_Base_F: Rifle {};
|
||||
class Rifle_Long_Base_F: Rifle_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {};
|
||||
};
|
||||
|
||||
// config inheritance of weapon slot info v1.32 for handguns
|
||||
class PistolCore;
|
||||
class Pistol: PistolCore {
|
||||
class WeaponSlotsInfo {
|
||||
class CowsSlot: SlotInfo {};
|
||||
};
|
||||
};
|
||||
class Pistol_Base_F: Pistol {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: SlotInfo {};
|
||||
};
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//////////// SMALL ARMS WEAPONS ///////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Weapon updates:
|
||||
// 1. Do string update.
|
||||
// 2. Fix magazine compatibility as needed.
|
||||
// 3. Fix firing modes as needed.
|
||||
// 4. Fix accessory compatibility as needed.
|
||||
|
||||
// Grenade launchers /////////////////////////////////////
|
||||
// Updated strings are in weapon configs.
|
||||
class GrenadeLauncher;
|
||||
class UGL_F : GrenadeLauncher {};
|
||||
|
||||
// MXs ////////////////////////////////////////////////////
|
||||
|
||||
class arifle_MX_Base_F : Rifle_Base_F {
|
||||
//magazines[] = {"30Rnd_65x39_caseless_mag", "30Rnd_65x39_caseless_mag_Tracer", "100Rnd_65x39_caseless_mag", "100Rnd_65x39_caseless_mag_Tracer"};
|
||||
|
||||
// http://www.bushmaster.com/acr/#/intro
|
||||
// 800 rpm (whatever, fictional lol)
|
||||
|
||||
//class Single : Mode_SemiAuto {};
|
||||
class Single : Mode_SemiAuto {
|
||||
reloadTime = 0.075;
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
reloadTime = 0.075;
|
||||
};
|
||||
};
|
||||
|
||||
class arifle_MX_SW_F : arifle_MX_Base_F {
|
||||
modes[] = {"Single", "manual", "close", "short", "medium", "far_optic1", "far_optic2"};
|
||||
|
||||
//class Single : Single {};
|
||||
//class manual : FullAuto {};
|
||||
};
|
||||
|
||||
// Katibas ////////////////////////////////////////////////////
|
||||
|
||||
class arifle_katiba_Base_F : Rifle_Base_F {
|
||||
// http://world.guns.ru/assault/iran/khaybar-kh2002-e.html
|
||||
// 800 rpm
|
||||
|
||||
class Single : Mode_SemiAuto {
|
||||
reloadTime = 0.075;
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
reloadTime = 0.075;
|
||||
};
|
||||
};
|
||||
|
||||
// SDAR //////////////////////////////////////////////////
|
||||
|
||||
class SDAR_base_F : Rifle_Base_F {
|
||||
modes[] = {"Single", "FullAuto"}; // Leave in the imaginary full-auto mode because, whatever.
|
||||
};
|
||||
|
||||
// Tavor TRG ////////////////////////////////////////////////
|
||||
|
||||
class Tavor_base_F : Rifle_Base_F {
|
||||
// http://www.israel-weapon.com/files/brochure_2012/IWI_TAVOR_AR.pdf
|
||||
// 700 ~1000 rpm (850)
|
||||
class Single : Mode_SemiAuto {
|
||||
reloadTime = 0.07;
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
reloadTime = 0.07;
|
||||
};
|
||||
};
|
||||
|
||||
// Mk20 (F2000) //////////////////////////////////////////////////
|
||||
|
||||
class mk20_base_F : Rifle_Base_F {
|
||||
// http://www.fnherstal.com/primary-menu/products-capabilities/rifles/technical-data/product/182/232/182/1/_/fn-f2000R-standard.html
|
||||
// 850 rpm
|
||||
class Single : Mode_SemiAuto {
|
||||
reloadTime = 0.07;
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
reloadTime = 0.07;
|
||||
};
|
||||
};
|
||||
|
||||
// SMG Vermin ////////////////////////////////////////////////////
|
||||
|
||||
class SMG_01_Base : Rifle_Base_F {
|
||||
// http://kriss-usa.com/pdf/operatormanual/
|
||||
// 1200 rpm
|
||||
class Single : Mode_SemiAuto {
|
||||
reloadTime = 0.05;
|
||||
};
|
||||
|
||||
class Burst : Mode_Burst {
|
||||
burst = 2;
|
||||
reloadTime = 0.05;
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
reloadTime = 0.05;
|
||||
};
|
||||
};
|
||||
|
||||
// SMG Scorpion ////////////////////////////////////////////////////
|
||||
|
||||
class SMG_02_base_F : Rifle_Base_F {
|
||||
//http://www.czub.cz/zbrojovka/cz-manual/Instruction-Manual-Scorpion-EVO-3-A1_en.pdf
|
||||
// 1150 rpm
|
||||
|
||||
class Single : Mode_SemiAuto {
|
||||
// http://www.stengg.com/upload/915fGdhTi3ggnnGQGGL.pdf
|
||||
// 900-1100 rpm (1000rpm)
|
||||
reloadTime = 0.052;
|
||||
};
|
||||
|
||||
class Burst : Mode_Burst {
|
||||
reloadTime = 0.052;
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
reloadTime = 0.052;
|
||||
};
|
||||
};
|
||||
|
||||
// SMG PDW2000 ///////////////////////////////////////////////////
|
||||
|
||||
class pdw2000_base_F: Rifle_Base_F {
|
||||
magazines[] = {"30Rnd_9x21_Mag"};
|
||||
|
||||
modes[] = {"Single", "FullAuto"}; // No burst on this thing
|
||||
|
||||
class Single : Mode_SemiAuto {
|
||||
// http://www.stengg.com/upload/915fGdhTi3ggnnGQGGL.pdf
|
||||
// 900-1100 rpm (1000rpm)
|
||||
reloadTime = 0.06;
|
||||
};
|
||||
|
||||
class FullAuto: Mode_FullAuto {
|
||||
reloadTime = 0.06;
|
||||
};
|
||||
};
|
||||
|
||||
// Pistols //////////////////////////////////////////////
|
||||
|
||||
class hgun_P07_F : Pistol_Base_F {
|
||||
magazines[] = {"16Rnd_9x21_Mag"};
|
||||
};
|
||||
|
||||
class hgun_Rook40_F : Pistol_Base_F {
|
||||
magazines[] = {"16Rnd_9x21_Mag"};
|
||||
};
|
||||
|
||||
/*class hgun_ACPC2_F: Pistol_Base_F {};
|
||||
class hgun_Pistol_heavy_01_F: Pistol_Base_F {};
|
||||
class hgun_Pistol_heavy_02_F: Pistol_Base_F {};*/
|
||||
|
||||
// LMGs //////////////////////////////////////////////
|
||||
|
||||
class LMG_Mk200_F : Rifle_Long_Base_F {
|
||||
modes[] = {"manual", "Single", "close", "short", "medium", "far_optic1", "far_optic2"};
|
||||
|
||||
class manual : Mode_FullAuto {
|
||||
// http://www.defensereview.com/kac-stoner-lmg-belt-fed-5-56mm-nato-lightweight-light-machine-gun-squad-automatic-weapon-lmgsaw-displayed-at-sofic-2010/
|
||||
// 550 rpm
|
||||
reloadTime = 0.109;
|
||||
};
|
||||
|
||||
// Add semi-auto mode.
|
||||
// Inherit from 'manual' for sound reasons.
|
||||
class Single : manual {
|
||||
reloadTime = 0.109;
|
||||
dispersion = 0.00175; // radians. Equal to 6 MOA.
|
||||
autofire = 0;
|
||||
burst = 1;
|
||||
displayname = "Semi";
|
||||
texturetype = "semi";
|
||||
showToPlayer = 1;
|
||||
};
|
||||
};
|
||||
|
||||
class LMG_Zafir_F: Rifle_Long_Base_F {
|
||||
modes[] = {"FullAuto", "Single", "close", "short", "medium", "far_optic1", "far_optic2"};
|
||||
|
||||
class FullAuto : Mode_FullAuto {
|
||||
reloadTime = 0.070; // 850 RPM on gas position 1
|
||||
};
|
||||
};
|
||||
|
||||
// Sniper and anti-materiel rifles /////////////////////////////////
|
||||
|
||||
class EBR_base_F : Rifle_Long_Base_F {
|
||||
// EMR/EBR is typically issued semi-auto AFAIK
|
||||
modes[] = {"Single", "single_close_optics1", "single_medium_optics1", "single_far_optics1"};
|
||||
cursor = "arifle";
|
||||
};
|
||||
|
||||
class LRR_base_F : Rifle_Long_Base_F {
|
||||
cursor = "arifle";
|
||||
};
|
||||
|
||||
class GM6_base_F : Rifle_Long_Base_F {
|
||||
cursor = "arifle";
|
||||
|
||||
// Fuck your balancing, BI.
|
||||
class Single : Mode_SemiAuto {
|
||||
// 250 rpm is probably the limit of the finger on a heavy bullpup trigger like this thing must have.
|
||||
reloadTime = 0.24;
|
||||
};
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//////////// WEAPON ATTACHMENTS ///////////////////////////////////////////////
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
|
||||
class ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
class InventoryMuzzleItem_Base_F;
|
||||
class InventoryFlashLightItem_Base_F;
|
||||
|
||||
class AGM_acc_flashlight_tls: ItemCore {
|
||||
author = "$STR_A3_Bohemia_Interactive";
|
||||
_generalMacro = "AGM_acc_flashlight_tls";
|
||||
scope = 1; //2;
|
||||
displayName = "$STR_A3_cfgWeapons_acc_flashlight0";//
|
||||
descriptionUse = "$STR_A3_cfgWeapons_use_flashlight0";//
|
||||
picture = "\A3\weapons_F\Data\UI\gear_accv_flashlight_tls_ca.paa";
|
||||
model = "\A3\weapons_f\acc\accv_flashlight_TLS_F";
|
||||
descriptionShort = "$STR_A3_cfgWeapons_acc_flashlight1";//
|
||||
class ItemInfo: InventoryFlashLightItem_Base_F {
|
||||
mass = 4;
|
||||
class FlashLight {
|
||||
color[] = {180,156,120};
|
||||
ambient[] = {0.9,0.78,0.6};
|
||||
intensity = 20;
|
||||
size = 1;
|
||||
innerAngle = 20;
|
||||
outerAngle = 80;
|
||||
coneFadeCoef = 5;
|
||||
position = "flash dir";
|
||||
direction = "flash";
|
||||
useFlare = 1;
|
||||
flareSize = 1.4;
|
||||
flareMaxDistance = "100.0f";
|
||||
dayLight = 0;
|
||||
class Attenuation {
|
||||
start = 0.5;
|
||||
constant = 0;
|
||||
linear = 0;
|
||||
quadratic = 1.1;
|
||||
hardLimitStart = 20;
|
||||
hardLimitEnd = 30;
|
||||
};
|
||||
scale[] = {0};
|
||||
};
|
||||
};
|
||||
inertia = 0.1;
|
||||
};
|
||||
};
|
||||
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
/*class CfgVehicles {
|
||||
class NATO_Box_Base;
|
||||
class EAST_Box_Base;
|
||||
class IND_Box_Base;
|
||||
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(AGM_acc_flashlight_tls,5)
|
||||
};
|
||||
};
|
||||
|
||||
class Box_East_Support_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(AGM_acc_flashlight_tls,5)
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(AGM_acc_flashlight_tls,5)
|
||||
};
|
||||
};
|
||||
|
||||
class AGM_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(AGM_acc_flashlight_tls,2)
|
||||
};
|
||||
};
|
||||
};*/
|
@ -99,6 +99,14 @@ GVAR(OldPlayerTurret) = [ACE_player] call FUNC(getTurretIndex);
|
||||
["playerVisionModeChanged", [ACE_player, _newPlayerVisionMode]] call FUNC(localEvent);
|
||||
};
|
||||
|
||||
// "inventoryDisplayChanged" event
|
||||
_newInventoryDisplayIsOpen = !(isNull findDisplay 602);
|
||||
if !(_newInventoryDisplayIsOpen isEqualTo GVAR(OldInventoryDisplayIsOpen)) then {
|
||||
// Raise ACE event locally
|
||||
GVAR(OldInventoryDisplayIsOpen) = _newInventoryDisplayIsOpen;
|
||||
["inventoryDisplayChanged", [ACE_player, _newInventoryDisplayIsOpen]] call FUNC(localEvent);
|
||||
};
|
||||
|
||||
// "zeusDisplayChanged" event
|
||||
_newZeusDisplayIsOpen = !(isNull findDisplay 312);
|
||||
if !(_newZeusDisplayIsOpen isEqualTo GVAR(OldZeusDisplayIsOpen)) then {
|
||||
|
1
addons/difficulties/$PBOPREFIX$
Normal file
1
addons/difficulties/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\difficulties
|
33
addons/difficulties/CfgDifficulties.hpp
Normal file
33
addons/difficulties/CfgDifficulties.hpp
Normal file
@ -0,0 +1,33 @@
|
||||
|
||||
class CfgDifficulties {
|
||||
class Mercenary {
|
||||
class Flags {
|
||||
armor[] = {0,0};
|
||||
friendlyTag[] = {0,0};
|
||||
enemyTag[] = {0,0};
|
||||
mineTag[] = {0,0};
|
||||
hud[] = {0,1};//{1,1};
|
||||
hudPerm[] = {0,0};
|
||||
hudWp[] = {0,0};
|
||||
hudWpPerm[] = {0,0};
|
||||
autoSpot[] = {0,1};
|
||||
map[] = {0,0};
|
||||
weaponCursor[] = {0,1};//{1,1};
|
||||
autoGuideAT[] = {0,0};
|
||||
clockIndicator[] = {0,0};
|
||||
3rdPersonView[] = {0,0};
|
||||
autoAim[] = {0,0};
|
||||
unlimitedSaves[] = {0,0};
|
||||
deathMessages[] = {0,1};//{1,1};
|
||||
netStats[] = {0,1};//{1,1};
|
||||
vonID[] = {0,1};
|
||||
cameraShake[] = {1,0};
|
||||
hudGroupInfo[] = {0,0};
|
||||
extendetInfoType[] = {0,0};
|
||||
roughLanding[] = {0,0};
|
||||
windEnabled[] = {1,0};
|
||||
autoTrimEnabled[] = {0,0};
|
||||
stressDamageEnabled[] = {1,0};
|
||||
};
|
||||
};
|
||||
};
|
15
addons/difficulties/config.cpp
Normal file
15
addons/difficulties/config.cpp
Normal file
@ -0,0 +1,15 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author[] = {"commy2"};
|
||||
authorUrl = "https://github.com/commy2/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgDifficulties.hpp"
|
12
addons/difficulties/script_component.hpp
Normal file
12
addons/difficulties/script_component.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
#define COMPONENT difficulties
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_DIFFICULTIES
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ENABLED_DIFFICULTIES
|
||||
#define DEBUG_SETTINGS DEBUG_ENABLED_DIFFICULTIES
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
@ -7,6 +7,11 @@ _interval = time - GVAR(lastUpdateTime);
|
||||
|
||||
// Update the g-forces at constant game time intervals
|
||||
if (_interval < INTERVAL) exitWith {};
|
||||
|
||||
if (isNull ACE_player) exitWith {};
|
||||
|
||||
if !(alive ACE_player) exitWith {};
|
||||
|
||||
GVAR(lastUpdateTime) = time;
|
||||
|
||||
/*if !(vehicle ACE_player isKindOf "Air") exitWith {
|
||||
|
1
addons/laserpointer/$PBOPREFIX$
Normal file
1
addons/laserpointer/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\laserpointer
|
12
addons/laserpointer/CfgEventHandlers.hpp
Normal file
12
addons/laserpointer/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
};
|
42
addons/laserpointer/CfgVehicles.hpp
Normal file
42
addons/laserpointer/CfgVehicles.hpp
Normal file
@ -0,0 +1,42 @@
|
||||
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
}
|
||||
|
||||
class CfgVehicles {
|
||||
class NATO_Box_Base;
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_acc_pointer_red,4);
|
||||
};
|
||||
};
|
||||
|
||||
class EAST_Box_Base;
|
||||
class Box_East_Support_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_acc_pointer_green,4);
|
||||
};
|
||||
};
|
||||
|
||||
class IND_Box_Base;
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_acc_pointer_green,4);
|
||||
};
|
||||
};
|
||||
|
||||
class FIA_Box_Base_F;
|
||||
class Box_FIA_Support_F: FIA_Box_Base_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_acc_pointer_red,4);
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_acc_pointer_red,4);
|
||||
MACRO_ADDITEM(ACE_acc_pointer_green,4);
|
||||
};
|
||||
};
|
||||
};
|
62
addons/laserpointer/CfgWeapons.hpp
Normal file
62
addons/laserpointer/CfgWeapons.hpp
Normal file
@ -0,0 +1,62 @@
|
||||
|
||||
class SlotInfo;
|
||||
class PointerSlot: SlotInfo {
|
||||
compatibleItems[] += {"ACE_acc_pointer_red","ACE_acc_pointer_green"};
|
||||
};
|
||||
|
||||
class CfgWeapons {
|
||||
class ItemCore;
|
||||
class InventoryFlashLightItem_Base_F;
|
||||
|
||||
class ACE_acc_pointer_red: ItemCore {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
_generalMacro = "ACE_acc_pointer_red";
|
||||
scope = 2;
|
||||
displayName = "$STR_ACE_Laserpointer_red";
|
||||
descriptionUse = "$STR_ACE_Laserpointer_useLaser";
|
||||
picture = "\A3\weapons_F\Data\UI\gear_accv_pointer_CA.paa";
|
||||
model = "\A3\weapons_f\acc\accv_pointer_F";
|
||||
descriptionShort = "$STR_ACE_Laserpointer_Description";
|
||||
|
||||
class ItemInfo: InventoryFlashLightItem_Base_F {
|
||||
mass = 6;
|
||||
|
||||
class Pointer {};
|
||||
|
||||
class FlashLight {
|
||||
color[] = {0,0,0};
|
||||
ambient[] = {0,0,0};
|
||||
intensity = 0;
|
||||
size = 0;
|
||||
innerAngle = 0;
|
||||
outerAngle = 0;
|
||||
coneFadeCoef = 5;
|
||||
position = "flash dir";
|
||||
direction = "flash";
|
||||
useFlare = 0;
|
||||
flareSize = 0;
|
||||
flareMaxDistance = "100.0f";
|
||||
dayLight = 0;
|
||||
|
||||
class Attenuation {
|
||||
start = 0;
|
||||
constant = 0;
|
||||
linear = 0;
|
||||
quadratic = 0;
|
||||
hardLimitStart = 0;
|
||||
hardLimitEnd = 0;
|
||||
};
|
||||
|
||||
scale[] = {0};
|
||||
};
|
||||
};
|
||||
|
||||
inertia = 0.1;
|
||||
};
|
||||
|
||||
class ACE_acc_pointer_green: ACE_acc_pointer_red {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
_generalMacro = "ACE_acc_pointer_green";
|
||||
displayName = "$STR_ACE_Laserpointer_green";
|
||||
};
|
||||
};
|
21
addons/laserpointer/XEH_postInit.sqf
Normal file
21
addons/laserpointer/XEH_postInit.sqf
Normal file
@ -0,0 +1,21 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(nearUnits) = [];
|
||||
|
||||
// @todo. Maybe move to common?
|
||||
[{
|
||||
private "_nearUnits";
|
||||
_nearUnits = nearestObjects [ACE_player, ["CAManBase"], 50];
|
||||
|
||||
if (count _nearUnits > 10) then {
|
||||
_nearUnits resize 10;
|
||||
};
|
||||
|
||||
GVAR(nearUnits) = _nearUnits;
|
||||
|
||||
} , 5, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
addMissionEventHandler ["Draw3D", {
|
||||
call FUNC(onDraw);
|
||||
}];
|
4
addons/laserpointer/XEH_preInit.sqf
Normal file
4
addons/laserpointer/XEH_preInit.sqf
Normal file
@ -0,0 +1,4 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
PREP(drawLaserpoint);
|
||||
PREP(onDraw);
|
17
addons/laserpointer/config.cpp
Normal file
17
addons/laserpointer/config.cpp
Normal file
@ -0,0 +1,17 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {"AGM_acc_pointer_red","AGM_acc_pointer_green"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author[] = {"commy2"};
|
||||
authorUrl = "https://github.com/commy2";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
111
addons/laserpointer/functions/fnc_drawLaserpoint.sqf
Normal file
111
addons/laserpointer/functions/fnc_drawLaserpoint.sqf
Normal file
@ -0,0 +1,111 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_range", "_isGreen"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_range = _this select 1;
|
||||
_isGreen = _this select 2;
|
||||
|
||||
_p0 = _unit modelToWorld (_unit selectionPosition "righthand");
|
||||
_d = _unit weaponDirection currentWeapon _unit;
|
||||
|
||||
_p1 = _p0 vectorAdd (_d vectorMultiply _range);
|
||||
_pA = _p0 vectorAdd (_d vectorMultiply 0.5);
|
||||
|
||||
_offset0 = getTerrainHeightASL _p0;
|
||||
_offset1 = getTerrainHeightASL _p1;
|
||||
_offsetA = getTerrainHeightASL _pA;
|
||||
|
||||
_p1 = _p1 vectorAdd [0, 0, _offset0 - _offset1];
|
||||
_p0 = _pA vectorAdd [0, 0, _offset0 - _offsetA];
|
||||
|
||||
_fnc_getDistance = {
|
||||
private "_distance";
|
||||
|
||||
_pX = + _p0;
|
||||
_line = [ATLToASL _p0, ATLToASL _pX];
|
||||
|
||||
_distance = _this;
|
||||
_iteration = _distance;
|
||||
|
||||
while {
|
||||
_iteration > 0.01 / 2
|
||||
} do {
|
||||
_iteration = _iteration / 2;
|
||||
|
||||
_pX = _p0 vectorAdd (_d vectorMultiply _distance);
|
||||
|
||||
_offsetX = getTerrainHeightASL _pX;
|
||||
|
||||
_pX = _pX vectorAdd [0, 0, _offset0 - _offsetX];
|
||||
|
||||
_line set [1, ATLToASL _pX];
|
||||
|
||||
_distance = _distance + (([1, -1] select (lineIntersects (_line + [_unit]) || {terrainIntersectASL _line})) * _iteration);
|
||||
|
||||
if (_distance > _this) exitWith {_distance = _this};
|
||||
};
|
||||
|
||||
_distance
|
||||
};
|
||||
|
||||
_distance = _range call _fnc_getDistance;
|
||||
|
||||
_units = nearestObjects [_unit, ["Man"], _distance];
|
||||
_units deleteAt (_units find _unit);
|
||||
|
||||
_fnc_doesIntersect = {
|
||||
_pX = _p0 vectorAdd (_d vectorMultiply (_this select 1));
|
||||
|
||||
_offsetX = getTerrainHeightASL _pX;
|
||||
|
||||
_pX = _pX vectorAdd [0, 0, _offset0 - _o1];
|
||||
|
||||
count ([_this select 0, "FIRE"] intersect [_p0, _pX]) > 0
|
||||
};
|
||||
|
||||
{
|
||||
if ([_x, _distance] call _fnc_doesIntersect) then {
|
||||
_distance = _distance min (_unit distance _x);
|
||||
};
|
||||
} forEach _units;
|
||||
|
||||
//systemChat str _distance;
|
||||
if (_distance < 0.5) exitWith {};
|
||||
|
||||
_pL = _p0 vectorAdd (_d vectorMultiply _distance);
|
||||
_pL2 = _p0 vectorAdd (_d vectorMultiply (_distance - 0.5));
|
||||
|
||||
_offsetL = getTerrainHeightASL _pL;
|
||||
_offsetL2 = getTerrainHeightASL _pL2;
|
||||
|
||||
_pL = _pL vectorAdd [0, 0, _offset0 - _offsetL];
|
||||
_pL2 = _pL2 vectorAdd [0, 0, _offset0 - _offsetL2];
|
||||
|
||||
drawLine3D [
|
||||
_p0,
|
||||
_pL,
|
||||
[[1,0,0,1], [0,1,0,1]] select _isGreen
|
||||
];
|
||||
|
||||
_spL = worldToScreen _pL; //systemChat str _spL;
|
||||
_size = 2 * (_range - (positionCameraToWorld [0,0,0] distance _pL)) / _range;
|
||||
|
||||
_camPos = positionCameraToWorld [0,0,0.2];
|
||||
if (count ([_unit, "FIRE"] intersect [_camPos, _pL]) > 0) exitWith {};
|
||||
if (count ([ACE_player, "FIRE"] intersect [_camPos, _pL]) > 0) exitWith {};
|
||||
if ( terrainIntersect [_camPos, _pL2]) exitWith {};
|
||||
if (lineIntersects [ATLToASL _camPos, ATLToASL _pL2]) exitWith {};
|
||||
|
||||
drawIcon3D [
|
||||
format ["\a3\weapons_f\acc\data\collimdot_%1_ca.paa", ["red", "green"] select _isGreen],
|
||||
[[1,0.25,0.25,0.5*_brightness], [0.25,1,0.25,0.5*_brightness]] select _isGreen,
|
||||
_pL,
|
||||
_size,
|
||||
_size,
|
||||
45,
|
||||
"",
|
||||
0,
|
||||
0.05
|
||||
];
|
34
addons/laserpointer/functions/fnc_onDraw.sqf
Normal file
34
addons/laserpointer/functions/fnc_onDraw.sqf
Normal file
@ -0,0 +1,34 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
_brightness = 2 - call EFUNC(common,ambientBrightness);
|
||||
_isIR = currentVisionMode ACE_player;
|
||||
|
||||
if (_isIR == 2) exitWith {};
|
||||
|
||||
_isIR = _isIR == 1;
|
||||
|
||||
{
|
||||
_weapon = currentWeapon _x;
|
||||
|
||||
_laser = switch (_weapon) do {
|
||||
case (""): {""};
|
||||
case (primaryWeapon _x): {
|
||||
primaryWeaponItems _x select 1;
|
||||
};
|
||||
case (secondaryWeapon _x): {
|
||||
secondaryWeaponItems _x select 1;
|
||||
};
|
||||
case (handgunWeapon _x): {
|
||||
handgunItems _x select 1;
|
||||
};
|
||||
default {""};
|
||||
};
|
||||
|
||||
_laserID = ["ACE_acc_pointer_red", "ACE_acc_pointer_green"] find _laser;
|
||||
|
||||
if (_laserID > -1 && {_x isFlashlightOn _weapon}) then {
|
||||
[_x, 30, _laserID == 1 || _isIR] call FUNC(drawLaserpoint);
|
||||
};
|
||||
|
||||
} forEach GVAR(nearUnits);
|
1
addons/laserpointer/functions/script_component.hpp
Normal file
1
addons/laserpointer/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\laserpointer\script_component.hpp"
|
12
addons/laserpointer/script_component.hpp
Normal file
12
addons/laserpointer/script_component.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
#define COMPONENT laserpointer
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_LASERPOINTER
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ENABLED_LASERPOINTER
|
||||
#define DEBUG_SETTINGS DEBUG_ENABLED_LASERPOINTER
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
33
addons/laserpointer/stringtable.xml
Normal file
33
addons/laserpointer/stringtable.xml
Normal file
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="Laserpointer">
|
||||
|
||||
<Key ID="STR_ACE_Laserpointer_red">
|
||||
<English>Laser Pointer (red)</English>
|
||||
<German>Laserpointer (rot)</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Laserpointer_green">
|
||||
<English>Laser Pointer (green)</English>
|
||||
<German>Laserpointer (grün)</German>
|
||||
</Key>
|
||||
|
||||
<Key ID="STR_ACE_Laserpointer_Description">
|
||||
<English>Emits visible light. </English>
|
||||
<German>Strahlt sichtbares Licht aus. </German>
|
||||
</Key>
|
||||
|
||||
<Key ID="STR_ACE_Laserpointer_useLaser">
|
||||
<Original><t color='#9cf953'>Use: </t>Turn Laser ON/OFF</Original>
|
||||
<English><t color='#9cf953'>Use: </t>Turn Laser ON/OFF</English>
|
||||
<Czech><t color='#9cf953'>Použití: </t>Zapnout/vypnout laser</Czech>
|
||||
<French><t color='#9cf953'>Utiliser : </t>laser on/off</French>
|
||||
<German><t color='#9cf953'>Benutzen: </t>Laser EIN/AUS</German>
|
||||
<Italian><t color='#9cf953'>Uso: </t>Laser ON/OFF</Italian>
|
||||
<Polish><t color='#9cf953'>Użyj: </t>wł./wył. lasera</Polish>
|
||||
<Portuguese><t color='#9cf953'>Uso: </t>Ativar/Desativar laser</Portuguese>
|
||||
<Russian><t color='#9cf953'>Использовать: </t>вкл/выкл лазер</Russian>
|
||||
<Spanish><t color='#9cf953'>Usar: </t>encender/apagar láser</Spanish>
|
||||
</Key>
|
||||
|
||||
</Package>
|
||||
</Project>
|
1
addons/lockbackpacks/$PBOPREFIX$
Normal file
1
addons/lockbackpacks/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\lockbackpacks
|
14
addons/lockbackpacks/CfgEventHandlers.hpp
Normal file
14
addons/lockbackpacks/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_InventoryOpened_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(onOpenInventory) {
|
||||
clientInventoryOpened = QUOTE(if (_this select 0 == ACE_player) then {_this call FUNC(onOpenInventory)};);
|
||||
};
|
||||
};
|
||||
};
|
31
addons/lockbackpacks/CfgVehicles.hpp
Normal file
31
addons/lockbackpacks/CfgVehicles.hpp
Normal file
@ -0,0 +1,31 @@
|
||||
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class ACE_Equipment {
|
||||
class ACE_LockBackpack {
|
||||
displayName = "$STR_ACE_LockBackpacks_LockBackpack";
|
||||
condition = QUOTE([backpackContainer _player] call FUNC(isBackpack) && {!((backpackContainer _player) getVariable [ARR_2('ACE_LockedInventory', false)])});
|
||||
statement = QUOTE((backpackContainer _player) setVariable [ARR_3('ACE_LockedInventory', true, true)];);
|
||||
showDisabled = 0;
|
||||
priority = 2.5;
|
||||
icon = ""; // @todo
|
||||
hotkey = "L";
|
||||
enableInside = 1;
|
||||
};
|
||||
|
||||
class ACE_UnlockBackpack {
|
||||
displayName = "$STR_ACE_LockBackpacks_UnlockBackpack";
|
||||
condition = QUOTE([backpackContainer _player] call FUNC(isBackpack) && {(backpackContainer _player) getVariable [ARR_2('ACE_LockedInventory', false)]});
|
||||
statement = QUOTE((backpackContainer _player) setVariable [ARR_3('ACE_LockedInventory', false, true)];);
|
||||
showDisabled = 0;
|
||||
priority = 2.5;
|
||||
icon = ""; // @todo
|
||||
hotkey = "L";
|
||||
enableInside = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
5
addons/lockbackpacks/XEH_preInit.sqf
Normal file
5
addons/lockbackpacks/XEH_preInit.sqf
Normal file
@ -0,0 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
PREP(getBackpackAssignedUnit);
|
||||
PREP(isBackpack);
|
||||
PREP(onOpenInventory);
|
16
addons/lockbackpacks/config.cpp
Normal file
16
addons/lockbackpacks/config.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common","ace_interaction"};
|
||||
author[] = {"bux","commy2"};
|
||||
authorUrl = "https://github.com/commy2/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
@ -9,6 +9,7 @@
|
||||
* Return value:
|
||||
* Unit that has the backpack equipped. (Object)
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_backpack", "_unit"];
|
||||
|
||||
@ -16,6 +17,6 @@ _backpack = _this select 0;
|
||||
|
||||
_unit = objNull;
|
||||
{
|
||||
if (backpackContainer _x == _backpack) exitWith {_unit = _x};
|
||||
if (backpackContainer _x == _backpack) exitWith {_unit = _x};
|
||||
} forEach (allUnits + allDeadMen);
|
||||
_unit
|
@ -9,13 +9,14 @@
|
||||
* Return value:
|
||||
* Boolean (Bool)
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_backpack", "_config"];
|
||||
|
||||
_backpack = _this select 0;
|
||||
|
||||
if (typeName _backpack == "OBJECT") then {
|
||||
_backpack = typeOf _backpack;
|
||||
_backpack = typeOf _backpack;
|
||||
};
|
||||
|
||||
_config = configFile >> "CfgVehicles" >> _backpack;
|
47
addons/lockbackpacks/functions/fnc_onOpenInventory.sqf
Normal file
47
addons/lockbackpacks/functions/fnc_onOpenInventory.sqf
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Author: bux, commy2
|
||||
*
|
||||
* Handle the open inventory event. Don't open the inventory if it's locked and display message.
|
||||
*
|
||||
* Argument:
|
||||
* Input from "InventoryOpened" eventhandler
|
||||
*
|
||||
* Return value:
|
||||
* Don't open the inventory dialog? (Bool)
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_target", "_isBackpack", "_isLocked", "_return"];
|
||||
|
||||
_target = _this select 1;
|
||||
|
||||
_isBackpack = [_target] call FUNC(isBackpack);
|
||||
_isLocked = _target getVariable ["ACE_LockedInventory", false];
|
||||
|
||||
_return = false;
|
||||
if (_isBackpack) then {
|
||||
// target is a backpack
|
||||
private "_unit";
|
||||
_unit = [_target] call FUNC(getBackpackAssignedUnit);
|
||||
|
||||
if (!alive _unit || {_unit getVariable ["ACE_isUnconscious", false]}) exitWith {};
|
||||
|
||||
if (_isLocked) then {
|
||||
// target is a locked backpack
|
||||
[format [localize "STR_ACE_LockBackpacks_BackpackLocked", [_unit] call EFUNC(common,getName)]] call EFUNC(common,displayTextStructured);
|
||||
_return = true;
|
||||
} else {
|
||||
// target is a not-locked backpack
|
||||
if (_unit getVariable ["ACE_LockedInventory", false]) then {
|
||||
[localize "STR_ACE_LockBackpacks_InventoryLocked"] call EFUNC(common,displayTextStructured);
|
||||
_return = true;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
// target is not a backpack
|
||||
if (_isLocked) then {
|
||||
[localize "STR_ACE_LockBackpacks_InventoryLocked"] call EFUNC(common,displayTextStructured);
|
||||
_return = true;
|
||||
};
|
||||
};
|
||||
_return
|
1
addons/lockbackpacks/functions/script_component.hpp
Normal file
1
addons/lockbackpacks/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\lockbackpacks\script_component.hpp"
|
12
addons/lockbackpacks/script_component.hpp
Normal file
12
addons/lockbackpacks/script_component.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
#define COMPONENT lockbackpacks
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_LOCKBACKPACKS
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ENABLED_LOCKBACKPACKS
|
||||
#define DEBUG_SETTINGS DEBUG_ENABLED_LOCKBACKPACKS
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Edited with tabler - 2014-12-21 -->
|
||||
<Project name="AGM">
|
||||
<Package name="Backpacks">
|
||||
<Key ID="STR_AGM_Backpacks_BackpackVentralTake">
|
||||
<Project name="ACE">
|
||||
<Package name="LockBackpacks">
|
||||
<Key ID="STR_ACE_LockBackpacks_BackpackVentralTake">
|
||||
<English>Take (Ventral)</English>
|
||||
<German>Aufnehmen (Am Bauch)</German>
|
||||
<Spanish>Coger (Mochila delantera)</Spanish>
|
||||
@ -14,7 +14,7 @@
|
||||
<Portuguese>Pegar (Mochila Ventral)</Portuguese>
|
||||
<Italian>Prendi</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Backpacks_BackpackVentralPut">
|
||||
<Key ID="STR_ACE_LockBackpacks_BackpackVentralPut">
|
||||
<English>Take Off Backpack</English>
|
||||
<German>Rucksack ablegen</German>
|
||||
<Spanish>Dejar mochila</Spanish>
|
||||
@ -26,7 +26,7 @@
|
||||
<Portuguese>Retirar Mochila</Portuguese>
|
||||
<Italian>Togliere zaino</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Backpacks_LockBackpack">
|
||||
<Key ID="STR_ACE_LockBackpacks_LockBackpack">
|
||||
<English>Lock Backpack</English>
|
||||
<German>Rucksack verschließen</German>
|
||||
<French>Verrouiller le sac à dos</French>
|
||||
@ -36,7 +36,7 @@
|
||||
<Hungarian>Táska zárolása</Hungarian>
|
||||
<Russian>Запереть рюкзак</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Backpacks_UnlockBackpack">
|
||||
<Key ID="STR_ACE_LockBackpacks_UnlockBackpack">
|
||||
<English>Unlock Backpack</English>
|
||||
<German>Rucksack aufschließen</German>
|
||||
<French>Déverouiller le sac à dos</French>
|
||||
@ -46,7 +46,7 @@
|
||||
<Hungarian>Táska nyitása</Hungarian>
|
||||
<Russian>Отпереть рюкзак</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Backpacks_BackpackLocked">
|
||||
<Key ID="STR_ACE_LockBackpacks_BackpackLocked">
|
||||
<English>Backpack of %1 is locked</English>
|
||||
<German>Der Rucksack von %1 ist verschlossen</German>
|
||||
<French>Le sac à dos de %1 est verroullé</French>
|
||||
@ -56,7 +56,7 @@
|
||||
<Hungarian>%1 táskája zárolva</Hungarian>
|
||||
<Russian>Рюкзак %1 заперт</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_AGM_Backpacks_InventoryLocked">
|
||||
<Key ID="STR_ACE_LockBackpacks_InventoryLocked">
|
||||
<English>Inventory is locked</English>
|
||||
<German>Das Inventar ist verschlossen</German>
|
||||
<French>L'inventaire est verrouillé</French>
|
1
addons/map/$PBOPREFIX$
Normal file
1
addons/map/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\Addons\map
|
12
addons/map/CfgEventHandlers.hpp
Normal file
12
addons/map/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
|
||||
serverInit = QUOTE( call COMPILE_FILE(XEH_preInitServer) );
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
clientInit = QUOTE( call COMPILE_FILE(XEH_postInitClient) );
|
||||
};
|
||||
};
|
67
addons/map/CfgMarkers.hpp
Normal file
67
addons/map/CfgMarkers.hpp
Normal file
@ -0,0 +1,67 @@
|
||||
// MARKERS
|
||||
class CfgMarkers {
|
||||
class Flag;
|
||||
|
||||
// Reenable NATO symbols ...
|
||||
class b_unknown: Flag {scope = 2;};
|
||||
|
||||
// ... and disable all the useless ones
|
||||
// If you think that some of these are needed, create an issue; But until
|
||||
// there's a better way to place markers, there should be only the most
|
||||
// important markers here.
|
||||
// Keep in mind that all of these can still be placed in the editor.
|
||||
class b_hq: b_unknown {scope = 1;};
|
||||
class b_installation: b_unknown {scope = 1;};
|
||||
class b_maint: b_unknown {scope = 1;};
|
||||
class b_med: b_unknown {scope = 1;};
|
||||
class b_service: b_unknown {scope = 1;};
|
||||
class b_support: b_unknown {scope = 1;};
|
||||
|
||||
class n_unknown: b_unknown {};
|
||||
class n_hq: n_unknown {scope = 1;};
|
||||
class n_installation: n_unknown {scope = 1;};
|
||||
class u_installation: n_unknown {scope = 1;}; // i have no idea...
|
||||
class n_maint: n_unknown {scope = 1;};
|
||||
class n_med: n_unknown {scope = 1;};
|
||||
class n_service: n_unknown {scope = 1;};
|
||||
class n_support: n_unknown {scope = 1;};
|
||||
|
||||
class o_unknown: b_unknown {};
|
||||
class o_hq: o_unknown {scope = 1;};
|
||||
class o_installation: o_unknown {scope = 1;};
|
||||
class o_maint: o_unknown {scope = 1;};
|
||||
class o_med: o_unknown {scope = 1;};
|
||||
class o_service: o_unknown {scope = 1;};
|
||||
class o_support: o_unknown {scope = 1;};
|
||||
|
||||
// disable all civy markers (harbor etc.)
|
||||
class c_unknown: b_unknown {scope = 1;};
|
||||
|
||||
// disable quantity indicators (fire team/squad/platoon ...)
|
||||
class group_0: b_unknown {scope = 1;};
|
||||
|
||||
|
||||
class ACE_MapToolFixed {
|
||||
name = "MapToolFixed";
|
||||
icon = PATHTOF(data\mapToolFixed.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
|
||||
class ACE_MapToolRotatingNormal {
|
||||
name = "MapToolRotating";
|
||||
icon = PATHTOF(data\mapToolRotatingNormal.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
|
||||
class ACE_MapToolRotatingSmall {
|
||||
name = "MapToolRotating";
|
||||
icon = PATHTOF(data\mapToolRotatingSmall.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
};
|
159
addons/map/CfgVehicles.hpp
Normal file
159
addons/map/CfgVehicles.hpp
Normal file
@ -0,0 +1,159 @@
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
|
||||
class ACE_MapTools {
|
||||
displayName = "$STR_ACE_Map_MapTools_Menu";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) || {call FUNC(canUseMapGPS)}));
|
||||
statement = "";
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 0;
|
||||
priority = 100;
|
||||
subMenu[] = {"ACE_MapTools", 1};
|
||||
enableInside = 1;
|
||||
|
||||
class ACE_MapToolsHide {
|
||||
displayName = "$STR_ACE_Map_MapToolsHide";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 0; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 5;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsShowNormal {
|
||||
displayName = "$STR_ACE_Map_MapToolsShowNormal";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 1}));
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 1; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 4;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsShowSmall {
|
||||
displayName = "$STR_ACE_Map_MapToolsShowSmall";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 2}));
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 2; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 3;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsAlignNorth {
|
||||
displayName = "$STR_ACE_Map_MapToolsAlignNorth";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
||||
statement = QUOTE(GVAR(mapTool_angle) = 0; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsAlignCompass {
|
||||
displayName = "$STR_ACE_Map_MapToolsAlignCompass";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0} && {('ItemCompass' in assigneditems ACE_player) || {'ItemCompass' in assigneditems ACE_player}}));
|
||||
statement = QUOTE(GVAR(mapTool_angle) = getDir ACE_player; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapGpsShow {
|
||||
displayName = "$STR_ACE_Map_MapGpsShow";
|
||||
condition = QUOTE((call FUNC(canUseMapGPS) && {!GVAR(mapGpsShow)}));
|
||||
statement = QUOTE(GVAR(mapGpsShow) = true; [GVAR(mapGpsShow)] call FUNC(openMapGps));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapGpsHide {
|
||||
displayName = "$STR_ACE_Map_MapGpsHide";
|
||||
condition = QUOTE((call FUNC(canUseMapGPS) && {GVAR(mapGpsShow)}));
|
||||
statement = QUOTE(GVAR(mapGpsShow) = false; [GVAR(mapGpsShow)] call FUNC(openMapGps));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
enableInside = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Actions {
|
||||
class ACE_CopyMap {
|
||||
displayName = "$STR_ACE_Map_CopyMap";
|
||||
condition = QUOTE(([_target] call EFUNC(common,isPlayer) && {'ItemMap' in assigneditems _player} && {'ACE_MapTools' in items _player} && {'ItemMap' in assignedItems _target}));
|
||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(copyMapStart));
|
||||
showDisabled = 0;
|
||||
priority = -1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class NATO_Box_Base;
|
||||
class EAST_Box_Base;
|
||||
class IND_Box_Base;
|
||||
class FIA_Box_Base_F;
|
||||
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Box_East_Support_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Box_FIA_Support_F: FIA_Box_Base_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Module_F;
|
||||
class ACE_ModuleBlueForceTracking: Module_F {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
category = "ACE";
|
||||
displayName = "Blue Force Tracking";
|
||||
function = QFUNC(blueForceTrackingModule);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = PATHTOF(UI\IconBFTracking_ca.paa);
|
||||
class Arguments {
|
||||
class Interval {
|
||||
displayName = "Interval";
|
||||
description = "How often the markers should be refreshed (in seconds)";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class HideAiGroups {
|
||||
displayName = "Hide AI groups?";
|
||||
description = "Hide markers for 'AI only' groups?";
|
||||
typeName = "BOOL";
|
||||
class values {
|
||||
class Yes { name = "Yes"; value = 1; };
|
||||
class No { name = "No"; value = 0; default = 1; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
15
addons/map/CfgWeapons.hpp
Normal file
15
addons/map/CfgWeapons.hpp
Normal file
@ -0,0 +1,15 @@
|
||||
class CfgWeapons {
|
||||
class ACE_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
|
||||
class ACE_MapTools: ACE_ItemCore {
|
||||
displayName = "$STR_ACE_MapTools_Name";
|
||||
descriptionShort = "$STR_ACE_MapTools_Description";
|
||||
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||
picture = PATHTOF(UI\maptool_item.paa);
|
||||
scope = 2;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
};
|
||||
};
|
||||
};
|
93
addons/map/MapControls.hpp
Normal file
93
addons/map/MapControls.hpp
Normal file
@ -0,0 +1,93 @@
|
||||
class controls {
|
||||
class ButtonPlayer: RscActiveText {
|
||||
text = "";
|
||||
w = 0;
|
||||
h = 0;
|
||||
sizeEx = 0;
|
||||
onButtonClick = "";
|
||||
};
|
||||
class CA_PlayerName: RscText {
|
||||
x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfilePicture: RscPicture {
|
||||
x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfileBackground: RscText {
|
||||
x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class Separator1: RscPicture {
|
||||
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ColorBlack: RscButton {
|
||||
idc = 36732;
|
||||
x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.2,0.2,1};
|
||||
colorBackgroundActive[] = {0,0,0,1};
|
||||
colorFocused[] = {0,0,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorBlack""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),"ColorBlack")]);
|
||||
};
|
||||
class ColorRed: RscButton {
|
||||
idc = 36733;
|
||||
x = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.2,0.2,1};
|
||||
colorBackgroundActive[] = {1,0,0,1};
|
||||
colorFocused[] = {1,0,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorRed""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),QUOTE(ColorRed))]);
|
||||
};
|
||||
class ColorGreen: RscButton {
|
||||
idc = 36734;
|
||||
x = "0.6 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.8,0.2,1};
|
||||
colorBackgroundActive[] = {0,1,0,1};
|
||||
colorFocused[] = {0,1,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorGreen""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),"ColorGreen")]);
|
||||
};
|
||||
class ColorBlue: RscButton {
|
||||
idc = 36735;
|
||||
x = "0.9 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.2,0.8,1};
|
||||
colorBackgroundActive[] = {0,0,1,1};
|
||||
colorFocused[] = {0,0,1,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorBlue""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorBlue")]);
|
||||
};
|
||||
class ColorYellow: RscButton {
|
||||
idc = 36736;
|
||||
x = "1.2 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.8,0.2,1};
|
||||
colorBackgroundActive[] = {1,1,0,1};
|
||||
colorFocused[] = {1,1,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorYellow""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorYellow")]);
|
||||
};
|
||||
class ColorWhite: RscButton {
|
||||
idc = 36737;
|
||||
x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.8,0.8,1};
|
||||
colorBackgroundActive[] = {1,1,1,1};
|
||||
colorFocused[] = {1,1,1,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorWhite""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorWhite")]);
|
||||
};
|
||||
};
|
@ -13,13 +13,14 @@
|
||||
#define Y_gps safeZoneY + safeZoneH - 1.2 * H_gps
|
||||
|
||||
class RscTitles {
|
||||
class RscAGM_MapGps {
|
||||
class RscACE_MapGps {
|
||||
idd = 9855;
|
||||
movingEnable = 1;
|
||||
duration = 3600;
|
||||
fadein = 0;
|
||||
fadeout = 0;
|
||||
onLoad = "uiNamespace setVariable ['AGM_Map_mapGpsDisplay', _this select 0];";
|
||||
// onLoad = QUOTE(uiNamespace setVariable [ARR_2(QGVAR(ui_mapGpsDisplay), _this select 0)];);
|
||||
onLoad = "uiNamespace setVariable ['ACE_map_ui_mapGpsDisplay', _this select 0];"; //@todo cbaify this
|
||||
//onUnLoad = "_this call onRscLoad";
|
||||
class controls {
|
||||
class back:RscPicture {
|
||||
@ -27,7 +28,7 @@ class RscTitles {
|
||||
y = Y_gps;
|
||||
w = W_gps;
|
||||
h = H_gps;
|
||||
text = "\AGM_Map\UI\mapGps.paa";
|
||||
text = PATHTOF(UI\mapGps.paa);
|
||||
colorBackground[] = {1, 1, 1, 1};
|
||||
};
|
||||
class heading: RscText{
|
71
addons/map/XEH_postInitClient.sqf
Normal file
71
addons/map/XEH_postInitClient.sqf
Normal file
@ -0,0 +1,71 @@
|
||||
// by CAA-Picard
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith{};
|
||||
|
||||
// Init variables
|
||||
GVAR(mapVisableLastFrame) = false;
|
||||
GVAR(mapGpsShow) = true;
|
||||
|
||||
GVAR(mapTool_Shown) = 0;
|
||||
GVAR(mapTool_pos) = [0,0];
|
||||
GVAR(mapTool_angle) = 0;
|
||||
GVAR(mapTool_isDragging) = false;
|
||||
GVAR(mapTool_isRotating) = false;
|
||||
|
||||
GVAR(drawing_isDrawing) = false;
|
||||
GVAR(drawing_tempLineMarker) = [];
|
||||
GVAR(drawing_lineMarkers) = [];
|
||||
GVAR(drawing_drawColor) = "ColorBlack";
|
||||
GVAR(drawing_controls) = [36732, 36733, 36734, 36735, 36736, 36737];
|
||||
|
||||
//Probably need this spawn, because CBA_fnc_addPerFrameHandler doesn't work durring breifing.
|
||||
[] spawn {
|
||||
_fnc_installMapEvents = {
|
||||
_d = _this;
|
||||
diag_log format ["Installing EH in display %1", _d];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseMoving", {_this call FUNC(handleMouseMove);}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonDown", {[1, _this] call FUNC(handleMouseButton);}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["MouseButtonUp", {[0, _this] call FUNC(handleMouseButton)}];
|
||||
((finddisplay _d) displayctrl 51) ctrlAddEventHandler ["Draw", {[] call FUNC(updateMapToolMarkers);}];
|
||||
(finddisplay _d) displayAddEventHandler ["KeyDown", {_this call FUNC(handleKeyDown);}];
|
||||
};
|
||||
|
||||
// Wait until the briefing map is detected
|
||||
// display = 37 for SP
|
||||
// display = 52 for host server on MP;
|
||||
// display = 53 for MP clients)
|
||||
waitUntil {(!isNull findDisplay 37) || (!isNull findDisplay 52) || (!isNull findDisplay 53) || (!isNull findDisplay 12)};
|
||||
|
||||
if (isNull findDisplay 12) then {
|
||||
// Install event handlers on the map control of the briefing screen (control = 51)
|
||||
GVAR(drawing_syncMarkers) = true;
|
||||
if (!isNull findDisplay 52) then {
|
||||
52 call _fnc_installMapEvents;
|
||||
} else {
|
||||
if (!isNull findDisplay 53) then {
|
||||
53 call _fnc_installMapEvents;
|
||||
} else {
|
||||
37 call _fnc_installMapEvents;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
// Briefing screen was skipped; the player is JIP, create the markers defined during the briefing
|
||||
GVAR(drawing_syncMarkers) = false;
|
||||
{
|
||||
_x call FUNC(addLineMarker);
|
||||
} forEach GVAR(drawing_serverLineMarkers);
|
||||
};
|
||||
|
||||
// Wait until the main map display is detected (display = 12)
|
||||
waitUntil { !isNull findDisplay 12 };
|
||||
// Install event handlers on the map control and display (control = 51)
|
||||
GVAR(drawing_syncMarkers) = false;
|
||||
12 call _fnc_installMapEvents;
|
||||
|
||||
// Update the size and rotation of map tools
|
||||
[] call FUNC(updateMapToolMarkers);
|
||||
|
||||
[FUNC(mapStateUpdater), 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
31
addons/map/XEH_preInit.sqf
Normal file
31
addons/map/XEH_preInit.sqf
Normal file
@ -0,0 +1,31 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
PREP(addLineMarker);
|
||||
PREP(blueForceTrackingModule);
|
||||
PREP(blueForceTrackingUpdate);
|
||||
PREP(calculateMapScale);
|
||||
PREP(cancelDrawing);
|
||||
PREP(canDraw);
|
||||
PREP(canUseMapTools);
|
||||
PREP(canUseMapGPS);
|
||||
PREP(copyMapReceiveMarkers);
|
||||
PREP(copyMapRemoteSend);
|
||||
PREP(copyMapStart);
|
||||
PREP(handleKeyDown);
|
||||
PREP(handleMouseButton);
|
||||
PREP(handleMouseMove);
|
||||
PREP(handleMouseZChanged);
|
||||
PREP(isInsideMapTool);
|
||||
PREP(mapStateUpdater);
|
||||
PREP(openMapGps);
|
||||
PREP(openMapGpsUpdate);
|
||||
PREP(removeLineMarker);
|
||||
PREP(updateMapToolMarkers);
|
||||
PREP(updateLineMarker);
|
||||
|
||||
//Add Event Handlers:
|
||||
["drawing_removeLineMarker", FUNC(removeLineMarker) ] call EFUNC(common,addEventHandler);
|
||||
["drawing_addLineMarker", FUNC(addLineMarker) ] call EFUNC(common,addEventHandler);
|
||||
|
||||
["drawing_requestMarkers", FUNC(copyMapRemoteSend) ] call EFUNC(common,addEventHandler);
|
||||
["drawing_sendbackMarkers", FUNC(copyMapReceiveMarkers) ] call EFUNC(common,addEventHandler);
|
6
addons/map/XEH_preInitServer.sqf
Normal file
6
addons/map/XEH_preInitServer.sqf
Normal file
@ -0,0 +1,6 @@
|
||||
// by CAA-Picard
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(drawing_serverLineMarkers) = [];
|
||||
publicVariable QGVAR(drawing_serverLineMarkers);
|
145
addons/map/config.cpp
Normal file
145
addons/map/config.cpp
Normal file
@ -0,0 +1,145 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {"ACE_MapTools"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common", "ace_interaction"};
|
||||
author[] = {"KoffeinFlummi","CAA-Picard"};
|
||||
authorUrl = "https://github.com/KoffeinFlummi/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
class RscControlsGroup;
|
||||
class RscActiveText;
|
||||
class RscPicture;
|
||||
class RscText;
|
||||
class RscObject;
|
||||
class RscButton;
|
||||
class RscButtonMenuOK;
|
||||
class RscButtonMenuCancel;
|
||||
class RscButtonMenu;
|
||||
class RscEdit;
|
||||
|
||||
class ACE_Parameters_Numeric {
|
||||
GVAR(BFT_Interval) = 1;
|
||||
};
|
||||
class ACE_Parameters_Boolean {
|
||||
GVAR(EveryoneCanDrawOnBriefing) = 1;
|
||||
GVAR(BFT_Enabled) = 0;
|
||||
GVAR(BFT_HideAiGroups) = 0;
|
||||
};
|
||||
|
||||
#include "MapGpsUI.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgMarkers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
|
||||
|
||||
class RscMapControl {
|
||||
sizeExGrid = 0.032;
|
||||
};
|
||||
|
||||
// REGULAR MAP
|
||||
class RscDisplayMainMap {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// DIARY
|
||||
class RscDisplayDiary {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
class controls {
|
||||
class ButtonPlayer: RscActiveText {
|
||||
text = "";
|
||||
w = 0;
|
||||
h = 0;
|
||||
sizeEx = 0;
|
||||
onButtonClick = "";
|
||||
};
|
||||
class CA_PlayerName: RscText {
|
||||
x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfilePicture: RscPicture {
|
||||
x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfileBackground: RscText {
|
||||
x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class Separator1: RscPicture {
|
||||
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
// BRIEFING SCREEN
|
||||
class RscDisplayGetReady: RscDisplayMainMap {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
class RscDisplayClientGetReady: RscDisplayGetReady {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
class RscDisplayServerGetReady: RscDisplayGetReady {
|
||||
// get rid of the "center to player position" - button (as it works even on elite)
|
||||
class controls {
|
||||
class TopRight: RscControlsGroup {
|
||||
#include "MapControls.hpp"
|
||||
};
|
||||
};
|
||||
// scale up the compass
|
||||
class objects {
|
||||
class Compass: RscObject {
|
||||
scale = 0.7;
|
||||
zoomDuration = 0;
|
||||
};
|
||||
};
|
||||
};
|
@ -13,10 +13,12 @@
|
||||
* Return
|
||||
*/
|
||||
|
||||
_name = _this select 0;
|
||||
_startPos = _this select 1;
|
||||
_difPos = (_this select 2) vectorDiff _startPos ;
|
||||
_color = _this select 3;
|
||||
#include "script_component.hpp"
|
||||
|
||||
_name = _this select 0;
|
||||
_startPos = _this select 1;
|
||||
_difPos = (_this select 2) vectorDiff _startPos ;
|
||||
_color = _this select 3;
|
||||
|
||||
_marker = createMarkerLocal [_name, _startPos];
|
||||
_name setMarkerShapeLocal "RECTANGLE";
|
||||
@ -32,9 +34,9 @@ if (_mag > 0) then {
|
||||
_name setMarkerDirLocal 0;
|
||||
};
|
||||
|
||||
AGM_Map_lineMarkers pushBack (+_this);
|
||||
GVAR(drawing_lineMarkers) pushBack (+_this);
|
||||
|
||||
if (isServer && AGM_Map_syncMarkers) then {
|
||||
AGM_Map_serverLineMarkers pushBack (+_this);
|
||||
publicVariable "AGM_Map_serverLineMarkers";
|
||||
if (isServer && GVAR(drawing_syncMarkers)) then {
|
||||
GVAR(drawing_serverLineMarkers) pushBack (+_this);
|
||||
publicVariable QGVAR(drawing_serverLineMarkers);
|
||||
};
|
32
addons/map/functions/fnc_blueForceTrackingModule.sqf
Normal file
32
addons/map/functions/fnc_blueForceTrackingModule.sqf
Normal file
@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Author: KoffeinFlummi
|
||||
*
|
||||
* Initializes the blue force tracking module.
|
||||
*
|
||||
* Arguments:
|
||||
* Whatever the module provides. (I dunno.)
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
if !(hasInterface) exitWith {};
|
||||
|
||||
_logic = _this select 0;
|
||||
_units = _this select 1;
|
||||
_activated = _this select 2;
|
||||
|
||||
if !(_activated) exitWith {};
|
||||
|
||||
GVAR(BFT_Enabled) = true;
|
||||
[_logic, QGVAR(BFT_Interval), "Interval"] call EFUNC(common,readNumericParameterFromModule);
|
||||
[_logic, QGVAR(BFT_HideAiGroups), "HideAiGroups"] call EFUNC(common,readBooleanParameterFromModule);
|
||||
|
||||
diag_log text "[ACE]: Blue Force Tracking Module initialized.";
|
||||
TRACE_2("[ACE]: Blue Force Tracking Module initialized.",GVAR(BFT_Interval), GVAR(BFT_HideAiGroups));
|
||||
|
||||
//start BFT:
|
||||
GVAR(BFT_markers) = [];
|
||||
[FUNC(blueForceTrackingUpdate), GVAR(BFT_Interval), []] call CBA_fnc_addPerFrameHandler;
|
38
addons/map/functions/fnc_blueForceTrackingUpdate.sqf
Normal file
38
addons/map/functions/fnc_blueForceTrackingUpdate.sqf
Normal file
@ -0,0 +1,38 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
// Delete last set of markers (always)
|
||||
{
|
||||
deleteMarkerLocal _x;
|
||||
} forEach GVAR(BFT_markers);
|
||||
|
||||
|
||||
if (GVAR(BFT_Enabled) and {(!isNil "ACE_player") and {alive ACE_player}}) then {
|
||||
|
||||
_groupsToDrawMarkers = [];
|
||||
_playerSide = call EFUNC(common,playerSide);
|
||||
|
||||
if (GVAR(BFT_HideAiGroups)) then {
|
||||
_groupsToDrawMarkers = [allGroups, {side _this == _playerSide}] call EFUNC(common,filter);
|
||||
} else {
|
||||
_groupsToDrawMarkers = [allGroups, {
|
||||
_anyPlayers = {
|
||||
[_x] call EFUNC(common,isPlayer);
|
||||
} count units _this;
|
||||
(side _this == _playerSide) && _anyPlayers > 0
|
||||
}] call EFUNC(common,filter);
|
||||
};
|
||||
|
||||
|
||||
{
|
||||
_markerType = [_x] call EFUNC(common,getMarkerType);
|
||||
|
||||
_colour = format ["Color%1", side _x];
|
||||
|
||||
_marker = createMarkerLocal [format ["ACE_BFT_%1", _i], [(getPos leader _x) select 0, (getPos leader _x) select 1]];
|
||||
_marker setMarkerTypeLocal _markerType;
|
||||
_marker setMarkerColorLocal _colour;
|
||||
_marker setMarkerTextLocal (groupID _x);
|
||||
|
||||
GVAR(BFT_markers) pushBack _marker;
|
||||
} forEach _groupsToDrawMarkers;
|
||||
};
|
@ -10,6 +10,8 @@
|
||||
* Return
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
_pos = ((finddisplay 12) displayctrl 51) ctrlMapScreenToWorld [0.5, 0.5];
|
||||
_screenOffset = ((finddisplay 12) displayctrl 51) posWorldToScreen [(_pos select 0) + 100, (_pos select 1)];
|
||||
|
6
addons/map/functions/fnc_canDraw.sqf
Normal file
6
addons/map/functions/fnc_canDraw.sqf
Normal file
@ -0,0 +1,6 @@
|
||||
// by CAA-Picard
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
(missionNameSpace getVariable [QGVAR(drawing_syncMarkers), true] && {GVAR(EveryoneCanDrawOnBriefing)}) ||
|
||||
{(!isNull ACE_player) && {"ACE_MapTools" in items ACE_player}}
|
7
addons/map/functions/fnc_canUseMapGPS.sqf
Normal file
7
addons/map/functions/fnc_canUseMapGPS.sqf
Normal file
@ -0,0 +1,7 @@
|
||||
// by CAA-Picard
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
visibleMap &&
|
||||
{alive ACE_player} &&
|
||||
{"ItemGPS" in (assignedItems ACE_player)}
|
10
addons/map/functions/fnc_canUseMapTools.sqf
Normal file
10
addons/map/functions/fnc_canUseMapTools.sqf
Normal file
@ -0,0 +1,10 @@
|
||||
// by CAA-Picard
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
visibleMap &&
|
||||
{alive ACE_player} &&
|
||||
{"ItemMap" in (assignedItems ACE_player)} &&
|
||||
{"ACE_MapTools" in (items ACE_player)} &&
|
||||
{!GVAR(mapTool_isDragging)} &&
|
||||
{!GVAR(mapTool_isRotating)}
|
19
addons/map/functions/fnc_cancelDrawing.sqf
Normal file
19
addons/map/functions/fnc_cancelDrawing.sqf
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Cancel the drawing of the current line marker
|
||||
*
|
||||
* Argument:
|
||||
* None
|
||||
*
|
||||
* Return value:
|
||||
* Nothing
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(drawing_isDrawing) = false;
|
||||
if (count GVAR(drawing_tempLineMarker) > 0) then {
|
||||
deleteMarkerLocal (GVAR(drawing_tempLineMarker) select 0);
|
||||
};
|
||||
GVAR(drawing_tempLineMarker) = [];
|
23
addons/map/functions/fnc_copyMapReceiveMarkers.sqf
Normal file
23
addons/map/functions/fnc_copyMapReceiveMarkers.sqf
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Copy recieved markers to map
|
||||
*
|
||||
* Argument:
|
||||
* 0: Array of markers to copy (Array)
|
||||
*
|
||||
* Return value:
|
||||
* Return
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_lineMarkers);
|
||||
|
||||
{
|
||||
_marker = _x;
|
||||
//Add marker if we don't already have it
|
||||
if (({(_x select 0) == (_marker select 0)} count GVAR(drawing_lineMarkers)) == 0) then {
|
||||
_marker call FUNC(addLineMarker);
|
||||
};
|
||||
} forEach _lineMarkers;
|
17
addons/map/functions/fnc_copyMapRemoteSend.sqf
Normal file
17
addons/map/functions/fnc_copyMapRemoteSend.sqf
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Send Map markers to other player
|
||||
*
|
||||
* Argument:
|
||||
* 0: Target player (Unit)
|
||||
*
|
||||
* Return value:
|
||||
* Return
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_requester);
|
||||
|
||||
["drawing_sendbackMarkers", _requester, [GVAR(drawing_lineMarkers)]] call EFUNC(common,targetEvent);
|
23
addons/map/functions/fnc_copyMapStart.sqf
Normal file
23
addons/map/functions/fnc_copyMapStart.sqf
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Send request to remote player
|
||||
*
|
||||
* Argument:
|
||||
* 0: Player (Unit)
|
||||
* 0: Target player (Unit)
|
||||
*
|
||||
* Code Chain:
|
||||
* START: copyMapStart: triggers event drawing_requestMarkers on remote
|
||||
* handeled by: copyMapRemoteSend: triggers event "drawing_sendbackMarkers" on origin
|
||||
* handeled by: copyMapReceiveMarkers
|
||||
*
|
||||
* Return value:
|
||||
* Return
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_player,_target);
|
||||
|
||||
["drawing_requestMarkers", _target, [_player]] call EFUNC(common,targetEvent);
|
@ -14,6 +14,8 @@
|
||||
* Boolean, true if event was handled
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_dir", "_params", "_control", "_button", "_screenPos", "_shiftKey", "_ctrlKey", "_handled", "_pos"];
|
||||
|
||||
_display = _this select 0;
|
||||
@ -28,21 +30,21 @@ _handled = false;
|
||||
|
||||
// If pressed Esc while drawing
|
||||
if (_code == DIK_ESCAPE) exitWith {
|
||||
if (AGM_Map_drawing) then {
|
||||
call AGM_Map_fnc_cancelDrawing;
|
||||
if (GVAR(drawing_isDrawing)) then {
|
||||
call FUNC(cancelDrawing);
|
||||
_handled = true;
|
||||
};
|
||||
};
|
||||
|
||||
if (_code == DIK_DELETE) exitWith {
|
||||
if (AGM_Map_drawing) then {
|
||||
call AGM_Map_fnc_cancelDrawing;
|
||||
if (GVAR(drawing_isDrawing)) then {
|
||||
call FUNC(cancelDrawing);
|
||||
_handled = true;
|
||||
} else {
|
||||
|
||||
// Check if a line marker needs to be deleted
|
||||
{
|
||||
_relPos = AGM_Map_mousePos vectorDiff (_x select 1);
|
||||
_relPos = GVAR(mousePosition) vectorDiff (_x select 1);
|
||||
_diffVector = (_x select 2) vectorDiff (_x select 1);
|
||||
_magDiffVector = vectorMagnitude _diffVector;
|
||||
if (_magDiffVector == 0) then {
|
||||
@ -57,16 +59,15 @@ if (_code == DIK_DELETE) exitWith {
|
||||
_lambdaTrasAbs = vectorMagnitude (_relPos vectorDiff (_diffVector vectorMultiply _lambdaLong));
|
||||
if (_lambdaLong >= 0 && _lambdaLong <= _magDiffVector && _lambdaTrasAbs <= 5) exitWith {
|
||||
// Delete the line marker
|
||||
if (AGM_Map_syncMarkers) then {
|
||||
[[_x select 0], "AGM_Map_fnc_removeLineMarker", 2] call AGM_Core_fnc_execRemoteFnc;
|
||||
if (GVAR(drawing_syncMarkers)) then {
|
||||
["drawing_removeLineMarker", [_x select 0]] call EFUNC(common,globalEvent);
|
||||
} else {
|
||||
deleteMarkerLocal (_x select 0);
|
||||
AGM_Map_lineMarkers = AGM_Map_lineMarkers - [_x];
|
||||
GVAR(drawing_lineMarkers) = GVAR(drawing_lineMarkers) - [_x];
|
||||
};
|
||||
_handled = true;
|
||||
|
||||
};
|
||||
} forEach AGM_Map_lineMarkers;
|
||||
} forEach GVAR(drawing_lineMarkers);
|
||||
};
|
||||
};
|
||||
|
102
addons/map/functions/fnc_handleMouseButton.sqf
Normal file
102
addons/map/functions/fnc_handleMouseButton.sqf
Normal file
@ -0,0 +1,102 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Handle mouse buttons.
|
||||
*
|
||||
* Argument:
|
||||
* 0: 1 if mouse down down, 0 if mouse button up (Number)
|
||||
* 1: Parameters of the mouse button event
|
||||
*
|
||||
* Return value:
|
||||
* Boolean, true if event was handled
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_dir", "_params", "_control", "_button", "_screenPos", "_shiftKey", "_ctrlKey", "_handled", "_pos"];
|
||||
|
||||
_dir = _this select 0;
|
||||
_params = _this select 1;
|
||||
_control = _params select 0;
|
||||
_button = _params select 1;
|
||||
_screenPos = [_params select 2, _params select 3];
|
||||
_shiftKey = _params select 4;
|
||||
_ctrlKey = _params select 5;
|
||||
_altKey = _params select 6;
|
||||
_handled = false;
|
||||
|
||||
|
||||
// If it's not a left button event, exit
|
||||
if (_button != 0) exitWith {};
|
||||
|
||||
// If releasing
|
||||
if (_dir != 1 && (GVAR(mapTool_isDragging) or GVAR(mapTool_isRotating))) exitWith {
|
||||
GVAR(mapTool_isDragging) = false;
|
||||
GVAR(mapTool_isRotating) = false;
|
||||
_handled = true;
|
||||
_handled
|
||||
};
|
||||
|
||||
// If clicking
|
||||
if (_dir == 1) exitWith {
|
||||
|
||||
if !(call FUNC(canDraw)) exitWith {_handled = false;};
|
||||
|
||||
// Transform mouse screen position to coordinates
|
||||
_pos = _control ctrlMapScreenToWorld _screenPos;
|
||||
_pos set [count _pos, 0];
|
||||
|
||||
if (GVAR(drawing_isDrawing)) exitWith {
|
||||
// Already drawing -> Add tempLineMarker to permanent list
|
||||
if (GVAR(drawing_syncMarkers)) then {
|
||||
deleteMarkerLocal (GVAR(drawing_tempLineMarker) select 0);
|
||||
// [GVAR(drawing_tempLineMarker), "FUNC(addLineMarker)", 2] call EFUNC(common,execRemoteFnc);
|
||||
["drawing_addLineMarker", GVAR(drawing_tempLineMarker)] call EFUNC(common,globalEvent);
|
||||
// Log who drew on the briefing screen
|
||||
(text format ["[ACE] Server: Player %1 drew on the briefing screen", name player]) call EFUNC(common,serverLog);
|
||||
} else {
|
||||
GVAR(drawing_tempLineMarker) call FUNC(updateLineMarker);
|
||||
GVAR(drawing_lineMarkers) pushBack (+GVAR(drawing_tempLineMarker));
|
||||
};
|
||||
GVAR(drawing_tempLineMarker) = [];
|
||||
GVAR(drawing_isDrawing) = false;
|
||||
_handled = true;
|
||||
};
|
||||
|
||||
if (_altKey) exitWith {
|
||||
// Start drawing
|
||||
GVAR(drawing_isDrawing) = true;
|
||||
// Create tempLineMarker
|
||||
_gui = format ["%1%2%3%4", random (100), random (100), random (100), random (100)];
|
||||
GVAR(drawing_tempLineMarker) = [_gui, + _pos, + _pos, GVAR(drawing_drawColor)];
|
||||
_marker = createMarkerLocal [_gui, [0,0]];
|
||||
GVAR(drawing_tempLineMarker) call FUNC(updateLineMarker);
|
||||
_handled = true;
|
||||
};
|
||||
|
||||
GVAR(mapTool_isDragging) = false;
|
||||
GVAR(mapTool_isRotating) = false;
|
||||
|
||||
// If no map tool marker then exit
|
||||
if (isNil QGVAR(mapTool_markerRotatingFixed)) exitWith {_handled = false;};
|
||||
|
||||
// Check if clicking the maptool
|
||||
if (_pos call FUNC(isInsideMapTool)) exitWith {
|
||||
// Store data for dragging
|
||||
GVAR(mapTool_startPos) = + GVAR(mapTool_pos);
|
||||
GVAR(mapTool_startDragPos) = + _pos;
|
||||
if (_ctrlKey) then {
|
||||
// Store data for rotating
|
||||
GVAR(mapTool_startAngle) = + GVAR(mapTool_angle);
|
||||
GVAR(mapTool_startDragAngle) = (180 + ((GVAR(mapTool_startDragPos) select 0) - (GVAR(mapTool_startPos) select 0)) atan2 ((GVAR(mapTool_startDragPos) select 1) - (GVAR(mapTool_startPos) select 1)) mod 360);
|
||||
// Start rotating
|
||||
GVAR(mapTool_isRotating) = true;
|
||||
} else {
|
||||
// Start dragging
|
||||
GVAR(mapTool_isDragging) = true;
|
||||
};
|
||||
_handled = true;
|
||||
};
|
||||
};
|
||||
|
||||
_handled
|
63
addons/map/functions/fnc_handleMouseMove.sqf
Normal file
63
addons/map/functions/fnc_handleMouseMove.sqf
Normal file
@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Handle mouse movement over the map tool.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Map Control
|
||||
* 1: Mouse position on screen coordinates
|
||||
*
|
||||
* Return value:
|
||||
* Boolean, true if event was handled
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_control", "_pos"];
|
||||
|
||||
_control = _this select 0;
|
||||
_pos = [_this select 1, _this select 2];
|
||||
GVAR(mousePosition) = _control ctrlMapScreenToWorld _pos;
|
||||
GVAR(mousePosition) set [2, 0]; //convert 2d pos to 3d
|
||||
|
||||
// If cannot draw then exit
|
||||
if !(call FUNC(canDraw)) exitWith {
|
||||
// If was drawing, cancel
|
||||
if (GVAR(drawing_isDrawing)) then {
|
||||
call FUNC(cancelDrawing);
|
||||
};
|
||||
false
|
||||
};
|
||||
|
||||
// Handle drawing
|
||||
if (GVAR(drawing_isDrawing)) exitWith {
|
||||
GVAR(drawing_tempLineMarker) set [2, GVAR(mousePosition)];
|
||||
GVAR(drawing_tempLineMarker) call FUNC(updateLineMarker);
|
||||
false
|
||||
};
|
||||
|
||||
// Handle Map tools
|
||||
if (isNil QGVAR(mapTool_markerRotatingFixed)) exitWith {false};
|
||||
|
||||
// Translation
|
||||
if (GVAR(mapTool_isDragging)) exitWith {
|
||||
GVAR(mapTool_pos) set [0, (GVAR(mapTool_startPos) select 0) + (GVAR(mousePosition) select 0) - (GVAR(mapTool_startDragPos) select 0)];
|
||||
GVAR(mapTool_pos) set [1, (GVAR(mapTool_startPos) select 1) + (GVAR(mousePosition) select 1) - (GVAR(mapTool_startDragPos) select 1)];
|
||||
|
||||
// Update the size and rotation of the maptool
|
||||
[] call FUNC(updateMapToolMarkers);
|
||||
true
|
||||
};
|
||||
|
||||
// Rotation
|
||||
if (GVAR(mapTool_isRotating)) exitWith {
|
||||
// Get new angle
|
||||
_angle = (180 + ((GVAR(mousePosition) select 0) - (GVAR(mapTool_startPos) select 0)) atan2 ((GVAR(mousePosition) select 1) - (GVAR(mapTool_startPos) select 1)) mod 360);
|
||||
GVAR(mapTool_angle) = GVAR(mapTool_startAngle) + _angle - GVAR(mapTool_startDragAngle);
|
||||
|
||||
// Update the size and rotation of the maptool
|
||||
[] call FUNC(updateMapToolMarkers);
|
||||
true
|
||||
};
|
||||
|
||||
false
|
43
addons/map/functions/fnc_handleMouseZChanged.sqf
Normal file
43
addons/map/functions/fnc_handleMouseZChanged.sqf
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
*
|
||||
* Handle mouse wheel.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Control
|
||||
* 1: Scroll Amount
|
||||
*
|
||||
* Return value:
|
||||
* Boolean, true if event was handled
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_dir", "_params", "_control", "_button", "_screenPos", "_shiftKey", "_ctrlKey", "_handled", "_pos"];
|
||||
|
||||
_control = _this select 0;
|
||||
_dir = _this select 1;
|
||||
diag_log "Scroll";
|
||||
diag_log _this;
|
||||
_handled = false;
|
||||
|
||||
// If drawing, change line color
|
||||
|
||||
|
||||
//@todo AGM bug:
|
||||
// ACE_Map_drawColors is never defined
|
||||
|
||||
/* if (count GVAR(drawing_tempLineMarker) > 0) then {
|
||||
ACE_Map_drawColor = if (_dir > 0) then {ACE_Map_drawColor + 1} else {ACE_Map_drawColor - 1};
|
||||
if (ACE_Map_drawColor >= count ACE_Map_drawColors) then {
|
||||
ACE_Map_drawColor = ACE_Map_drawColor - count ACE_Map_drawColors;
|
||||
};
|
||||
if (ACE_Map_drawColor < 0) then {
|
||||
ACE_Map_drawColor = ACE_Map_drawColor + count ACE_Map_drawColors;
|
||||
};
|
||||
GVAR(drawing_tempLineMarker) set [3, ACE_Map_drawColor];
|
||||
GVAR(drawing_tempLineMarker) call ACE_Map_fnc_updateLineMarker;
|
||||
|
||||
_handled = true;
|
||||
}; */
|
||||
_handled
|
@ -11,17 +11,19 @@
|
||||
* Boolean
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define TEXTURE_WIDTH_IN_M 6205
|
||||
#define DIST_BOTTOM_TO_CENTER_PERC -0.33
|
||||
#define DIST_TOP_TO_CENTER_PERC 0.65
|
||||
#define DIST_LEFT_TO_CENTER_PERC 0.30
|
||||
|
||||
if (AGM_Map_mapToolsShown == 0) exitWith {false};
|
||||
_textureWidth = [TEXTURE_WIDTH_IN_M, TEXTURE_WIDTH_IN_M / 2] select (AGM_Map_mapToolsShown - 1);
|
||||
if (GVAR(mapTool_Shown) == 0) exitWith {false};
|
||||
_textureWidth = [TEXTURE_WIDTH_IN_M, TEXTURE_WIDTH_IN_M / 2] select (GVAR(mapTool_Shown) - 1);
|
||||
|
||||
_pos = [_this select 0, _this select 1, 0];
|
||||
_relPos = _pos vectorDiff [AGM_Map_pos select 0, AGM_Map_pos select 1, 0];
|
||||
_dirVector = [sin(AGM_Map_angle), cos(AGM_Map_angle), 0];
|
||||
_relPos = _pos vectorDiff [GVAR(mapTool_pos) select 0, GVAR(mapTool_pos) select 1, 0];
|
||||
_dirVector = [sin(GVAR(mapTool_angle)), cos(GVAR(mapTool_angle)), 0];
|
||||
|
||||
// Projection of the relative position over the longitudinal axis of the map tool
|
||||
_lambdaLong = _dirVector vectorDotProduct _relPos;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user