Merge branch 'master' into medical-rewrite

Conflicts:
	addons/medical/CfgEden.hpp
	addons/medical/functions/fnc_reviveStateLoop.sqf
	addons/medical/functions/fnc_serverRemoveBody.sqf
	addons/medical/functions/fnc_unconsciousPFH.sqf
This commit is contained in:
Glowbal 2016-07-15 11:50:58 +02:00
commit ab2075c328
170 changed files with 4093 additions and 570 deletions

View File

@ -4,7 +4,7 @@
<p align="center">
<a href="https://github.com/acemod/ACE3/releases/latest">
<img src="https://img.shields.io/badge/Version-3.6.0-blue.svg?style=flat-square" alt="ACE3 Version">
<img src="https://img.shields.io/badge/Version-3.6.2-blue.svg?style=flat-square" alt="ACE3 Version">
</a>
<a href="https://github.com/acemod/ACE3/issues">
<img src="https://img.shields.io/github/issues-raw/acemod/ACE3.svg?style=flat-square&label=Issues" alt="ACE3 Issues">

View File

@ -2,15 +2,15 @@
<Project name="ACE">
<Package name="Attach">
<Key ID="STR_ACE_Attach_AttachDetach">
<English>Attach item &gt;&gt;</English>
<German>Gegenstand befestigen &gt;&gt;</German>
<Spanish>Acoplar objeto &gt;&gt;</Spanish>
<Polish>Przyczep &gt;&gt;</Polish>
<French>Attacher l'objet &gt;&gt;</French>
<Czech>Připnout &gt;&gt;</Czech>
<Portuguese>Fixar item &gt;&gt;</Portuguese>
<Italian>Attacca l'oggetto &gt;&gt;</Italian>
<Hungarian>Tárgy hozzácsatolása &gt;&gt;</Hungarian>
<English>Attach item</English>
<German>Gegenstand befestigen</German>
<Spanish>Acoplar objeto</Spanish>
<Polish>Przyczep</Polish>
<French>Attacher l'objet</French>
<Czech>Připnout</Czech>
<Portuguese>Fixar item</Portuguese>
<Italian>Attacca l'oggetto</Italian>
<Hungarian>Tárgy hozzácsatolása</Hungarian>
<Russian>Прикрепить предмет</Russian>
</Key>
<Key ID="STR_ACE_Attach_Attach">

View File

@ -1,4 +1,5 @@
PREP(actionKeysNamesConverted);
PREP(addCanInteractWithCondition);
PREP(addLineToDebugDraw);
PREP(addSetting);
@ -32,6 +33,7 @@ PREP(displayText);
PREP(displayTextPicture);
PREP(displayTextStructured);
PREP(doAnimation);
PREP(doGesture);
PREP(dropBackpack);
PREP(endRadioTransmission);
PREP(eraseCache);
@ -127,6 +129,7 @@ PREP(numberToString);
PREP(onAnswerRequest);
PREP(owned);
PREP(parseList);
PREP(playConfigSound3D);
PREP(player);
PREP(playerSide);
PREP(positionToASL);

View File

@ -118,6 +118,8 @@ if (isServer) then {
[QGVAR(setVelocity), {(_this select 0) setVelocity (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(playMove), {(_this select 0) playMove (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(playMoveNow), {(_this select 0) playMoveNow (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(playAction), {(_this select 0) playAction (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(playActionNow), {(_this select 0) playActionNow (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(switchMove), {(_this select 0) switchMove (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(setVectorDirAndUp), {(_this select 0) setVectorDirAndUp (_this select 1)}] call CBA_fnc_addEventHandler;
[QGVAR(setVanillaHitPointDamage), {(_this select 0) setHitPointDamage (_this select 1)}] call CBA_fnc_addEventHandler;
@ -381,7 +383,7 @@ GVAR(OldIsCamera) = false;
//////////////////////////////////////////////////
["isNotDead", {
params ["_unit", "_target"];
params ["_unit"];
alive _unit
}] call FUNC(addCanInteractWithCondition);
@ -400,6 +402,49 @@ GVAR(OldIsCamera) = false;
["isNotInZeus", {isNull curatorCamera}] call FUNC(addCanInteractWithCondition);
//////////////////////////////////////////////////
// Set up reload mutex
//////////////////////////////////////////////////
GVAR(isReloading) = false;
["keyDown", {
if ((_this select 1) in actionKeys "ReloadMagazine" && {alive ACE_player}) then {
//Ignore mounted (except ffv)
if (!(player call CBA_fnc_canUseWeapon)) exitWith {};
private _weapon = currentWeapon ACE_player;
if (_weapon != "") then {
private _gesture = getText (configfile >> "CfgWeapons" >> _weapon >> "reloadAction");
if (_gesture == "") exitWith {}; //Ignore weapons with no reload gesture (binoculars)
private _isLauncher = _weapon isKindOf ["Launcher", configFile >> "CfgWeapons"];
private _config = ["CfgGesturesMale", "CfgMovesMaleSdr"] select _isLauncher;
private _duration = getNumber (configfile >> _config >> "States" >> _gesture >> "speed");
if (_duration != 0) then {
_duration = if (_duration < 0) then { abs _duration } else { 1 / _duration };
} else {
_duration = 3;
};
TRACE_2("Reloading, blocking gestures",_weapon,_duration);
GVAR(reloadingETA) = CBA_missionTime + _duration;
if (!GVAR(isReloading)) then {
GVAR(isReloading) = true;
[{
CBA_missionTime > GVAR(reloadingETA)
},{
GVAR(isReloading) = false;
}] call CBA_fnc_waitUntilAndExecute;
};
};
};
false
}] call CBA_fnc_addDisplayHandler;
//////////////////////////////////////////////////
// Set up PlayerJIP eventhandler
//////////////////////////////////////////////////

View File

@ -0,0 +1,110 @@
/*
* Author: commy2
* Reports same as actionKeysNames(Array) but in a format processable by "keyDown".
*
* Arguments:
* 0: Action name <STRING>
*
* Return Value:
* Keybinds, format: [DIK, _shift, _ctrl, _alt] <ARRAY>
*
* Example:
* "ReloadMagazine" call ace_common_fnc_actionKeysNamesConverted
*
* Public: No
*/
#include "script_component.hpp"
#define LAST_DIK 250
#define PLACEHOLDER_PLUS "<PLUS>"
#define LKEYNAME_LSHIFT localize "STR_DIK_LSHIFT"
#define LKEYNAME_RSHIFT localize "STR_DIK_RSHIFT"
#define LKEYNAME_LCONTROL localize "STR_DIK_LCONTROL"
#define LKEYNAME_RCONTROL localize "STR_DIK_RCONTROL"
#define LKEYNAME_LALT localize "STR_DIK_LMENU"
#define LKEYNAME_RALT localize "STR_DIK_RMENU"
// stored in ui namespace to force it to be recreated every game start
// this way we make it work in savegames after a language change
private _keyTable = uiNamespace getVariable QGVAR(keyNameTable);
if (isNil "_keyTable") then {
_keyTable = [];
uiNamespace setVariable [QGVAR(keyNameTable), _keyTable];
for "_i" from 0 to LAST_DIK do {
private _keyName = keyName _i;
// keys are reported as nested strings for god knows why
_keyName = _keyName select [1, count _keyName - 2];
_keyTable pushBack _keyName;
};
};
private _keyCache = uiNamespace getVariable [QGVAR(keyNameCache), locationNull];
if (isNull _keyCache) then {
_keyCache = call CBA_fnc_createNamespace;
uiNamespace setVariable [QGVAR(keyNameCache), _keyCache];
};
params [["_action", "", [""]]];
private _keybinds = actionKeysNamesArray _action apply {
private _keyName = _x;
private _keybind = _keyCache getVariable _keyName;
if (isNil "_keybind") then {
private _key = -1;
private _shift = false;
private _ctrl = false;
private _alt = false;
// copy, keep original varname for cache
private _keyImage = _keyName;
// handle "+" being a key and the seperator - as first character
if ((_keyImage select [0,1]) isEqualTo "+") then {
_keyImage = PLACEHOLDER_PLUS + (_keyImage select [1]);
};
// - and as character seperated by "+"
_keyImage = [_keyImage, "++", "+" + PLACEHOLDER_PLUS] call CBA_fnc_replace;
// get single keys (also revert back non-seperator "+" keys)
_keyImage = _keyImage splitString "+" apply {
[_x, "+"] select (_x isEqualTo PLACEHOLDER_PLUS);
};
// parse single keys
{
switch (true) do {
case (_x in [LKEYNAME_LSHIFT, LKEYNAME_RSHIFT]): {
_shift = true;
};
case (_x in [LKEYNAME_LCONTROL, LKEYNAME_RCONTROL]): {
_ctrl = true;
};
case (_x in [LKEYNAME_LALT, LKEYNAME_RALT]): {
_alt = true;
};
default {
// @todo handle double keys? ("C+R")
// currently only reports last key
// not usable by keyDown by default
_key = _keyTable find _x;
};
};
} forEach _keyImage;
// cache
_keybind = [_key, _shift, _ctrl, _alt];
_keyCache setVariable [_keyName, _keybind];
};
_keybind
};
_keybinds

View File

@ -1,13 +1,17 @@
/*
* Author: Glowbal
* Blurs screen.
*
* Arguments:
* 0: ID <NUMBER>
* 1: Show? <BOOL, NUMBER>
* 1: Show? <BOOL/NUMBER>
*
* Return Value:
* None
*
* Example:
* [5, true] call ace_common_fnc_blurScreen
*
* Public: Yes
*/
#include "script_component.hpp"

View File

@ -0,0 +1,24 @@
/*
* Author: commy2
* Play a gesture.
*
* Arguments:
* 0: Unit <OBJECT>
* 1: Animation <STRING>
*
* Return Value:
* None
*
* Example:
* [player, "gestureGo"] call ace_common_fnc_doGesture
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit", "_animation", ["_priority", 0]];
TRACE_3("params",_unit,_animation,_priority);
if (!GVAR(isReloading) || {_priority > 0}) then {
[QGVAR(playActionNow), [_unit, _animation], _unit] call CBA_fnc_targetEvent;
};

View File

@ -0,0 +1,35 @@
/*
* Author: esteldunedain
* Plays a sound defined in CfgSounds using playSound3D, with global effect
*
* Arguments:
* 0: Sound class <STRING>
* 1: Position ASL <ARRAY>
* 2: Volume <NUMBER>
* 3: Distance <NUMBER>
*
* Return Value:
* None
*
* Public: Yes
*/
#define DEBUG_MODE_FULL
#include "script_component.hpp"
params ["_soundClass", "_posASL", "_volume", "_distance"];
private _cfgSound = configFile >> "CfgSounds" >> _soundClass;
if (!isClass _cfgSound) exitWith {
ACE_LOGERROR_1("CfgSounds class [%1] does not exist", _soundClass);
};
private _args = getArray (_cfgSound >> "sound");
TRACE_1("playConfigSound3D args", _args);
private _pitch = (_args select 2);
// Strip the first \ from the filename
private _fileName = _args select 0;
_fileName = _fileName select [1, count _fileName - 1];
TRACE_1("playConfigSound3D filename", _fileName);
playSound3D [_fileName, objNull, false, _posASL, _volume, _pitch, _distance];

View File

@ -0,0 +1,15 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preStart));
};
};
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));
};
};

View File

@ -0,0 +1,43 @@
class CfgVehicles {
class Man;
class CAManBase: Man {
class ACE_Actions {
class ACE_MainActions {
class ACE_Dogtag {
displayName = CSTRING(itemName);
condition = "";
statement = "";
showDisabled = 0;
priority = 3;
icon = QPATHTOF(data\dogtag_icon_ca.paa);
class ACE_CheckDogtag {
displayName = CSTRING(checkDogtag);
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canCheckDogtag));
statement = QUOTE([ARR_2(_player,_target)] call FUNC(checkDogtag));
showDisabled = 0;
priority = 3;
icon = QPATHTOF(data\dogtag_icon_ca.paa);
};
class ACE_TakeDogtag {
displayName = CSTRING(takeDogtag);
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canTakeDogtag));
statement = QUOTE([ARR_2(_player,_target)] call FUNC(takeDogtag));
showDisabled = 0;
priority = 3;
icon = QPATHTOF(data\dogtag_icon_ca.paa);
};
};
};
};
class ACE_SelfActions {
class ACE_Equipment {
class ACE_CheckDogtags {
displayName = CSTRING(checkItem);
condition = "true";
statement = "";
insertChildren = QUOTE(_this call DFUNC(addDogtagActions));
};
};
};
};
};

File diff suppressed because it is too large Load Diff

72
addons/dogtags/Dogtag.hpp Normal file
View File

@ -0,0 +1,72 @@
class RscPicture;
class RscStructuredText;
class RscTitles {
class GVAR(singleTag) {
idd = -1;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(tag)),_this select 0)]);
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(tag)),nil)]);
movingEnable = false;
duration = 5;
fadeIn = 0.2;
fadeOut = 0.2;
class controls {
class background: RscPicture {
idc = 1000;
text = QUOTE(PATHTOF(data\dogtagSingle.paa));
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorText[] = {1, 1, 1, 1};
colorBackground[] = {0, 0, 0, 0};
x = ((safezoneX + safezoneW) - (10 * (((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 * (((safezoneW / safezoneH) min 1.2) / 40));
y = safeZoneY + 0.175 * safezoneH;
w = (8 * (((safezoneW / safezoneH) min 1.2) / 40));
h = (8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25));
font = "EtelkaMonospacePro";
};
class nickname: RscStructuredText {
idc = 1001;
text = "";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
colorText[] = {1, 1, 1, 1};
colorBackground[] = {0, 0, 0, 0};
x = ((safezoneX + safezoneW) - (8.4 * (((safezoneW / safezoneH) min 1.2) / 40)) - 2.9 * (((safezoneW / safezoneH) min 1.2) / 40));
y = safeZoneY + 0.24 * safezoneH;
w = (5.9 * (((safezoneW / safezoneH) min 1.2) / 40));
h = (3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25));
font = "RobotoCondensed";
class Attributes {
font = "RobotoCondensed";
color = "#EEEEEE";
align = "left";
valign = "middle";
shadow = 2;
shadowColor = "#3f4345";
size = "0.80";
};
};
};
};
class GVAR(doubleTag): GVAR(singleTag) {
idd = -1;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(tag)),_this select 0)]);
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(tag)),nil)]);
class controls: controls {
class background: background {
text = QUOTE(PATHTOF(data\dogtagDouble.paa));
};
class nickname: nickname {
class Attributes: Attributes {
font = "RobotoCondensed";
color = "#EEEEEE";
align = "left";
valign = "middle";
shadow = 2;
shadowColor = "#3f4345";
size = "0.80";
};
};
};
};
};

11
addons/dogtags/README.md Normal file
View File

@ -0,0 +1,11 @@
ace_dogtags
==========
Adds options to check and take dog tag from dead or unconscious units
## Maintainers
The people responsible for merging changes to this component or answering potential questions.
- [SzwedzikPL](https://github.com/SzwedzikPL)

View File

@ -0,0 +1,13 @@
PREP(addDogtagActions);
PREP(addDogtagItem);
PREP(bloodType);
PREP(canCheckDogtag);
PREP(canTakeDogtag);
PREP(checkDogtag);
PREP(checkDogtagItem);
PREP(getDogtagData);
PREP(getDogtagItem);
PREP(sendDogtagData);
PREP(showDogtag);
PREP(ssn);
PREP(takeDogtag);

View File

@ -0,0 +1,45 @@
#include "script_component.hpp"
[QGVAR(showDogtag), DFUNC(showDogtag)] call CBA_fnc_addEventHandler;
[QGVAR(sendDogtagData), DFUNC(sendDogtagData)] call CBA_fnc_addEventHandler;
[QGVAR(getDogtagItem), DFUNC(getDogtagItem)] call CBA_fnc_addEventHandler;
[QGVAR(addDogtagItem), DFUNC(addDogtagItem)] call CBA_fnc_addEventHandler;
//Add actions and event handlers only if ace_medical is loaded
// - Adding actions via config would create a dependency
if (["ACE_Medical"] call EFUNC(common,isModLoaded)) then {
if (hasInterface) then {
private _checkTagAction = [
"ACE_CheckDogtag",
format ["%1: %2", localize LSTRING(itemName), localize LSTRING(checkDogtag)],
QPATHTOF(data\dogtag_icon_ca.paa),
{[_player,_target] call FUNC(checkDogtag)},
{!isNil {_target getVariable QGVAR(dogtagData)}}
] call ace_interact_menu_fnc_createAction;
["ACE_bodyBagObject", 0, ["ACE_MainActions"], _checkTagAction] call EFUNC(interact_menu,addActionToClass);
private _takeTagAction = [
"ACE_TakeDogtag",
format ["%1: %2", localize LSTRING(itemName), localize LSTRING(takeDogtag)],
QPATHTOF(data\dogtag_icon_ca.paa),
{[_player,_target] call FUNC(takeDogtag)},
{(!isNil {_target getVariable QGVAR(dogtagData)}) && {((_target getVariable [QGVAR(dogtagTaken), objNull]) != _target)}}
] call ace_interact_menu_fnc_createAction;
["ACE_bodyBagObject", 0, ["ACE_MainActions"], _takeTagAction] call EFUNC(interact_menu,addActionToClass);
};
if (isServer) then {
["ace_placedInBodyBag", {
params ["_target", "_bodyBag"];
TRACE_2("ace_placedInBodyBag eh",_target,_bodyBag);
private _dogTagData = [_target] call FUNC(getDogtagData);
_bodyBag setVariable [QGVAR(dogtagData), _dogTagData, true];
if ((_target getVariable [QGVAR(dogtagTaken), objNull]) == _target) then {
_bodyBag setVariable [QGVAR(dogtagTaken), _bodyBag, true];
};
}] call CBA_fnc_addEventHandler;
};
};

View File

@ -0,0 +1,7 @@
#include "script_component.hpp"
ADDON = false;
#include "XEH_PREP.hpp"
ADDON = true;

View File

@ -0,0 +1,3 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"

18
addons/dogtags/config.cpp Normal file
View File

@ -0,0 +1,18 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
units[] = {};
weapons[] = {};
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {"ace_common"};
author[] = {"SzwedzikPL"};
authorUrl = "https://github.com/SzwedzikPL/";
VERSION_CONFIG;
};
};
#include "CfgEventHandlers.hpp"
#include "CfgWeapons.hpp"
#include "CfgVehicles.hpp"
#include "Dogtag.hpp"

Binary file not shown.

View File

@ -0,0 +1,82 @@
class StageTI {
texture = "a3\data_f\default_glass_ti_ca.paa";
};
ambient[] = {1,1,1,1};
diffuse[] = {1,1,1,1};
forcedDiffuse[] = {0,0,0,0};
emmisive[] = {0,0,0,1};
specular[] = {0.3,0.3,0.3,1};
specularPower = 50;
PixelShaderID = "Super";
VertexShaderID = "Super";
class Stage1 {
texture = "z\ace\addons\dogtags\data\dogtag_nohq.paa";
uvSource = "tex";
class uvTransform {
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};
class Stage2 {
texture = "#(argb,8,8,3)color(0.5,0.5,0.5,1,DT)";
uvSource = "tex";
class uvTransform {
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};
class Stage3 {
texture = "#(argb,8,8,3)color(0,0,0,0,MC)";
uvSource = "tex";
class uvTransform {
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};
class Stage4 {
texture = "#(argb,8,8,3)color(1,1,1,1,AS)";
uvSource = "tex";
class uvTransform {
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};
class Stage5 {
texture = "#(argb,8,8,3)color(0,0.6,1,1,SMDI)";
uvSource = "tex";
class uvTransform {
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};
class Stage6 {
texture = "#(ai,32,128,1)fresnel(0.85,0.36)";
uvSource = "tex";
class uvTransform {
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};
class Stage7 {
useWorldEnvMap = "true";
texture = "a3\data_f\env_interier_car_ca.paa";
uvSource = "tex";
class uvTransform {
aside[] = {1,0,0};
up[] = {0,1,0};
dir[] = {0,0,1};
pos[] = {0,0,0};
};
};

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,16 @@
class CfgSkeletons {
class Default {
isDiscrete = 1;
skeletonInherit = "";
skeletonBones[] = {};
};
};
class CfgModels {
class Default {
sectionsInherit = "";
sections[] = {""};
skeletonName = "Default";
};
class ace_dogtag: Default {};
};

View File

@ -0,0 +1,40 @@
/*
* Author: SzwedzikPL
* Creates one action per dogtag.
*
* Arguments:
* 0: Target <OBJECT>
* 1: Player <OBJECT>
*
* Return Value:
* Children actions <ARRAY>
*
* Public: No
*/
#include "script_component.hpp"
params ["_target", "_player"];
//Get all dogtags and their ids
private _unitDogtags = [];
private _unitDogtagIDs = [];
{
private _id = getNumber (configFile >> "CfgWeapons" >> _x >> QGVAR(tagID));
if (_id > 0) then {
_unitDogtags pushBack _x;
_unitDogtagIDs pushBack _id;
};
} forEach items _player;
//Create action children for all dogtags
private _actions = [];
{
private _tagID = _unitDogtagIDs select _forEachIndex;
private _displayName = format ["%1 #%2", getText (configFile >> "CfgWeapons" >> _x >> "displayName"), _tagID];
private _picture = getText (configFile >> "CfgWeapons" >> _x >> "picture");
private _action = [_x, _displayName, _picture, {_this call FUNC(checkDogtagItem)}, {true}, {}, _x] call EFUNC(interact_menu,createAction);
_actions pushBack [_action, [], _player];
} forEach _unitDogtags;
_actions

View File

@ -0,0 +1,24 @@
/*
* Author: SzwedzikPL
* Adds dogtag item to unit (triggered by server)
*
* Arguments:
* 0: Item class <STRING>
* 1: Dogtag data <ARRAY>
*
* Return Value:
* None
*
* Public: No
*/
#include "script_component.hpp"
params ["_item", "_dogtagData"];
if (_item == "") exitWith {};
[ace_player, _item] call CBA_fnc_addItem;
_dogtagData params ["_nickName"];
private _displayText = format [localize LSTRING(takeDogtagSuccess), _nickName];
[_displayText] call EFUNC(common,displayText);

View File

@ -0,0 +1,24 @@
/*
* Author: commy2
* Reports a blood type depending on the units name.
*
* Arguments:
* 0: Name of a unit <STRING>
*
* Return Value:
* A random blood type <STRING>
*
* Public: No
*/
#include "script_component.hpp"
#define BLOOD_TYPES ["O POS", "O NEG", "A POS", "A NEG", "B POS", "B NEG", "AB POS", "AB NEG"]
params ["_name"];
private _num = 0;
private _count = {_num = _num + _x} count toArray _name;
_num = _num + _count;
BLOOD_TYPES select (_num % count BLOOD_TYPES)

View File

@ -0,0 +1,20 @@
/*
* Author: SzwedzikPL
* Checks if dogtag can be checked.
*
* Arguments:
* 0: Player <OBJECT>
* 1: Target <OBJECT>
*
* Return Value:
* True if dogtag can be checked <BOOL>
*
* Public: No
*/
#include "script_component.hpp"
params ["_player", "_target"];
if (isNull _target) exitWith {false};
(!alive _target) || {_target getVariable ["ACE_isUnconscious", false]}

View File

@ -0,0 +1,20 @@
/*
* Author: SzwedzikPL
* Checks if dogtag can be taken.
*
* Arguments:
* 0: Player <OBJECT>
* 1: Target <OBJECT>
*
* Return Value:
* True if dogtag can be taken <BOOL>
*
* Public: No
*/
#include "script_component.hpp"
params ["_player", "_target"];
if (isNull _target) exitWith {false};
(!alive _target) || {_target getVariable ["ACE_isUnconscious", false]}

View File

@ -0,0 +1,21 @@
/*
* Author: SzwedzikPL
* Checks unit dogtag
*
* Arguments:
* 0: Player <OBJECT>
* 1: Target <OBJECT>
*
* Return Value:
* None
*
* Public: No
*/
#include "script_component.hpp"
params ["_player", "_target"];
private _doubleTags = (_target getVariable [QGVAR(dogtagTaken), objNull]) != _target;
private _dogTagData = [_target] call FUNC(getDogTagData);
[QGVAR(showDogtag), [_dogTagData, _doubleTags]] call CBA_fnc_localEvent;

View File

@ -0,0 +1,19 @@
/*
* Author: SzwedzikPL
* Check dogtag self menu action
*
* Arguments:
* 0: Player <OBJECT>
* 1: Target <OBJECT>
* 2: Item class <STRING>
*
* Return Value:
* Mone
*
* Public: No
*/
#include "script_component.hpp"
params ["_player", "_target", "_item"];
[QGVAR(sendDogtagData), [_player, _item]] call CBA_fnc_serverEvent;

View File

@ -0,0 +1,31 @@
/*
* Author: esteldunedain
* Get unit dogtag data
*
* Arguments:
* 0: Target <OBJECT>
*
* Return Value:
* None
*
* Public: No
*/
#include "script_component.hpp"
params ["_target"];
// Check if the data was already created
private _dogTagData = _target getVariable QGVAR(dogtagData);
if (!isNil "_dogTagData") exitWith {_dogTagData};
// Create dog tag data once for the unit: nickname, code (eg. 135-13-900) and blood type
private _targetName = [_target, false, true] call EFUNC(common,getName);
private _dogTagData = [
_targetName,
_targetName call FUNC(ssn),
_targetName call FUNC(bloodType)
];
// Store it
_target setVariable [QGVAR(dogtagData), _dogTagData, true];
_dogTagData

View File

@ -0,0 +1,36 @@
/*
* Author: SzwedzikPL
* Server: creates new dogtag item and send it to client
*
* Arguments:
* 0: Player <OBJECT>
* 1: Target <OBJECT>
*
* Return Value:
* None
*
* Public: No
*/
#include "script_component.hpp"
if(!isServer) exitWith {};
params ["_player", "_target"];
TRACE_2("getDogtagItem",_player,_target);
private _allDogtags = missionNamespace getVariable [QGVAR(allDogtags), []];
private _allDogtagDatas = missionNamespace getVariable [QGVAR(allDogtagDatas), []];
private _nextID = count _allDogtags + 1;
if (_nextID > 999) exitWith {ACE_LOGERROR("Ran out of IDs");};
private _dogTagData = [_target] call FUNC(getDogTagData);
private _item = format ["ACE_dogtag_%1", _nextID];
_allDogtags pushBack _item;
_allDogtagDatas pushBack _dogTagData;
missionNamespace setVariable [QGVAR(allDogtags), _allDogtags];
missionNamespace setVariable [QGVAR(allDogtagDatas), _allDogtagDatas];
[QGVAR(addDogtagItem), [_item, _dogTagData], [_player]] call CBA_fnc_targetEvent;

View File

@ -0,0 +1,30 @@
/*
* Author: SzwedzikPL
* Server: returns to client data on given dogtag
*
* Arguments:
* 0: Player <OBJECT>
* 1: Target <OBJECT>
*
* Return Value:
* None
*
* Public: No
*/
#include "script_component.hpp"
if(!isServer) exitWith {};
params ["_target", "_item"];
TRACE_2("sendDogtagData",_target,_item);
private _allDogtags = missionNameSpace getVariable [QGVAR(allDogtags), []];
private _allDogtagDatas = missionNameSpace getVariable [QGVAR(allDogtagDatas), []];
private _dogtagData = [];
private _index = _allDogtags find _item;
if (_index >= 0) then {
_dogtagData = _allDogtagDatas select _index;
};
[QGVAR(showDogtag), [_dogtagData], [_target]] call CBA_fnc_targetEvent;

View File

@ -0,0 +1,32 @@
/*
* Author: SzwedzikPL
* Shows dogtag
*
* Arguments:
* 0: Dog tag data <ARRAY>
* 1: Display as double tag <BOOLEAN>
*
* Return Value:
* None
*
* Public: No
*/
#include "script_component.hpp"
disableSerialization;
params ["_dogtagData", ["_doubleTags", false, [false]]];
if (!hasInterface || {_dogtagData isEqualTo []}) exitWith {};
if (_doubleTags) then {
(QGVAR(tag) call BIS_fnc_rscLayer) cutRsc [QGVAR(doubleTag), "PLAIN", 1, true];
} else {
(QGVAR(tag) call BIS_fnc_rscLayer) cutRsc [QGVAR(singleTag), "PLAIN", 1, true];
};
private _display = uiNamespace getvariable [QGVAR(tag), displayNull];
if(isNull _display) exitWith {};
private _control = _display displayCtrl 1001;
_dogtagData params ["_nickName", "_code", "_bloodType"];
_control ctrlSetStructuredText parseText format ["%1<br/>%2<br/>%3", toUpper _nickName, _code, _bloodType];

View File

@ -0,0 +1,31 @@
/*
* Author: SilentSpike
* Reports a social security number generated from the units name.
*
* Arguments:
* 0: Name of a unit <STRING>
*
* Return Value:
* A random three/two/four format social security number <STRING>
*
* Public: No
*/
#include "script_component.hpp"
params ["_name"];
private _length = count _name;
private _chars = toArray _name;
// For short names, reuse characters
if (_length < 9) then {
// Iterates every second character, swapping odd/even with each loop
for [{_i = 0},{_i < 2*(9 - _length)},{_i = _i + 2}] do {
_chars pushBack (_chars select floor((_i + (_i/_length % 2)) % _length));
};
};
// Offset array slice for long names to make generation more unique
private _slice = [0, _length % 9] select (_length > 9);
private _nums = (_chars select [_slice, 9]) apply { _x % 10 };
([_nums select [0,3],_nums select [3,2], _nums select [5,4]] apply { _x joinString "" }) joinString "-"

View File

@ -0,0 +1,24 @@
/*
* Author: SzwedzikPL
* If dogtag is not already taken triggers event on server
* If dogtag already taken displays info about it
*
* Arguments:
* 0: Player <OBJECT>
* 1: Target <OBJECT>
*
* Return Value:
* None
*
* Public: No
*/
#include "script_component.hpp"
params ["_player", "_target"];
if ((_target getVariable [QGVAR(dogtagTaken), objNull]) == _target) then {
[localize LSTRING(dogtagAlreadyTaken)] call EFUNC(common,displayText);
} else {
_target setVariable [QGVAR(dogtagTaken), _target, true];
[QGVAR(getDogtagItem), [_player, _target]] call CBA_fnc_serverEvent;
};

View File

@ -0,0 +1 @@
#include "\z\ace\addons\dogtags\script_component.hpp"

View File

@ -0,0 +1,17 @@
#define COMPONENT dogtags
#include "\z\ace\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define CBA_DEBUG_SYNCHRONOUS
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_DOGTAGS
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_DOGTAGS
#define DEBUG_SETTINGS DEBUG_SETTINGS_DOGTAGS
#endif
#include "\z\ace\addons\main\script_macros.hpp"

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<Project name="ACE">
<Package name="Dogtags">
<Key ID="STR_ACE_Dogtags_itemName">
<English>Dog Tag</English>
<Polish>Nieśmiertelnik</Polish>
</Key>
<Key ID="STR_ACE_Dogtags_checkItem">
<English>Check Dog Tag</English>
<Polish>Sprawdź nieśmiertelnik</Polish>
</Key>
<Key ID="STR_ACE_Dogtags_checkDogtag">
<English>Check</English>
<Polish>Sprawdź</Polish>
</Key>
<Key ID="STR_ACE_Dogtags_takeDogtag">
<English>Take</English>
<Polish>Zabierz</Polish>
</Key>
<Key ID="STR_ACE_Dogtags_takeDogtagSuccess">
<English>Dogtag taken from %1...</English>
<Polish>Zabrałeś nieśmiertelnik %1...</Polish>
</Key>
<Key ID="STR_ACE_Dogtags_dogtagAlreadyTaken">
<English>Somebody else has already taken the dogtag...</English>
<Polish>Ktoś już zabrał ten nieśmiertelnik...</Polish>
</Key>
</Package>
</Project>

View File

@ -69,6 +69,33 @@ class CfgVehicles {
GVAR(canCarry) = 1;
GVAR(canDrag) = 1;
};
class Box_Syndicate_Ammo_F: ReammoBox_F {
GVAR(canCarry) = 1;
GVAR(canDrag) = 1;
};
class Box_IED_Exp_F: ReammoBox_F {
GVAR(canCarry) = 1;
GVAR(canDrag) = 1;
};
class Box_Syndicate_Wps_F: ReammoBox_F {
GVAR(canCarry) = 1;
GVAR(canDrag) = 1;
};
class Box_Syndicate_WpsLaunch_F: ReammoBox_F {
GVAR(canCarry) = 1;
GVAR(canDrag) = 1;
};
class Box_NATO_Equip_F: ReammoBox_F {
GVAR(canCarry) = 1;
GVAR(carryDirection) = 270;
GVAR(canDrag) = 1;
};
class Box_NATO_Uniforms_F: ReammoBox_F {
GVAR(canCarry) = 1;
GVAR(carryDirection) = 270;
GVAR(canDrag) = 1;
};
// Remove Larger crate dragging support.
// Would be better to allow some sort of joint push/drag functionality

View File

@ -28,3 +28,30 @@ if (isNil "ACE_maxWeightCarry") then {
["ace_unconscious", {_this call FUNC(handleUnconscious)}] call CBA_fnc_addEventHandler;
//@todo Captivity?
//Add Keybind:
["ACE3 Common", QGVAR(drag), (localize LSTRING(DragKeybind)),
{
if (!alive ACE_player) exitWith {false};
if !([ACE_player, objNull, ["isNotDragging", "isNotCarrying"]] call EFUNC(common,canInteractWith)) exitWith {false};
// If we are drag/carrying something right now then just drop it:
if (ACE_player getVariable [QGVAR(isDragging), false]) exitWith {
[ACE_player, ACE_player getVariable [QGVAR(draggedObject), objNull]] call FUNC(dropObject);
false
};
if (ACE_player getVariable [QGVAR(isCarrying), false]) exitWith {
[ACE_player, ACE_player getVariable [QGVAR(carriedObject), objNull]] call FUNC(dropObject_carry);
false
};
private _cursor = cursorObject;
if ((isNull _cursor) || {(_cursor distance ACE_player) > 2.6}) exitWith {false};
if (!([ACE_player, _cursor] call FUNC(canDrag))) exitWith {false};
[ACE_player, _cursor] call FUNC(startDrag);
false
},
{false},
[-1, [false, false, false]]] call CBA_fnc_addKeybind; // UNBOUND

View File

@ -26,7 +26,7 @@ private _inBuilding = [_unit] call FUNC(isObjectOnObject);
if !(_unit getVariable ["ACE_isUnconscious", false]) then {
// play release animation
_unit playAction "released";
[_unit, "released"] call EFUNC(common,doGesture);
};
// prevent collision damage

View File

@ -39,7 +39,9 @@ _unit selectWeapon primaryWeapon _unit;
[_unit, _target, true] call EFUNC(common,claim);
// can't play action that depends on weapon if it was added the same frame
[{_this playActionNow "grabDrag";}, _unit] call CBA_fnc_execNextFrame;
[{
[_this, "grabDrag"] call EFUNC(common,doGesture);
}, _unit] call CBA_fnc_execNextFrame;
// move a bit closer and adjust direction when trying to pick up a person
if (_target isKindOf "CAManBase") then {

View File

@ -25,6 +25,18 @@
<Italian>Lascia</Italian>
<Hungarian>Elengedés</Hungarian>
</Key>
<Key ID="STR_ACE_Dragging_DragKeybind">
<English>Drag/Release Object</English>
<Russian>Тащить/Отпустить Объекты</Russian>
<Spanish>Arrastrar/Soltar Objeto</Spanish>
<Polish>Ciągnij/Puść Obiekt</Polish>
<Czech>Táhnout/Položit Objekt</Czech>
<French>Trainer/Lâcher Objets</French>
<German>Objekt ziehen/loslassen</German>
<Portuguese>Arrastar/Soltar Objeto</Portuguese>
<Italian>Trascina/Lascia Oggetto</Italian>
<Hungarian>Húzás/Elengedés Objektum</Hungarian>
</Key>
<Key ID="STR_ACE_Dragging_UnableToDrag">
<English>Item too heavy</English>
<German>Gegenstand ist zu schwer</German>

View File

@ -4,7 +4,7 @@
*
* Arguments:
* 0: Unit <OBJECT>
* 0: Target <OBJECT>
* 0: Target (ACE_DefuseObject) <OBJECT>
*
* Return Value:
* Able to defuse <BOOL>
@ -19,15 +19,16 @@
params ["_unit", "_target"];
TRACE_2("params",_unit,_target);
private ["_isSpecialist"];
if (isNull(_target getVariable [QGVAR(Explosive),objNull])) exitWith {
private _explosive = _target getVariable [QGVAR(Explosive), objNull];
if (isNull _explosive) exitWith {
deleteVehicle _target;
false
};
if (vehicle _unit != _unit || {!("ACE_DefusalKit" in (items _unit))}) exitWith {false};
_isSpecialist = [_unit] call EFUNC(Common,isEOD);
if (GVAR(RequireSpecialist) && {!_isSpecialist}) exitWith {false};
if (GVAR(RequireSpecialist) && {!([_unit] call EFUNC(Common,isEOD))}) exitWith {false};
//Handle the naval mines (which doens't get turned into items when defused):
if ((_explosive isKindOf "UnderwaterMine_Range_Ammo") && {!mineActive _explosive}) exitWith {false};
true

View File

@ -27,7 +27,7 @@ TRACE_7("params",_unit,_pos,_dir,_magazineClass,_triggerConfig,_triggerSpecificV
private ["_ammo", "_explosive", "_attachedTo", "_magazineTrigger", "_pitch", "_digDistance", "_canDigDown", "_soundEnviron", "_surfaceType"];
_unit playActionNow "PutDown";
[_unit, "PutDown"] call EFUNC(common,doGesture);
_attachedTo = objNull;
if (!isNull _setupPlaceholderObject) then {

View File

@ -185,7 +185,7 @@ GVAR(TweakedAngle) = 0;
_expSetupVehicle setVariable [QGVAR(Direction), _placeAngle, true];
_unit removeMagazine _magClassname;
_unit playActionNow "PutDown";
[_unit, "PutDown"] call EFUNC(common,doGesture);
_unit setVariable [QGVAR(PlantingExplosive), true];
[{_this setVariable [QGVAR(PlantingExplosive), false]}, _unit, 1.5] call CBA_fnc_waitAndExecute;

View File

@ -46,7 +46,7 @@ if (ACE_player != _unit) then {
if (isPlayer _unit) then {
[QGVAR(startDefuse), [_unit, _target], _unit] call CBA_fnc_targetEvent;
} else {
_unit playActionNow _actionToPlay;
[_unit, _actionToPlay] call EFUNC(common,doGesture);
_unit disableAI "MOVE";
_unit disableAI "TARGET";
_defuseTime = [[_unit] call EFUNC(Common,isEOD), _target] call _fnc_DefuseTime;
@ -59,10 +59,10 @@ if (ACE_player != _unit) then {
}, [_unit, _target], _defuseTime] call CBA_fnc_waitAndExecute;
};
} else {
_unit playActionNow _actionToPlay;
[_unit, _actionToPlay] call EFUNC(common,doGesture);
_isEOD = [_unit] call EFUNC(Common,isEOD);
_defuseTime = [_isEOD, _target] call _fnc_DefuseTime;
if (_isEOD || {!GVAR(RequireSpecialist)}) then {
[_defuseTime, [_unit,_target], {(_this select 0) call FUNC(defuseExplosive)}, {}, (localize LSTRING(DefusingExplosive))] call EFUNC(common,progressBar);
[_defuseTime, [_unit,_target], {(_this select 0) call FUNC(defuseExplosive)}, {}, (localize LSTRING(DefusingExplosive)), {true}, ["isNotSwimming"]] call EFUNC(common,progressBar);
};
};

View File

@ -7,3 +7,12 @@
[QGVAR(startFastRope), {
[FUNC(fastRopeServerPFH), 0, _this] call CBA_fnc_addPerFrameHandler;
}] call CBA_fnc_addEventHandler;
["ACE3 Vehicles", QGVAR(cutRopes), localize LSTRING(Interaction_cutRopes), {
if ([vehicle ACE_player] call FUNC(canCutRopes)) then {
[vehicle ACE_player] call FUNC(cutRopes);
true
} else {
false
};
}, {false}] call CBA_fnc_addKeybind;

View File

@ -1,7 +1,7 @@
class ACE_UI {
class gunnerZeroing {
class conditions {
ADDON = "false";
ADDON = "(false)";
};
};
};

View File

@ -60,6 +60,6 @@ TRACE_1("sending finger to",_sendFingerToPlayers);
[QGVAR(fingered), [ACE_player, _fingerPosASL, _originASL vectorDistance _fingerPosASL], _sendFingerToPlayers] call CBA_fnc_targetEvent;
ACE_player playActionNow "GestureGo";
[ACE_player, "GestureGo"] call EFUNC(common,doGesture);
true

View File

@ -16,9 +16,3 @@ class Extended_PostInit_EventHandlers {
init = QUOTE(call COMPILE_FILE(XEH_postInit));
};
};
class Extended_DisplayLoad_EventHandlers {
class RscDisplayMission {
ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad));
};
};

View File

@ -5,7 +5,7 @@ class CfgVehicles {
class ACE_SelfActions {
class ADDON {
displayName = CSTRING(Gestures);
condition = QUOTE((canStand _target) && GVAR(ReloadMutex) && {GVAR(showOnInteractionMenu) == 2});
condition = QUOTE((canStand _target) && {GVAR(showOnInteractionMenu) == 2});
statement = "";
showDisabled = 1;
priority = 3.5;
@ -14,42 +14,42 @@ class CfgVehicles {
class GVAR(Advance) {
displayName = CSTRING(Advance);
condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureAdvance';);
statement = QUOTE([ARR_2(_target,'gestureAdvance')] call EFUNC(common,doGesture););
showDisabled = 1;
priority = 1.9;
};
class GVAR(Go) {
displayName = CSTRING(Go);
condition = QUOTE(true);
statement = QUOTE(_target playActionNow ([ARR_2('gestureGo','gestureGoB')] select floor random 2););
statement = QUOTE([ARR_2(_target,selectRandom [ARR_2('gestureGo','gestureGoB')])] call EFUNC(common,doGesture););
showDisabled = 1;
priority = 1.8;
};
class GVAR(Follow) {
displayName = CSTRING(Follow);
condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureFollow';);
statement = QUOTE([ARR_2(_target,'gestureFollow')] call EFUNC(common,doGesture););
showDisabled = 1;
priority = 1.7;
};
class GVAR(Up) {
displayName = CSTRING(Up);
condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureUp';);
statement = QUOTE([ARR_2(_target,'gestureUp')] call EFUNC(common,doGesture););
showDisabled = 1;
priority = 1.5;
};
class GVAR(CeaseFire) {
displayName = CSTRING(CeaseFire);
condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureCeaseFire';);
statement = QUOTE([ARR_2(_target,'gestureCeaseFire')] call EFUNC(common,doGesture););
showDisabled = 1;
priority = 1.3;
};
class GVAR(Stop) {
displayName = CSTRING(Stop);
condition = QUOTE(true);
statement = QUOTE(_target playActionNow 'gestureFreeze';); // BI animation - is actualls "stop" in all stances but prone
statement = QUOTE([ARR_2(_target,'gestureFreeze')] call EFUNC(common,doGesture);); // BI animation - is actualls "stop" in all stances but prone
showDisabled = 1;
priority = 1.2;
};

View File

@ -1,32 +0,0 @@
#include "script_component.hpp"
disableSerialization;
params ["_display"];
_display displayAddEventHandler ["KeyDown", {
if ((_this select 1) in actionKeys "ReloadMagazine") then {
if (isNull ACE_player || {!alive ACE_player}) exitWith {false};
private _weapon = currentWeapon ACE_player;
if (_weapon != "") then {
GVAR(ReloadMutex) = false;
private _gesture = getText (configfile >> "CfgWeapons" >> _weapon >> "reloadAction");
private _isLauncher = _weapon isKindOf ["Launcher", configFile >> "CfgWeapons"];
private _config = ["CfgGesturesMale", "CfgMovesMaleSdr"] select _isLauncher;
private _duration = getNumber (configfile >> _config >> "States" >> _gesture >> "speed");
if (_duration != 0) then {
_duration = if (_duration < 0) then { abs _duration } else { 1 / _duration };
} else {
_duration = 3;
};
TRACE_2("Reloading, blocking gestures",_weapon,_duration);
[{GVAR(ReloadMutex) = true;}, [], _duration] call CBA_fnc_waitAndExecute;
};
};
false
}];

View File

@ -2,9 +2,6 @@
if (!hasInterface) exitWith {};
// reload mutex, you can't play signal while reloading
GVAR(ReloadMutex) = true;
// Add keybinds
{
_x params ["_currentName", "_key", ["_vanillaKey", false] ];

View File

@ -17,7 +17,6 @@
TRACE_1("params",_this);
if (!GVAR(ReloadMutex)) exitWith {false};
if (GVAR(showOnInteractionMenu) == 0) exitWith {false};
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
@ -34,5 +33,5 @@ private _gesture = if ((_this select [0,2]) == "BI") then {
};
TRACE_1("playing gesture",_gesture);
ACE_player playAction _gesture;
[ACE_player, _gesture] call EFUNC(common,doGesture);
true

View File

@ -1,11 +1,11 @@
class ACE_Settings {
/*class GVAR(enable) { // @todo
value = 0;
typeName = "BOOL";
isClientSettable = 1;
displayName = CSTRING(enable);
};*/
class GVAR(effects) {
displayName = CSTRING(effects_displayName);
typeName = "SCALAR";
value = 2;
values[] = {ECSTRING(common,Disabled), CSTRING(effects_tintOnly), CSTRING(enabled_tintAndEffects)};
};
class GVAR(showInThirdPerson) {
value = 0;
typeName = "BOOL";

View File

@ -24,11 +24,3 @@ class Extended_Killed_EventHandlers {
};
};
};
class Extended_Explosion_EventHandlers {
class CAManBase {
class ADDON {
clientExplosion = QUOTE(if (local (_this select 0)) then {_this call FUNC(handleExplosion)});
};
};
};

View File

@ -3,6 +3,7 @@
if (!hasInterface) exitWith {};
["ACE3 Common", QGVAR(wipeGlasses), localize LSTRING(WipeGlasses), {
if (GVAR(effects) != 2) exitWith {false}; //Can only wipe if full effects setting is set
if (!(GETVAR(ace_player,ACE_isUnconscious,false))) exitWith {
call FUNC(clearGlasses);
true
@ -12,126 +13,142 @@ if (!hasInterface) exitWith {};
{false},
[20, [true, true, false]], false] call CBA_fnc_addKeybind;
// make sure to stack effect layers in correct order
GVAR(GogglesEffectsLayer) = QGVAR(GogglesEffectsLayer) call BIS_fnc_RSCLayer;
GVAR(GogglesLayer) = QGVAR(GogglesLayer) call BIS_fnc_RSCLayer;
if (isNil QGVAR(UsePP)) then {
GVAR(UsePP) = true;
};
["ace_settingsInitialized", {
TRACE_2("ace_settingsInitialized eh",GVAR(effects),GVAR(showInThirdPerson));
// init pp effects
GVAR(PostProcess) = ppEffectCreate ["ColorCorrections", 1995];
GVAR(PostProcessEyes) = ppEffectCreate ["ColorCorrections", 1992];
GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0, 0, 0, 1], [1, 1, 1, 0]];
GVAR(PostProcessEyes) ppEffectCommit 0;
GVAR(PostProcessEyes) ppEffectEnable false;
if (GVAR(effects) == 0) exitWith {};
GVAR(EffectsActive) = false;
// ---Add the TINT Effect---
SETGLASSES(ace_player,GLASSESDEFAULT);
// make sure to stack effect layers in correct order
GVAR(GogglesEffectsLayer) = QGVAR(GogglesEffectsLayer) call BIS_fnc_RSCLayer;
GVAR(GogglesLayer) = QGVAR(GogglesLayer) call BIS_fnc_RSCLayer;
GVAR(FrameEvent) = [false, [false, 20]];
GVAR(PostProcessEyes_Enabled) = false;
GVAR(DustHandler) = -1;
GVAR(RainDrops) = objNull;
GVAR(RainActive) = false;
GVAR(RainLastLevel) = 0;
GVAR(surfaceCache) = "";
GVAR(surfaceCacheIsDust) = false;
// init GlassesChanged eventhandler
GVAR(OldGlasses) = "<null>";
["loadout", {
params ["_unit"];
private _currentGlasses = goggles _unit;
if (GVAR(OldGlasses) != _currentGlasses) then {
["ace_glassesChanged", [_unit, _currentGlasses]] call CBA_fnc_localEvent;
GVAR(OldGlasses) = _currentGlasses;
if (isNil QGVAR(UsePP)) then {
GVAR(UsePP) = true;
};
}] call CBA_fnc_addPlayerEventHandler;
// add glasses eventhandlers
["ace_glassesChanged", {
params ["_unit", "_glasses"];
// init GlassesChanged eventhandler
GVAR(OldGlasses) = "<null>";
["loadout", {
params ["_unit"];
SETGLASSES(_unit,GLASSESDEFAULT);
private _currentGlasses = goggles _unit;
if (call FUNC(ExternalCamera)) exitWith {call FUNC(RemoveGlassesEffect)};
if (GVAR(OldGlasses) != _currentGlasses) then {
["ace_glassesChanged", [_unit, _currentGlasses]] call CBA_fnc_localEvent;
GVAR(OldGlasses) = _currentGlasses;
};
}] call CBA_fnc_addPlayerEventHandler;
if ([_unit] call FUNC(isGogglesVisible)) then {
_glasses call FUNC(applyGlassesEffect);
} else {
call FUNC(removeGlassesEffect);
// init pp effects
GVAR(PostProcess) = ppEffectCreate ["ColorCorrections", 1995];
GVAR(EffectsActive) = false;
// check goggles
private _fnc_checkGoggles = {
params ["_unit"];
if (GVAR(EffectsActive)) then {
if (call FUNC(externalCamera) || {!([_unit] call FUNC(isGogglesVisible))}) then {
call FUNC(removeGlassesEffect);
};
} else {
if (!(call FUNC(externalCamera)) && {[_unit] call FUNC(isGogglesVisible)}) then {
[goggles _unit] call FUNC(applyGlassesEffect);
};
};
};
}] call CBA_fnc_addEventHandler;
["ace_glassesCracked", {
params ["_unit"];
["cameraView", _fnc_checkGoggles] call CBA_fnc_addPlayerEventHandler;
["ace_activeCameraChanged", _fnc_checkGoggles] call CBA_fnc_addEventHandler;
_unit setVariable ["ACE_EyesDamaged", true];
GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0.5, 0.5, 0.5, 0.5], [1, 1, 1, 0]];
GVAR(PostProcessEyes) ppEffectCommit 0;
GVAR(PostProcessEyes) ppEffectEnable true;
// add glasses eventhandlers
["ace_glassesChanged", {
params ["_unit", "_glasses"];
[{
GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [1, 1, 1, 1], [1, 1, 1, 0]];
GVAR(PostProcessEyes) ppEffectCommit 5;
SETGLASSES(_unit,GLASSESDEFAULT);
[{
params ["_unit"];
if (call FUNC(ExternalCamera)) exitWith {call FUNC(RemoveGlassesEffect)};
GVAR(PostProcessEyes) ppEffectEnable false;
_unit setVariable ["ACE_EyesDamaged", false];
}, _this, 5] call CBA_fnc_waitAndExecute;
}, _unit, 25] call CBA_fnc_waitAndExecute;
}] call CBA_fnc_addEventHandler;
// check goggles
private _fnc_checkGoggles = {
params ["_unit"];
if (GVAR(EffectsActive)) then {
if (call FUNC(externalCamera) || {!([_unit] call FUNC(isGogglesVisible))}) then {
if ([_unit] call FUNC(isGogglesVisible)) then {
_glasses call FUNC(applyGlassesEffect);
} else {
call FUNC(removeGlassesEffect);
};
} else {
if (!(call FUNC(externalCamera)) && {[_unit] call FUNC(isGogglesVisible)}) then {
[goggles _unit] call FUNC(applyGlassesEffect);
};
}] call CBA_fnc_addEventHandler;
// // ---Add the Dust/Dirt/Rain Effects---
if (GVAR(effects) == 2) then {
// Register fire event handler
["ace_firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
//Add Explosion XEH
["CAManBase", "explosion", FUNC(handleExplosion)] call CBA_fnc_addClassEventHandler;
GVAR(PostProcessEyes) = ppEffectCreate ["ColorCorrections", 1992];
GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0, 0, 0, 1], [1, 1, 1, 0]];
GVAR(PostProcessEyes) ppEffectCommit 0;
GVAR(PostProcessEyes) ppEffectEnable false;
GVAR(PostProcessEyes_Enabled) = false;
GVAR(FrameEvent) = [false, [false, 20]];
GVAR(DustHandler) = -1;
GVAR(RainDrops) = objNull;
GVAR(RainActive) = false;
GVAR(RainLastLevel) = 0;
GVAR(surfaceCache) = "";
GVAR(surfaceCacheIsDust) = false;
["ace_glassesCracked", {
params ["_unit"];
_unit setVariable ["ACE_EyesDamaged", true];
GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [0.5, 0.5, 0.5, 0.5], [1, 1, 1, 0]];
GVAR(PostProcessEyes) ppEffectCommit 0;
GVAR(PostProcessEyes) ppEffectEnable true;
[{
GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0, 0, 0, 0], [1, 1, 1, 1], [1, 1, 1, 0]];
GVAR(PostProcessEyes) ppEffectCommit 5;
[{
params ["_unit"];
GVAR(PostProcessEyes) ppEffectEnable false;
_unit setVariable ["ACE_EyesDamaged", false];
}, _this, 5] call CBA_fnc_waitAndExecute;
}, _unit, 25] call CBA_fnc_waitAndExecute;
}] call CBA_fnc_addEventHandler;
// goggles effects main PFH
[{
BEGIN_COUNTER(goggles);
// rain
call FUNC(applyRainEffect);
// auto remove effects under water
if (GVAR(EffectsActive) && {underwater ACE_player} && {[goggles ACE_player] call FUNC(isDivingGoggles)}) then {
call FUNC(removeRainEffect);
call FUNC(removeDirtEffect);
call FUNC(removeDustEffect);
};
// rotor wash effect
call FUNC(applyRotorWashEffect);
END_COUNTER(goggles);
}, 0.5, []] call CBA_fnc_addPerFrameHandler;
};
};
["cameraView", _fnc_checkGoggles] call CBA_fnc_addPlayerEventHandler;
["ace_activeCameraChanged", _fnc_checkGoggles] call CBA_fnc_addEventHandler;
// goggles effects main PFH
[{
BEGIN_COUNTER(goggles);
// rain
call FUNC(applyRainEffect);
// auto remove effects under water
if (GVAR(EffectsActive) && {underwater ACE_player} && {[goggles ACE_player] call FUNC(isDivingGoggles)}) then {
call FUNC(removeRainEffect);
call FUNC(removeDirtEffect);
call FUNC(removeDustEffect);
};
// rotor wash effect
call FUNC(applyRotorWashEffect);
END_COUNTER(goggles);
}, 0.5, []] call CBA_fnc_addPerFrameHandler;
// Register fire event handler
["ace_firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler;
}] call CBA_fnc_addEventHandler;

View File

@ -46,13 +46,15 @@ if (_imagePath != "") then {
(GLASSDISPLAY displayCtrl 10650) ctrlSetText _imagePath;
};
if (GETDIRT) then {
call FUNC(applyDirtEffect);
};
if (GVAR(effects) == 2) then {
if (GETDIRT) then {
call FUNC(applyDirtEffect);
};
if (GETDUSTT(DACTIVE)) then {
SETDUST(DAMOUNT,CLAMP(GETDUSTT(DAMOUNT)-1,0,2));
call FUNC(applyDustEffect);
if (GETDUSTT(DACTIVE)) then {
SETDUST(DAMOUNT,CLAMP(GETDUSTT(DAMOUNT)-1,0,2));
call FUNC(applyDustEffect);
};
};
GVAR(EffectsActive) = true;

View File

@ -27,7 +27,7 @@ _effects set [BROKEN, _broken];
SETGLASSES(_unit,_effects);
if ((stance _unit != "PRONE") && {primaryWeapon _unit != ""} && {currentWeapon _unit == primaryWeapon _unit}) then {
_unit playActionNow "gestureWipeFace";
[_unit, "gestureWipeFace"] call EFUNC(common,doGesture);
};
[{

View File

@ -16,7 +16,7 @@
#include "script_component.hpp"
// Handle the ThreeDen Editor Camera
if ((!isNil {is3DEN}) && {is3DEN}) exitWith {true};
if (is3DEN) exitWith {true};
if (GVAR(showInThirdPerson)) then {
cameraView in ["GROUP"] || EFUNC(common,isFeatureCameraActive)

View File

@ -15,20 +15,21 @@
params ["_unit"];
if (_unit != ACE_player) exitWith {true};
GVAR(PostProcessEyes) ppEffectEnable false;
SETGLASSES(_unit,GLASSESDEFAULT);
if (GVAR(effects) == 0) exitWith {true};
call FUNC(removeGlassesEffect);
GVAR(EffectsActive) = false;
if (GVAR(effects) == 2) then {
GVAR(PostProcessEyes) ppEffectEnable false;
_unit setVariable ["ACE_EyesDamaged", false];
SETGLASSES(_unit,GLASSESDEFAULT);
if (GVAR(DustHandler) != -1) then {
[GVAR(DustHandler)] call CBA_fnc_removePerFrameHandler;
_unit setVariable ["ACE_EyesDamaged", false];
if (GVAR(DustHandler) != -1) then {
[GVAR(DustHandler)] call CBA_fnc_removePerFrameHandler;
};
GVAR(DustHandler) = -1;
};
GVAR(DustHandler) = -1;
true

View File

@ -22,6 +22,8 @@ if (!isNull (GLASSDISPLAY)) then {
GLASSDISPLAY closeDisplay 0;
};
call FUNC(removeDirtEffect);
call FUNC(removeRainEffect);
call FUNC(removeDustEffect);
if (GVAR(effects) == 2) then {
call FUNC(removeDirtEffect);
call FUNC(removeRainEffect);
call FUNC(removeDustEffect);
};

View File

@ -25,5 +25,14 @@
<Portuguese>Limpar Óculos</Portuguese>
<Italian>Pulisci gli occhiali</Italian>
</Key>
<Key ID="STR_ACE_Goggles_effects_displayName">
<English>Goggle Effects</English>
</Key>
<Key ID="STR_ACE_Goggles_effects_tintOnly">
<English>Tint</English>
</Key>
<Key ID="STR_ACE_Goggles_enabled_tintAndEffects">
<English>Tint + Effects</English>
</Key>
</Package>
</Project>

View File

@ -1,5 +1,11 @@
class CfgAmmo {
class Default;
class Grenade: Default {
GVAR(pullPinSound)[] = {"A3\sounds_f\weapons\grenades\Grenade_PullPin.wss", 1.5, 1, 10};
impactGroundSoft[] = {};
};
class FlareCore;
class FlareBase: FlareCore {
intensity = 20000;
@ -51,6 +57,7 @@ class CfgAmmo {
class ACE_G_Handflare_White: SmokeShell {
GVAR(flare) = 1;
GVAR(color)[] = {0.5,0.5,0.5,0.5};
GVAR(pullPinSound)[] = {"A3\sounds_f\weapons\smokeshell\smoke_1.wss", 0.4, 1, 10};
model = "\A3\weapons_f\ammo\flare_white";
dangerRadiusHit = -1;
suppressionRadiusHit = -1;
@ -97,4 +104,24 @@ class CfgAmmo {
effectsSmoke = "ACE_M84FlashbangEffect";
whistleDist = 0;
};
class Chemlight_base: SmokeShell {
GVAR(pullPinSound)[] = {"A3\sounds_f\weapons\Other\dry4.wss", 3, 2, 10};
soundImpactHard1[] = {"A3\sounds_f\characters\footsteps\concrete_run_1",1,1.8,65};
soundImpactHard2[] = {"A3\sounds_f\characters\footsteps\concrete_run_1",1,1.9,65};
soundImpactHard3[] = {"A3\sounds_f\characters\footsteps\concrete_run_1",1,1.6,65};
soundImpactHard4[] = {"A3\sounds_f\characters\footsteps\concrete_run_1",1,2,65};
soundImpactHard5[] = {"A3\sounds_f\characters\footsteps\concrete_run_1",1,1.5,65};
soundImpactHard6[] = {"A3\sounds_f\characters\footsteps\concrete_run_1",1,1.7,65};
soundImpactHard7[] = {"A3\sounds_f\characters\footsteps\concrete_run_1",1,2.1,65};
soundImpactIron1[] = {"A3\sounds_f\characters\footsteps\concrete_run_1",1,2.1,95};
soundImpactIron2[] = {"A3\sounds_f\characters\footsteps\steel_run_4",1,1.75,95};
soundImpactIron3[] = {"A3\sounds_f\characters\footsteps\steel_run_4",1,1.6,95};
soundImpactIron4[] = {"A3\sounds_f\characters\footsteps\steel_run_2",1,2,95};
soundImpactIron5[] = {"A3\sounds_f\characters\footsteps\steel_run_2",1,2.1,95};
soundImpactWoodExt1[] = {"A3\sounds_f\characters\footsteps\wood_run_ext_1",1,1.1,75};
soundImpactWoodExt2[] = {"A3\sounds_f\characters\footsteps\wood_run_ext_1",1,1.15,75};
soundImpactWoodExt3[] = {"A3\sounds_f\characters\footsteps\wood_run_ext_2",1,1.1,75};
soundImpactWoodExt4[] = {"A3\sounds_f\characters\footsteps\wood_run_ext_2",1,1.15,75};
};
};

View File

@ -27,8 +27,15 @@ if (isNull _projectile) then {
private _config = configFile >> "CfgAmmo" >> _ammo;
// handle special grenades
// handle special grenades and sounds
if (local _unit) then {
// handle priming sound, if present
private _soundConfig = getArray (configFile >> "CfgAmmo" >> _ammo >> QGVAR(pullPinSound));
if !(_soundConfig isEqualTo []) then {
_soundConfig params ["_file", "_volume", "_pitch", "_distance"];
playSound3D [_file, objNull, false, getPosASL _projectile, _volume, _pitch, _distance];
};
if (getNumber (_config >> QGVAR(flashbang)) == 1) then {
private _fuzeTime = getNumber (_config >> "explosionTime");

View File

@ -1,41 +0,0 @@
class CfgWeapons {
class Rifle_Long_Base_F;
/* Long Rifles */
class GM6_base_F: Rifle_Long_Base_F {
GVAR(allowGunbag) = 1;
};
class LRR_base_F: Rifle_Long_Base_F {
GVAR(allowGunbag) = 1;
};
class DMR_06_base_F: Rifle_Long_Base_F {
GVAR(allowGunbag) = 1;
};
class DMR_05_base_F: Rifle_Long_Base_F {
GVAR(allowGunbag) = 1;
};
class DMR_04_base_F: Rifle_Long_Base_F {
GVAR(allowGunbag) = 1;
};
class DMR_03_base_F: Rifle_Long_Base_F {
GVAR(allowGunbag) = 1;
};
class DMR_02_base_F: Rifle_Long_Base_F {
GVAR(allowGunbag) = 1;
};
class DMR_01_base_F: Rifle_Long_Base_F {
GVAR(allowGunbag) = 1;
};
class EBR_base_F: Rifle_Long_Base_F {
GVAR(allowGunbag) = 1;
};
};

View File

@ -7,3 +7,4 @@ PREP(status);
PREP(canInteract);
PREP(calculateMass);
PREP(hasGunbag);
PREP(isMachineGun);

View File

@ -16,4 +16,3 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"
#include "CfgWeapons.hpp"

View File

@ -20,12 +20,13 @@ params ["_unit", "_target"];
private _result = -1;
private _gunbag = backpackContainer _target;
private _weapon = primaryWeapon _unit;
if ((_gunbag getVariable [QGVAR(gunbagWeapon), []]) isEqualTo [] && {primaryWeapon _unit != ""} && {getNumber (configFile >> "CfgWeapons" >> primaryWeapon _unit >> QGVAR(allowGunbag)) == 1}) then {
if ((_gunbag getVariable [QGVAR(gunbagWeapon), []]) isEqualTo [] && {_weapon != ""} && {!(_weapon call FUNC(isMachineGun))}) then {
_result = 0;
};
if (!((_gunbag getVariable [QGVAR(gunbagWeapon), []]) isEqualTo []) && {primaryWeapon _unit == ""}) then {
if (!((_gunbag getVariable [QGVAR(gunbagWeapon), []]) isEqualTo []) && {_weapon == ""}) then {
_result = 1;
};

View File

@ -0,0 +1,29 @@
/*
* Author: commy2
* Reports true if a weapon is a machine gun.
*
* Arguments:
* 0: Weapon class name <STRING>
*
* Return Value:
* Is machine gun <BOOL>
*
* Example:
* (currentWeapon player) call ace_gunbag_fnc_isMachineGun
*
* Public: No
*/
#include "script_component.hpp"
params ["_weapon"];
private _config = _weapon call CBA_fnc_getItemConfig;
// definition of a machine gun by BIS_fnc_itemType
private _cursor = getText (_config >> "cursor");
if (toLower _cursor in ["", "emptycursor"]) then {
_cursor = getText (_config >> "cursorAim");
};
_cursor == "MG"

View File

@ -159,7 +159,7 @@ if (count GVAR(collectedActionPoints) > 1) then {
private _delta = vectorNormalized ((GVAR(collectedActionPoints) select _i select 1) vectorDiff (GVAR(collectedActionPoints) select _j select 1));
// If _i is inside a cone with 20º half angle with origin on _j
if (_delta select 2 > 0.94) exitWith {
if ((_delta select 2 > 0.94) && {((GVAR(collectedActionPoints) select _i select 1) distance2d (GVAR(collectedActionPoints) select _j select 1)) < 0.1}) exitWith {
GVAR(collectedActionPoints) deleteAt _i;
};
};

View File

@ -68,7 +68,7 @@ private _uid = format [QGVAR(ATCache_%1), _actionName];
private _activeActionTree = [
[_object, _baseActionNode, [], _distanceToBasePoint],
DFUNC(collectActiveActionTree),
_object, _uid, 1.0, "interactMenuClosed"
_object, _uid, 1.0, "ace_interactMenuClosed"
] call EFUNC(common,cachedCall);
END_COUNTER(fnc_collectActiveActionTree)

View File

@ -20,7 +20,7 @@
params ["_unit", "_target"];
_unit playActionNow "GestureGo";
[_unit, "GestureGo"] call EFUNC(common,doGesture);
private "_chance";
_chance = [0.5, 0.8] select (count weapons _unit > 0);

View File

@ -45,7 +45,7 @@ _player removeMagazines _magToPassClassName;
};
} foreach _filteredMags;
_player playActionNow "PutDown";
[_player, "PutDown"] call EFUNC(common,doGesture);
_target addMagazine [_magToPassClassName, _magToPassAmmoCount];

View File

@ -20,7 +20,7 @@
params ["_unit"];
_unit playActionNow "GestureGo";
[_unit, "GestureGo"] call EFUNC(common,doGesture);
private "_chance";
_chance = [0.5, 0.8] select (count weapons _unit > 0);

View File

@ -23,6 +23,6 @@ if (_unit == ACE_player) then {
addCamShake [4, 0.5, 5];
};
_unit playActionNow "PutDown";
[_unit, "PutDown"] call EFUNC(common,doGesture);
[QGVAR(tapShoulder), [_target, _shoulderNum], [_target]] call CBA_fnc_targetEvent;

View File

@ -2,12 +2,12 @@
#include "script_component.hpp"
TRACE_1("enter", _this);
private["_player", "_currentFireMode"];
private _currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player};
private _currentFireMode = _currentShooter getVariable["ace_missileguidance_attackProfile", "JAV_TOP"];
_currentFireMode = ACE_player getVariable["ace_missileguidance_attackProfile", "JAV_TOP"];
if(_currentFireMode == "JAV_DIR") then {
_currentFireMode = "JAV_TOP";
} else {
_currentFireMode = "JAV_DIR";
};
ACE_player setVariable["ace_missileguidance_attackProfile", _currentFireMode, false];
_currentShooter setVariable["ace_missileguidance_attackProfile", _currentFireMode, false];

View File

@ -11,7 +11,7 @@ private["_firedEH", "_fov", "_lastTick", "_lockTime", "_maxX", "_maxY", "_minX",
private["_offsetX", "_offsetY", "_pos", "_randomLockInterval", "_randomPosWithinBounds", "_range"];
private["_runTime", "_soundTime", "_targetArray", "_zamerny", "_currentShooter"];
_currentShooter = (vehicle ACE_player);
_currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player};
#define __OffsetX ((ctrlPosition __JavelinIGUITargetingLineV) select 0) - 0.5
#define __OffsetY ((ctrlPosition __JavelinIGUITargetingLineH) select 1) - 0.5

View File

@ -2,13 +2,15 @@
#include "script_component.hpp"
TRACE_1("enter", _this);
#define __LOCKONTIMERANDOM 2 // Deviation in lock on time
#define __LOCKONTIMERANDOM 1 // Deviation in lock on time
if((count _this) > 0) then {
uiNameSpace setVariable ['ACE_RscOptics_javelin',_this select 0];
};
ACE_player setVariable ["ace_missileguidance_target",nil, false];
private _currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player};
TRACE_2("shooter",_currentShooter,typeOf _currentShooter);
_currentShooter setVariable ["ace_missileguidance_target", nil, false];
__JavelinIGUISeek ctrlSetTextColor __ColorGray;
__JavelinIGUINFOV ctrlSetTextColor __ColorGray;

View File

@ -2,9 +2,9 @@
#include "script_component.hpp"
TRACE_1("enter", _this);
private["_player", "_currentFireMode"];
private _currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player};
private _currentFireMode = _currentShooter getVariable ["ace_missileguidance_attackProfile", "JAV_TOP"];
_currentFireMode = ACE_player getVariable["ace_missileguidance_attackProfile", "JAV_TOP"];
if(_currentFireMode == "JAV_TOP") then {
__JavelinIGUITop ctrlSetTextColor __ColorGreen;
__JavelinIGUIDir ctrlSetTextColor __ColorGray;

View File

@ -8,7 +8,8 @@ class CfgPatches {
requiredVersion = REQUIRED_VERSION;
requiredAddons[] = {
// Vanilla
"3den",
"a3_3den",
"a3_3den_language",
"a3_air_f",
"a3_air_f_beta",
"a3_air_f_beta_heli_attack_01",
@ -17,10 +18,21 @@ class CfgPatches {
"a3_air_f_beta_heli_transport_02",
"a3_air_f_beta_parachute_01",
"a3_air_f_beta_parachute_02",
"a3_air_f_epb",
"a3_air_f_epb_heli_light_03",
"a3_air_f_epc",
"a3_air_f_epc_plane_cas_01",
"a3_air_f_epc_plane_cas_02",
"a3_air_f_epc_plane_fighter_03",
"a3_air_f_exp",
"a3_air_f_exp_heli_light_01",
"a3_air_f_exp_heli_transport_01",
"a3_air_f_exp_plane_civil_01",
"a3_air_f_exp_uav_03",
"a3_air_f_exp_uav_04",
"a3_air_f_exp_vtol_01",
"a3_air_f_exp_vtol_02",
"a3_air_f_gamma",
"a3_air_f_gamma_plane_fighter_03",
"a3_air_f_gamma_uav_01",
"a3_air_f_gamma_uav_02",
@ -38,6 +50,11 @@ class CfgPatches {
"a3_air_f_heli_light_02",
"a3_animals_f",
"a3_animals_f_animconfig",
"a3_animals_f_beta",
"a3_animals_f_beta_chicken",
"a3_animals_f_beta_dog",
"a3_animals_f_beta_goat",
"a3_animals_f_beta_sheep",
"a3_animals_f_chicken",
"a3_animals_f_dog",
"a3_animals_f_fishes",
@ -49,42 +66,75 @@ class CfgPatches {
"a3_animals_f_snakes",
"a3_animals_f_turtle",
"a3_anims_f",
"a3_anims_f_bootcamp",
"a3_anims_f_config_sdr",
"a3_anims_f_config_sdr_weaponswitching",
"a3_anims_f_data",
"a3_anims_f_epa",
"a3_anims_f_epc",
"a3_anims_f_exp",
"a3_anims_f_exp_a",
"a3_anims_f_exp_revive",
"a3_anims_f_heli",
"a3_anims_f_kart",
"a3_anims_f_mark",
"a3_anims_f_mark_deployment",
"a3_armor_f",
"a3_armor_f_amv",
"a3_armor_f_apc_wheeled_03",
"a3_armor_f_beta",
"a3_armor_f_beta_apc_tracked_01",
"a3_armor_f_beta_apc_tracked_02",
"a3_armor_f_beta_apc_wheeled_01",
"a3_armor_f_beta_apc_wheeled_02",
"a3_armor_f_epb",
"a3_armor_f_epb_apc_tracked_03",
"a3_armor_f_epb_mbt_03",
"a3_armor_f_epc",
"a3_armor_f_epc_mbt_01",
"a3_armor_f_exp",
"a3_armor_f_exp_apc_tracked_02",
"a3_armor_f_exp_apc_wheeled_02",
"a3_armor_f_exp_mbt_02",
"a3_armor_f_gamma",
"a3_armor_f_gamma_apc_wheeled_03",
"a3_armor_f_gamma_mbt_01",
"a3_armor_f_gamma_mbt_02",
"a3_armor_f_marid",
"a3_armor_f_panther",
"a3_armor_f_slammer",
"a3_armor_f_t100k",
"a3_baseconfig_f",
"a3_boat_f",
"a3_boat_f_beta",
"a3_boat_f_beta_boat_armed_01",
"a3_boat_f_beta_boat_transport_01",
"a3_boat_f_beta_sdv_01",
"a3_boat_f_boat_armed_01",
"a3_boat_f_boat_transport_01",
"a3_boat_f_civilian_boat",
"a3_boat_f_epc",
"a3_boat_f_epc_submarine_01",
"a3_boat_f_epc_submarine_01_f",
"a3_boat_f_exp",
"a3_boat_f_exp_boat_transport_01",
"a3_boat_f_exp_boat_transport_02",
"a3_boat_f_exp_scooter_transport_01",
"a3_boat_f_gamma",
"a3_boat_f_gamma_boat_civil_01",
"a3_boat_f_gamma_boat_civil_04",
"a3_boat_f_gamma_boat_transport_01",
"a3_boat_f_heli",
"a3_boat_f_heli_boat_armed_01",
"a3_boat_f_heli_sdv_01",
"a3_boat_f_sdv_01",
"a3_boat_f_trawler",
"a3_cargoposes_f",
"a3_cargoposes_f_exp",
"a3_cargoposes_f_heli",
"a3_characters_f",
"a3_characters_f_beta",
"a3_characters_f_beta_indep",
"a3_characters_f_blufor",
"a3_characters_f_bootcamp",
"a3_characters_f_bootcamp_common",
@ -94,6 +144,10 @@ class CfgPatches {
"a3_characters_f_epb",
"a3_characters_f_epb_heads",
"a3_characters_f_epc",
"a3_characters_f_exp",
"a3_characters_f_exp_civil",
"a3_characters_f_exp_headgear",
"a3_characters_f_exp_vests",
"a3_characters_f_gamma",
"a3_characters_f_heads",
"a3_characters_f_indep",
@ -110,22 +164,54 @@ class CfgPatches {
"a3_data_f_curator_misc",
"a3_data_f_curator_respawn",
"a3_data_f_curator_virtual",
"a3_data_f_exp",
"a3_data_f_exp_a",
"a3_data_f_exp_a_virtual",
"a3_data_f_exp_b",
"a3_data_f_exp_particleeffects",
"a3_data_f_heli",
"a3_data_f_hook",
"a3_data_f_kart",
"a3_data_f_kart_particleeffects",
"a3_data_f_mark",
"a3_data_f_particleeffects",
"a3_drones_f",
"a3_drones_f_air_f_gamma_uav_01",
"a3_drones_f_air_f_gamma_uav_02",
"a3_drones_f_characters_f_gamma",
"a3_drones_f_soft_f_gamma_ugv_01",
"a3_drones_f_weapons_f_gamma_ammoboxes",
"a3_drones_f_weapons_f_gamma_items",
"a3_dubbing_f",
"a3_dubbing_f_beta",
"a3_dubbing_f_bootcamp",
"a3_dubbing_f_epa",
"a3_dubbing_f_epb",
"a3_dubbing_f_epc",
"a3_dubbing_f_exp",
"a3_dubbing_f_gamma",
"a3_dubbing_f_heli",
"a3_dubbing_f_mark",
"a3_dubbing_f_mp_mark",
"a3_dubbing_radio_f",
"a3_dubbing_radio_f_data_eng",
"a3_dubbing_radio_f_data_engb",
"a3_dubbing_radio_f_data_gre",
"a3_dubbing_radio_f_data_per",
"a3_dubbing_radio_f_data_vr",
"a3_dubbing_radio_f_exp",
"a3_dubbing_radio_f_exp_data_chi",
"a3_dubbing_radio_f_exp_data_engfre",
"a3_dubbing_radio_f_exp_data_fre",
"a3_editor_f",
"a3_editorpreviews_f",
"a3_editorpreviews_f_exp",
"a3_functions_f",
"a3_functions_f_bootcamp",
"a3_functions_f_curator",
"a3_functions_f_epa",
"a3_functions_f_epc",
"a3_functions_f_exp",
"a3_functions_f_exp_a",
"a3_functions_f_heli",
"a3_functions_f_mark",
@ -137,7 +223,9 @@ class CfgPatches {
"a3_language_f_epa",
"a3_language_f_epb",
"a3_language_f_epc",
"a3_language_f_exp",
"a3_language_f_exp_a",
"a3_language_f_exp_b",
"a3_language_f_gamma",
"a3_language_f_heli",
"a3_language_f_kart",
@ -145,32 +233,69 @@ class CfgPatches {
"a3_language_f_mp_mark",
"a3_languagemissions_f",
"a3_languagemissions_f_beta",
"a3_languagemissions_f_bootcamp",
"a3_languagemissions_f_epa",
"a3_languagemissions_f_epb",
"a3_languagemissions_f_epc",
"a3_languagemissions_f_exp",
"a3_languagemissions_f_exp_a",
"a3_languagemissions_f_gamma",
"a3_languagemissions_f_heli",
"a3_languagemissions_f_kart",
"a3_languagemissions_f_mark",
"a3_languagemissions_f_mp_mark",
"a3_map_altis",
"a3_map_altis_data",
"a3_map_altis_data_layers",
"a3_map_altis_scenes",
"a3_map_altis_scenes_f",
"a3_map_data",
"a3_map_stratis",
"a3_map_stratis_data",
"a3_map_stratis_data_layers",
"a3_map_stratis_scenes",
"a3_map_stratis_scenes_f",
"a3_map_vr",
"a3_map_vr_scenes",
"a3_map_vr_scenes_f",
"a3_misc_f",
"a3_misc_f_helpers",
"a3_missions_f",
"a3_missions_f_beta",
"a3_missions_f_beta_data",
"a3_missions_f_beta_video",
"a3_missions_f_bootcamp",
"a3_missions_f_bootcamp_data",
"a3_missions_f_bootcamp_video",
"a3_missions_f_curator",
"a3_missions_f_data",
"a3_missions_f_epa",
"a3_missions_f_epa_data",
"a3_missions_f_epa_video",
"a3_missions_f_epb",
"a3_missions_f_epc",
"a3_missions_f_exp",
"a3_missions_f_exp_a",
"a3_missions_f_exp_a_data",
"a3_missions_f_exp_data",
"a3_missions_f_exp_video",
"a3_missions_f_gamma",
"a3_missions_f_gamma_data",
"a3_missions_f_gamma_video",
"a3_missions_f_heli",
"a3_missions_f_heli_data",
"a3_missions_f_heli_video",
"a3_missions_f_kart",
"a3_missions_f_kart_data",
"a3_missions_f_mark",
"a3_missions_f_mark_data",
"a3_missions_f_mark_video",
"a3_missions_f_mp_mark",
"a3_missions_f_mp_mark_data",
"a3_missions_f_video",
"a3_modules_f",
"a3_modules_f_beta",
"a3_modules_f_beta_data",
"a3_modules_f_beta_firingdrills",
"a3_modules_f_bootcamp",
"a3_modules_f_bootcamp_misc",
@ -191,18 +316,22 @@ class CfgPatches {
"a3_modules_f_curator_ordnance",
"a3_modules_f_curator_respawn",
"a3_modules_f_curator_smokeshells",
"a3_modules_f_data",
"a3_modules_f_dyno",
"a3_modules_f_effects",
"a3_modules_f_epb",
"a3_modules_f_epb_misc",
"a3_modules_f_events",
"a3_modules_f_exp",
"a3_modules_f_exp_a",
"a3_modules_f_groupmodifiers",
"a3_modules_f_hc",
"a3_modules_f_heli",
"a3_modules_f_heli_misc",
"a3_modules_f_heli_spawnai",
"a3_modules_f_intel",
"a3_modules_f_kart",
"a3_modules_f_kart_data",
"a3_modules_f_kart_timetrials",
"a3_modules_f_livefeed",
"a3_modules_f_mark",
@ -211,6 +340,7 @@ class CfgPatches {
"a3_modules_f_marta",
"a3_modules_f_misc",
"a3_modules_f_mp_mark",
"a3_modules_f_mp_mark_objectives",
"a3_modules_f_multiplayer",
"a3_modules_f_objectmodifiers",
"a3_modules_f_sites",
@ -220,65 +350,143 @@ class CfgPatches {
"a3_modules_f_uav",
"a3_music_f",
"a3_music_f_bootcamp",
"a3_music_f_bootcamp_music",
"a3_music_f_epa",
"a3_music_f_epa_music",
"a3_music_f_epb",
"a3_music_f_epb_music",
"a3_music_f_epc",
"a3_music_f_epc_music",
"a3_music_f_exp",
"a3_music_f_exp_music",
"a3_music_f_heli",
"a3_music_f_heli_music",
"a3_music_f_mark",
"a3_music_f_mark_music",
"a3_music_f_music",
"a3_plants_f",
"a3_plants_f_bush",
"a3_props_f_exp",
"a3_props_f_exp_a",
"a3_props_f_exp_a_military",
"a3_props_f_exp_a_military_equipment",
"a3_props_f_exp_civilian",
"a3_props_f_exp_civilian_garbage",
"a3_props_f_exp_commercial",
"a3_props_f_exp_commercial_market",
"a3_props_f_exp_industrial",
"a3_props_f_exp_industrial_heavyequipment",
"a3_props_f_exp_infrastructure",
"a3_props_f_exp_infrastructure_railways",
"a3_props_f_exp_infrastructure_traffic",
"a3_props_f_exp_military",
"a3_props_f_exp_military_camps",
"a3_props_f_exp_military_oldplanewrecks",
"a3_props_f_exp_naval",
"a3_props_f_exp_naval_boats",
"a3_roads_f",
"a3_rocks_f",
"a3_rocks_f_blunt",
"a3_rocks_f_sharp",
"a3_rocks_f_water",
"a3_signs_f",
"a3_signs_f_ad",
"a3_signs_f_signs_ad",
"a3_soft_f",
"a3_soft_f_beta",
"a3_soft_f_beta_mrap_03",
"a3_soft_f_beta_quadbike",
"a3_soft_f_beta_quadbike_01",
"a3_soft_f_beta_truck_01",
"a3_soft_f_beta_truck_02",
"a3_soft_f_bootcamp",
"a3_soft_f_bootcamp_offroad_01",
"a3_soft_f_bootcamp_quadbike",
"a3_soft_f_bootcamp_quadbike_01",
"a3_soft_f_bootcamp_truck",
"a3_soft_f_bootcamp_van_01",
"a3_soft_f_car",
"a3_soft_f_crusher_ugv",
"a3_soft_f_epc",
"a3_soft_f_epc_truck_03",
"a3_soft_f_exp",
"a3_soft_f_exp_lsv_01",
"a3_soft_f_exp_lsv_02",
"a3_soft_f_exp_mrap_02",
"a3_soft_f_exp_offroad_01",
"a3_soft_f_exp_offroad_02",
"a3_soft_f_exp_quadbike_01",
"a3_soft_f_exp_truck_03",
"a3_soft_f_exp_ugv_01",
"a3_soft_f_exp_van_01",
"a3_soft_f_gamma",
"a3_soft_f_gamma_hatchback_01",
"a3_soft_f_gamma_hemtt",
"a3_soft_f_gamma_offroad",
"a3_soft_f_gamma_offroad_01",
"a3_soft_f_gamma_quadbike",
"a3_soft_f_gamma_quadbike_01",
"a3_soft_f_gamma_suv_01",
"a3_soft_f_gamma_truck_01",
"a3_soft_f_gamma_truck_02",
"a3_soft_f_gamma_truckheavy",
"a3_soft_f_gamma_van_01",
"a3_soft_f_heli",
"a3_soft_f_heli_car",
"a3_soft_f_heli_crusher_ugv",
"a3_soft_f_heli_hatchback_01",
"a3_soft_f_heli_mrap_01",
"a3_soft_f_heli_mrap_02",
"a3_soft_f_heli_mrap_03",
"a3_soft_f_heli_quadbike",
"a3_soft_f_heli_quadbike_01",
"a3_soft_f_heli_suv",
"a3_soft_f_heli_suv_01",
"a3_soft_f_heli_truck",
"a3_soft_f_heli_ugv_01",
"a3_soft_f_heli_van_01",
"a3_soft_f_hemtt",
"a3_soft_f_kart",
"a3_soft_f_kart_kart_01",
"a3_soft_f_mrap_01",
"a3_soft_f_mrap_02",
"a3_soft_f_mrap_03",
"a3_soft_f_offroad_01",
"a3_soft_f_quadbike",
"a3_soft_f_quadbike_01",
"a3_soft_f_suv",
"a3_soft_f_truck",
"a3_soft_f_truckheavy",
"a3_sounds_f",
"a3_sounds_f_arsenal",
"a3_sounds_f_bootcamp",
"a3_sounds_f_characters",
"a3_sounds_f_environment",
"a3_sounds_f_epb",
"a3_sounds_f_epc",
"a3_sounds_f_exp",
"a3_sounds_f_exp_a",
"a3_sounds_f_heli",
"a3_sounds_f_kart",
"a3_sounds_f_mark",
"a3_sounds_f_sfx",
"a3_sounds_f_vehicles",
"a3_static_f",
"a3_static_f_aa_01",
"a3_static_f_at_01",
"a3_static_f_beta",
"a3_static_f_beta_mortar_01",
"a3_static_f_exp",
"a3_static_f_gamma",
"a3_static_f_gamma_aa",
"a3_static_f_gamma_at",
"a3_static_f_gamma_mortar_01",
"a3_static_f_mark",
"a3_static_f_mark_designator_01",
"a3_static_f_mark_designator_02",
"a3_static_f_mortar_01",
"a3_structures_f",
"a3_structures_f_bootcamp",
"a3_structures_f_bootcamp_civ_camping",
"a3_structures_f_bootcamp_civ_sportsgrounds",
"a3_structures_f_bootcamp_ind_cargo",
@ -312,6 +520,7 @@ class CfgPatches {
"a3_structures_f_civ_sportsgrounds",
"a3_structures_f_civ_statues",
"a3_structures_f_civ_tourism",
"a3_structures_f_data",
"a3_structures_f_dominants",
"a3_structures_f_dominants_amphitheater",
"a3_structures_f_dominants_castle",
@ -319,6 +528,7 @@ class CfgPatches {
"a3_structures_f_dominants_hospital",
"a3_structures_f_dominants_lighthouse",
"a3_structures_f_dominants_wip",
"a3_structures_f_epa",
"a3_structures_f_epa_civ_camping",
"a3_structures_f_epa_civ_constructions",
"a3_structures_f_epa_items_electronics",
@ -328,6 +538,7 @@ class CfgPatches {
"a3_structures_f_epa_items_vessels",
"a3_structures_f_epa_mil_scrapyard",
"a3_structures_f_epa_walls",
"a3_structures_f_epb",
"a3_structures_f_epb_civ_accessories",
"a3_structures_f_epb_civ_camping",
"a3_structures_f_epb_civ_dead",
@ -340,6 +551,7 @@ class CfgPatches {
"a3_structures_f_epb_items_military",
"a3_structures_f_epb_items_vessels",
"a3_structures_f_epb_naval_fishing",
"a3_structures_f_epc",
"a3_structures_f_epc_civ_accessories",
"a3_structures_f_epc_civ_camping",
"a3_structures_f_epc_civ_garbage",
@ -357,6 +569,7 @@ class CfgPatches {
"a3_structures_f_exp_a_vr_blocks",
"a3_structures_f_exp_a_vr_helpers",
"a3_structures_f_furniture",
"a3_structures_f_heli",
"a3_structures_f_heli_civ_accessories",
"a3_structures_f_heli_civ_constructions",
"a3_structures_f_heli_civ_garbage",
@ -410,6 +623,7 @@ class CfgPatches {
"a3_structures_f_items_cans",
"a3_structures_f_items_documents",
"a3_structures_f_items_electronics",
"a3_structures_f_items_food",
"a3_structures_f_items_gadgets",
"a3_structures_f_items_luggage",
"a3_structures_f_items_medical",
@ -418,9 +632,11 @@ class CfgPatches {
"a3_structures_f_items_tools",
"a3_structures_f_items_valuables",
"a3_structures_f_items_vessels",
"a3_structures_f_kart",
"a3_structures_f_kart_civ_sportsgrounds",
"a3_structures_f_kart_mil_flags",
"a3_structures_f_kart_signs_companies",
"a3_structures_f_mark",
"a3_structures_f_mark_items_military",
"a3_structures_f_mark_items_sport",
"a3_structures_f_mark_mil_flags",
@ -454,6 +670,8 @@ class CfgPatches {
"a3_structures_f_training_invisibletarget",
"a3_structures_f_walls",
"a3_structures_f_wrecks",
"a3_supplies_f_exp",
"a3_supplies_f_exp_ammoboxes",
"a3_supplies_f_heli",
"a3_supplies_f_heli_bladders",
"a3_supplies_f_heli_cargonets",
@ -465,6 +683,8 @@ class CfgPatches {
"a3_ui_f",
"a3_ui_f_bootcamp",
"a3_ui_f_curator",
"a3_ui_f_data",
"a3_ui_f_exp",
"a3_ui_f_exp_a",
"a3_ui_f_heli",
"a3_ui_f_kart",
@ -479,13 +699,18 @@ class CfgPatches {
"a3_weapons_f_beta_acc",
"a3_weapons_f_beta_ammoboxes",
"a3_weapons_f_beta_ebr",
"a3_weapons_f_beta_longrangerifles_ebr",
"a3_weapons_f_beta_longrangerifles_gm6",
"a3_weapons_f_beta_longrangerifles_m320",
"a3_weapons_f_beta_rifles_khaybar",
"a3_weapons_f_beta_rifles_mx",
"a3_weapons_f_beta_rifles_trg20",
"a3_weapons_f_bootcamp",
"a3_weapons_f_bootcamp_ammoboxes",
"a3_weapons_f_bootcamp_longrangerifles_gm6",
"a3_weapons_f_bootcamp_longrangerifles_gm6_camo",
"a3_weapons_f_bootcamp_longrangerifles_m320",
"a3_weapons_f_bootcamp_longrangerifles_m320_camo",
"a3_weapons_f_csat",
"a3_weapons_f_dummyweapons",
"a3_weapons_f_ebr",
@ -500,15 +725,35 @@ class CfgPatches {
"a3_weapons_f_epb_acc",
"a3_weapons_f_epb_ammoboxes",
"a3_weapons_f_epb_longrangerifles_gm3",
"a3_weapons_f_epb_longrangerifles_gm6",
"a3_weapons_f_epb_longrangerifles_m320",
"a3_weapons_f_epb_rifles_mx_black",
"a3_weapons_f_epc",
"a3_weapons_f_exp",
"a3_weapons_f_exp_launchers_rpg32",
"a3_weapons_f_exp_launchers_rpg7",
"a3_weapons_f_exp_launchers_titan",
"a3_weapons_f_exp_longrangerifles_dmr_07",
"a3_weapons_f_exp_machineguns_lmg_03",
"a3_weapons_f_exp_pistols_pistol_01",
"a3_weapons_f_exp_rifles_ak12",
"a3_weapons_f_exp_rifles_akm",
"a3_weapons_f_exp_rifles_aks",
"a3_weapons_f_exp_rifles_arx",
"a3_weapons_f_exp_rifles_ctar",
"a3_weapons_f_exp_rifles_ctars",
"a3_weapons_f_exp_rifles_spar_01",
"a3_weapons_f_exp_rifles_spar_02",
"a3_weapons_f_exp_rifles_spar_03",
"a3_weapons_f_exp_smgs_smg_05",
"a3_weapons_f_explosives",
"a3_weapons_f_fia",
"a3_weapons_f_gamma",
"a3_weapons_f_gamma_acc",
"a3_weapons_f_gamma_ammoboxes",
"a3_weapons_f_gamma_items",
"a3_weapons_f_gamma_longrangerifles_ebr",
"a3_weapons_f_gamma_rifles_mx",
"a3_weapons_f_headgear",
"a3_weapons_f_itemholders",
"a3_weapons_f_items",
@ -516,7 +761,10 @@ class CfgPatches {
"a3_weapons_f_kart_pistols_pistol_signal_f",
"a3_weapons_f_launchers_law",
"a3_weapons_f_launchers_nlaw",
"a3_weapons_f_launchers_rpg32",
"a3_weapons_f_launchers_titan",
"a3_weapons_f_longrangerifles_dmr_01",
"a3_weapons_f_longrangerifles_ebr",
"a3_weapons_f_longrangerifles_gm6",
"a3_weapons_f_longrangerifles_m320",
"a3_weapons_f_machineguns_m200",
@ -530,6 +778,7 @@ class CfgPatches {
"a3_weapons_f_mark_longrangerifles_dmr_04",
"a3_weapons_f_mark_longrangerifles_dmr_05",
"a3_weapons_f_mark_longrangerifles_dmr_06",
"a3_weapons_f_mark_longrangerifles_ebr",
"a3_weapons_f_mark_longrangerifles_gm6",
"a3_weapons_f_mark_longrangerifles_gm6_camo",
"a3_weapons_f_mark_longrangerifles_m320",
@ -553,19 +802,72 @@ class CfgPatches {
"a3_weapons_f_rifles_khaybar",
"a3_weapons_f_rifles_mk20",
"a3_weapons_f_rifles_mx",
"a3_weapons_f_rifles_mx_black",
"a3_weapons_f_rifles_sdar",
"a3_weapons_f_rifles_smg_02",
"a3_weapons_f_rifles_trg20",
"a3_weapons_f_rifles_vector",
"a3_weapons_f_smgs_pdw2000",
"a3_weapons_f_smgs_smg_01",
"a3_weapons_f_smgs_smg_02",
"a3_weapons_f_uniforms",
"a3_weapons_f_vests",
"curatoronly_air_f_beta_heli_attack_01",
"curatoronly_air_f_beta_heli_attack_02",
"curatoronly_air_f_gamma_uav_01",
"curatoronly_armor_f_amv",
"curatoronly_armor_f_beta_apc_tracked_02",
"curatoronly_armor_f_marid",
"curatoronly_armor_f_panther",
"curatoronly_armor_f_slammer",
"curatoronly_armor_f_t100k",
"curatoronly_boat_f_boat_armed_01",
"curatoronly_characters_f_blufor",
"curatoronly_characters_f_common",
"curatoronly_characters_f_opfor",
"curatoronly_modules_f_curator_animals",
"curatoronly_modules_f_curator_chemlights",
"curatoronly_modules_f_curator_effects",
"curatoronly_modules_f_curator_environment",
"curatoronly_modules_f_curator_flares",
"curatoronly_modules_f_curator_lightning",
"curatoronly_modules_f_curator_mines",
"curatoronly_modules_f_curator_objectives",
"curatoronly_modules_f_curator_ordnance",
"curatoronly_modules_f_curator_smokeshells",
"curatoronly_signs_f",
"curatoronly_soft_f_crusher_ugv",
"curatoronly_soft_f_mrap_01",
"curatoronly_soft_f_mrap_02",
"curatoronly_soft_f_quadbike",
"curatoronly_static_f_gamma",
"curatoronly_static_f_mortar_01",
"curatoronly_structures_f_civ_ancient",
"curatoronly_structures_f_civ_camping",
"curatoronly_structures_f_civ_garbage",
"curatoronly_structures_f_epa_civ_constructions",
"curatoronly_structures_f_epb_civ_dead",
"curatoronly_structures_f_ind_cargo",
"curatoronly_structures_f_ind_crane",
"curatoronly_structures_f_ind_reservoirtank",
"curatoronly_structures_f_ind_transmitter_tower",
"curatoronly_structures_f_items_vessels",
"curatoronly_structures_f_mil_bagbunker",
"curatoronly_structures_f_mil_bagfence",
"curatoronly_structures_f_mil_cargo",
"curatoronly_structures_f_mil_fortification",
"curatoronly_structures_f_mil_radar",
"curatoronly_structures_f_mil_shelters",
"curatoronly_structures_f_research",
"curatoronly_structures_f_walls",
"curatoronly_structures_f_wrecks",
"a3data",
"3den",
"map_vr",
// CBA
"extended_eventhandlers",
"cba_ui",
"cba_xeh",
"cba_xeh_a3",
"cba_jr"
};
author = ECSTRING(common,ACETeam);

View File

@ -84,6 +84,7 @@
#define TYPE_BACKPACK 901
#ifdef DISABLE_COMPILE_CACHE
#undef PREP
#define PREP(fncName) DFUNC(fncName) = compile preprocessFileLineNumbers QPATHTOF(functions\DOUBLES(fnc,fncName).sqf)
#else
#undef PREP

View File

@ -5,14 +5,14 @@
#define MAJOR 3
#define MINOR 6
#define PATCHLVL 0
#define PATCHLVL 2
#define BUILD 0
#define VERSION MAJOR.MINOR.PATCHLVL.BUILD
#define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD
// MINIMAL required version for the Mod. Components can specify others..
#define REQUIRED_VERSION 1.60
#define REQUIRED_VERSION 1.62
#define REQUIRED_CBA_VERSION {2,4,1}
#ifdef COMPONENT_BEAUTIFIED

View File

@ -22,6 +22,8 @@
<Spanish>http://ace3mod.com/</Spanish>
<Italian>http://ace3mod.com/</Italian>
<French>http://ace3mod.com/</French>
<Korean>http://ace3mod.com/</Korean>
<Japanese>http://ace3mod.com/</Japanese>
</Key>
</Package>
</Project>

View File

@ -0,0 +1,70 @@
class ctrlToolbox;
class Cfg3DEN {
class Attributes {
class Default;
class Title: Default {
class Controls {
class Title;
};
};
class GVAR(isMedicControl): Title {
attributeLoad = "(_this controlsGroupCtrl 100) lbsetcursel (((_value + 1) min 3) max 0);";
attributeSave = "(missionnamespace getvariable ['ace_isMeidc_temp',0]) - 1;";
class Controls: Controls {
class Title: Title{};
class Value: ctrlToolbox {
idc = 100;
style = "0x02";
x = "48 * (pixelW * pixelGrid * 0.50)";
w = "82 * (pixelW * pixelGrid * 0.50)";
h = "5 * (pixelH * pixelGrid * 0.50)";
rows = 1;
columns = 4;
strings[] = {"$STR_3DEN_Attributes_Lock_Default_text", CSTRING(AssignMedicRoles_role_none), CSTRING(AssignMedicRoles_role_medic), CSTRING(AssignMedicRoles_role_doctorShort)};
onToolboxSelChanged = "missionnamespace setvariable ['ace_isMeidc_temp',_this select 1];";
};
};
};
};
class Object {
class AttributeCategories {
class ace_attributes {
class Attributes {
class ace_isMedic {
property = QUOTE(ace_isMedic);
control = QGVAR(isMedicControl);
displayName = CSTRING(AssignMedicRoles_role_DisplayName);
tooltip = CSTRING(Attributes_isMedic_Description);
expression = QUOTE(if (_value != -1) then {_this setVariable [ARR_3(QUOTE(QGVAR(medicClass)),_value, true)];};);
typeName = "NUMBER";
condition = "objectBrain";
defaultValue = "-1";
};
class ace_isMedicalVehicle {
property = QUOTE(ace_isMedicalVehicle);
value = 0;
control = "CheckboxNumber";
displayName = CSTRING(AssignMedicVehicle_enabled_DisplayName);
tooltip = CSTRING(Attributes_isMedicalVehicle_Description);
expression = QUOTE(_this setVariable [ARR_3(QUOTE(QGVAR(medicClass)),_value, true)];);
typeName = "NUMBER";
condition = "objectVehicle";
defaultValue = 0;
};
class ace_isMedicalFacility {
property = QUOTE(ace_isMedicalFacility);
value = 0;
control = "Checkbox";
displayName = CSTRING(AssignMedicalFacility_enabled_DisplayName);
tooltip = CSTRING(AssignMedicalFacility_enabled_Description);
expression = QUOTE(_this setVariable [ARR_3(QUOTE(QGVAR(isMedicalFacility)),_value, true)];);
typeName = "BOOL";
condition = "(1 - objectBrain) * (1 - objectVehicle)";
defaultValue = "false";
};
};
};
};
};
};

View File

@ -0,0 +1,34 @@
/*
* Author: PabstMirror
* Removes corpse. Idealy it is just deleted the next frame,
* but player bodies cannot be deleted until they respawn, so it is hidden and deleted later.
*
* Arguments:
* 0: Mr Body <OBJECT>
*
* Return Value:
* Nothing
*
* Example:
* [cursorTarget] call ace_medical_fnc_serverRemoveBody
*
* Public: No
*/
#include "script_component.hpp"
params ["_target"];
TRACE_2("",_target,isPlayer _target);
//Hide the body globaly
[QEGVAR(common,hideObjectGlobal), [_target, true]] call CBA_fnc_serverEvent;
if (isNil QGVAR(bodiesToDelete)) then {GVAR(bodiesToDelete) = [];};
GVAR(bodiesToDelete) pushBack _target;
// Start up a loop to wait for bodies to be free to delete
if ((count GVAR(bodiesToDelete)) == 1) then {
[] call FUNC(bodyCleanupLoop);
};
nil

View File

@ -43,7 +43,6 @@ if (!local _unit) exitWith {
};
_unit setVariable ["ACE_isUnconscious", true, true];
_unit setUnconscious true;
if (_unit == ACE_player) then {
if (visibleMap) then {openMap false};

View File

@ -20,4 +20,4 @@
params ["", "_target", "_selection", "_classname"];
// parameters, function, namespace, uid
[_this, DFUNC(canTreat), _target, format [QGVAR(canTreat_%1_%2), _selection, _classname], MAX_DURATION_CACHE, "clearConditionCaches"] call EFUNC(common,cachedCall);
[_this, DFUNC(canTreat), _target, format [QGVAR(canTreat_%1_%2), _selection, _classname], MAX_DURATION_CACHE, QEGVAR(interact_menu,clearConditionCaches)] call EFUNC(common,cachedCall);

View File

@ -1,4 +1,4 @@
/*
/*
* Author: PabstMirror
* Updates the display (several times a second) called from the pfeh
*
@ -49,7 +49,7 @@ case (APP_MODE_INFODISPLAY): {
_compassAngleText = if (GVAR(settingUseMils)) then {
[(floor ((6400 / 360) * (([ACE_player] call CBA_fnc_headDir) select 0))), 4, 0] call CBA_fnc_formatNumber;
} else {
([(floor (([ACE_player] call CBA_fnc_headDir) select 0)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
([([ACE_player] call CBA_fnc_headDir) select 0, 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
};
(_display displayCtrl IDC_MODEDISPLAY_HEADINGNUM) ctrlSetText _compassAngleText;
@ -89,7 +89,7 @@ case (APP_MODE_INFODISPLAY): {
_bearingText = if (GVAR(settingUseMils)) then {
[(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber;
} else {
([(floor (_bearing)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
([_bearing, 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
};
_2dDistanceKm = ((getPosASL ACE_player) distance2D _targetPosLocationASL) / 1000;
_rangeText = format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)];
@ -109,7 +109,7 @@ case (APP_MODE_COMPASS): {
_compassAngleText = if (GVAR(settingUseMils)) then {
[(floor ((6400 / 360) * (([ACE_player] call CBA_fnc_headDir) select 0))), 4, 0] call CBA_fnc_formatNumber;
} else {
([(floor (([ACE_player] call CBA_fnc_headDir) select 0)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
([([ACE_player] call CBA_fnc_headDir) select 0, 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
};
(_display displayCtrl IDC_MODECOMPASS_HEADING) ctrlSetText _compassAngleText;
@ -145,7 +145,7 @@ case (APP_MODE_COMPASS): {
_bearingText = if (GVAR(settingUseMils)) then {
[(floor ((6400 / 360) * (_bearing))), 4, 0] call CBA_fnc_formatNumber;
} else {
([(floor (_bearing)), 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
([_bearing, 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8
};
_2dDistanceKm = ((getPosASL ACE_player) distance2D _targetPosLocationASL) / 1000;
_rangeText = format ["%1km", ([_2dDistanceKm, 1, 1] call CBA_fnc_formatNumber)];

View File

@ -1,6 +1,4 @@
class ACE_detector {
class detectableObjects {
};
class detectors {
class ACE_VMM3 {
radius = 2.5;

View File

@ -5,6 +5,6 @@ class Extended_PreInit_EventHandlers {
};
class Extended_PostInit_EventHandlers {
class ADDON {
clientInit = QUOTE( call COMPILE_FILE(XEH_clientInit) );
init = QUOTE( call COMPILE_FILE(XEH_postInit) );
};
};

View File

@ -1,22 +1,22 @@
class CfgSounds {
class ace_detector_1 {
name = "ace_detector_1";
sound[] = {QUOTE(PATHTOF(sounds\metal_detector.wav)), "db+1", 1};
sound[] = {QUOTE(PATHTOF(sounds\metal_detector.wss)), "db+3", 1};
titles[] = {};
};
class ace_detector_2 {
name = "ace_detector_2";
sound[] = {QUOTE(PATHTOF(sounds\metal_detector.wav)), "db+1", 0.9};
sound[] = {QUOTE(PATHTOF(sounds\metal_detector.wss)), "db+3", 0.9};
titles[] = {};
};
class ace_detector_3 {
name = "ace_detector_3";
sound[] = {QUOTE(PATHTOF(sounds\metal_detector.wav)), "db+1", 0.8};
sound[] = {QUOTE(PATHTOF(sounds\metal_detector.wss)), "db+3", 0.8};
titles[] = {};
};
class ace_detector_4 {
name = "ace_detector_4";
sound[] = {QUOTE(PATHTOF(sounds\metal_detector.wav)), "db+1", 0.7};
sound[] = {QUOTE(PATHTOF(sounds\metal_detector.wss)), "db+3", 0.7};
titles[] = {};
};
};

View File

@ -11,23 +11,40 @@ class CfgVehicles {
class CAManBase: Man {
class ACE_SelfActions {
class ACE_Equipment {
class GVAR(activate) {
displayName = CSTRING(ActivateDetector);
condition = QUOTE(call FUNC(canActivateDetector));
statement = QUOTE(call FUNC(activateDetector));
showDisabled = 0;
priority = 0.1;
icon = QPATHTOF(ui\icon_mineDetectorOn.paa);
exceptions[] = {};
};
class GVAR(deactivate) {
displayName = CSTRING(DeactivateDetector);
condition = QUOTE(call FUNC(canDeactivateDetector));
statement = QUOTE(call FUNC(deactivateDetector));
showDisabled = 0;
priority = 0.1;
icon = QPATHTOF(ui\icon_mineDetectorOff.paa);
class GVAR(metalDetector) {
displayName = CSTRING(MetalDetector);
condition = QUOTE([ACE_player] call FUNC(hasDetector));
statement = "";
icon = QPATHTOF(ui\icon_mineDetector.paa);
exceptions[] = {};
class GVAR(activate) {
displayName = CSTRING(ActivateDetector);
condition = QUOTE(call FUNC(canActivateDetector));
statement = QUOTE(call FUNC(activateDetector));
icon = QPATHTOF(ui\icon_mineDetectorOn.paa);
exceptions[] = {};
};
class GVAR(deactivate) {
displayName = CSTRING(DeactivateDetector);
condition = QUOTE(call FUNC(canDeactivateDetector));
statement = QUOTE(call FUNC(deactivateDetector));
icon = QPATHTOF(ui\icon_mineDetectorOff.paa);
exceptions[] = {};
};
class GVAR(connectHeadphones) {
displayName = CSTRING(ConnectHeadphones);
condition = QUOTE(call FUNC(canConnectHeadphones));
statement = QUOTE([ARR_2(ACE_player, true)] call FUNC(connectHeadphones));
icon = ""; //TODO
exceptions[] = {};
};
class GVAR(disconnectHeadphones) {
displayName = CSTRING(DisconnectHeadphones);
condition = QUOTE(call FUNC(canDisconnectHeadphones));
statement = QUOTE([ARR_2(ACE_player, false)] call FUNC(connectHeadphones));
icon = ""; //TODO
exceptions[] = {};
};
};
};
};

View File

@ -14,6 +14,8 @@ class CfgWeapons {
picture = QUOTE(PATHTOF(data\equip\w_vmm3_ca.paa));
magazines[] = { };
modes[] = { "Single" };
cursor = "EmptyCursor";
cursorAim = "EmptyCursor";
class Single: Mode_SemiAuto {
displayName = "";
sounds[] = {};

View File

@ -1,6 +1,9 @@
PREP(canActivateDetector);
PREP(canConnectHeadphones);
PREP(canDeactivateDetector);
PREP(canDisconnectHeadphones);
PREP(connectHeadphones);
PREP(activateDetector);
PREP(deactivateDetector);
PREP(hasDetector);

Some files were not shown because too many files have changed in this diff Show More