mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Cleaning up of all tabs in source code files.
This commit is contained in:
parent
1c28e82725
commit
1bb6be5654
@ -2,11 +2,11 @@
|
||||
#include "\z\ace\Addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_ATTACH
|
||||
#define DEBUG_MODE_FULL
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_ATTACH
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_ATTACH
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_ATTACH
|
||||
#endif
|
||||
|
||||
#include "\z\ace\Addons\main\script_macros.hpp"
|
@ -4,10 +4,10 @@
|
||||
_wall = _this select 0;
|
||||
|
||||
if (local _wall) then {
|
||||
_paper = "UserTexture_1x2_F" createVehicle position _wall;
|
||||
_paper = "UserTexture_1x2_F" createVehicle position _wall;
|
||||
|
||||
_paper attachTo [_wall, [0,-0.02,0.6]];
|
||||
_paper setDir getDir _wall;
|
||||
_paper attachTo [_wall, [0,-0.02,0.6]];
|
||||
_paper setDir getDir _wall;
|
||||
|
||||
_paper setObjectTextureGlobal [0, QUOTE(PATHTOF(textures\target_ca.paa))];
|
||||
_paper setObjectTextureGlobal [0, QUOTE(PATHTOF(textures\target_ca.paa))];
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ private "_index";
|
||||
_index = _conditionNames find _conditionName;
|
||||
|
||||
if (_index == -1) then {
|
||||
_index = count _conditionNames;
|
||||
_index = count _conditionNames;
|
||||
};
|
||||
|
||||
_conditionNames set [_index, _conditionName];
|
||||
|
@ -15,28 +15,28 @@ _id = _this select 0;
|
||||
_show = if (count _this > 1) then {_this select 1} else {false};
|
||||
|
||||
if (isnil QGVAR(SHOW_BLUR_SCREEN_COLLECTION)) then {
|
||||
GVAR(SHOW_BLUR_SCREEN_COLLECTION) = [];
|
||||
GVAR(SHOW_BLUR_SCREEN_COLLECTION) = [];
|
||||
};
|
||||
if (typeName _show == typeName 0) then {
|
||||
_show = (_show == 1);
|
||||
_show = (_show == 1);
|
||||
};
|
||||
|
||||
if (_show) then {
|
||||
GVAR(SHOW_BLUR_SCREEN_COLLECTION) pushback _id;
|
||||
// show blur
|
||||
if (isnil QGVAR(MENU_ppHandle_GUI_BLUR_SCREEN)) then {
|
||||
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) = ppEffectCreate ["DynamicBlur", 102];
|
||||
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectAdjust [0.9];
|
||||
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectEnable true;
|
||||
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectCommit 0;
|
||||
};
|
||||
GVAR(SHOW_BLUR_SCREEN_COLLECTION) pushback _id;
|
||||
// show blur
|
||||
if (isnil QGVAR(MENU_ppHandle_GUI_BLUR_SCREEN)) then {
|
||||
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) = ppEffectCreate ["DynamicBlur", 102];
|
||||
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectAdjust [0.9];
|
||||
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectEnable true;
|
||||
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) ppEffectCommit 0;
|
||||
};
|
||||
} else {
|
||||
GVAR(SHOW_BLUR_SCREEN_COLLECTION) = GVAR(SHOW_BLUR_SCREEN_COLLECTION) - [_id];
|
||||
if (GVAR(SHOW_BLUR_SCREEN_COLLECTION) isEqualTo []) then {
|
||||
// hide blur
|
||||
if (!isnil QGVAR(MENU_ppHandle_GUI_BLUR_SCREEN)) then {
|
||||
ppEffectDestroy GVAR(MENU_ppHandle_GUI_BLUR_SCREEN);
|
||||
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) = nil;
|
||||
};
|
||||
};
|
||||
GVAR(SHOW_BLUR_SCREEN_COLLECTION) = GVAR(SHOW_BLUR_SCREEN_COLLECTION) - [_id];
|
||||
if (GVAR(SHOW_BLUR_SCREEN_COLLECTION) isEqualTo []) then {
|
||||
// hide blur
|
||||
if (!isnil QGVAR(MENU_ppHandle_GUI_BLUR_SCREEN)) then {
|
||||
ppEffectDestroy GVAR(MENU_ppHandle_GUI_BLUR_SCREEN);
|
||||
GVAR(MENU_ppHandle_GUI_BLUR_SCREEN) = nil;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -34,13 +34,13 @@
|
||||
#define Y_POS_ICONS_SECOND (TOP_SIDE + (1.1 * ICON_WIDTH))
|
||||
|
||||
// setting values
|
||||
#define TOP_RIGHT_DOWN 1
|
||||
#define TOP_RIGHT_LEFT 2
|
||||
#define TOP_LEFT_DOWN 3
|
||||
#define TOP_LEFT_RIGHT 4
|
||||
#define TOP_RIGHT_DOWN 1
|
||||
#define TOP_RIGHT_LEFT 2
|
||||
#define TOP_LEFT_DOWN 3
|
||||
#define TOP_LEFT_RIGHT 4
|
||||
|
||||
// other constants
|
||||
#define DEFAULT_TIME 6
|
||||
#define DEFAULT_TIME 6
|
||||
|
||||
private ["_iconId", "_show", "_icon", "_allControls", "_refresh", "_timeAlive", "_list", "_color"];
|
||||
_iconId = _this select 0;
|
||||
@ -53,68 +53,68 @@ disableSerialization;
|
||||
_list = missionNamespace getvariable [QGVAR(displayIconList),[]];
|
||||
|
||||
_refresh = {
|
||||
private ["_allControls"];
|
||||
// Refreshing of all icons..
|
||||
_allControls = missionNamespace getvariable [QGVAR(displayIconListControls), []];
|
||||
{
|
||||
ctrlDelete _x;
|
||||
}foreach _allControls;
|
||||
private ["_allControls"];
|
||||
// Refreshing of all icons..
|
||||
_allControls = missionNamespace getvariable [QGVAR(displayIconListControls), []];
|
||||
{
|
||||
ctrlDelete _x;
|
||||
}foreach _allControls;
|
||||
|
||||
_allControls = [];
|
||||
_allControls = [];
|
||||
|
||||
private ["_ctrl", "_setting"];
|
||||
_setting = missionNamespace getvariable[QGVAR(settingFeedbackIcons), 0];
|
||||
if (_setting > 0) then {
|
||||
{
|
||||
// +19000 because we want to make certain we are using free IDCs..
|
||||
_ctrl = ((findDisplay 46) ctrlCreate ["RscPicture", _foreachIndex + 19000]);
|
||||
_position = switch (_setting) do {
|
||||
case TOP_RIGHT_DOWN: {[X_POS_ICONS, Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_RIGHT_LEFT: {[X_POS_ICONS_SECOND - ((_foreachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND - (ICON_WIDTH / 2), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_LEFT_DOWN: {[LEFT_SIDE + (0.5 * ICON_WIDTH), Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_LEFT_RIGHT: {[LEFT_SIDE + (0.5 * ICON_WIDTH) - ((_foreachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND, ICON_WIDTH, ICON_WIDTH]};
|
||||
default {[X_POS_ICONS, Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||
};
|
||||
_ctrl ctrlSetPosition _position;
|
||||
_ctrl ctrlsetText (_x select 1);
|
||||
_ctrl ctrlSetTextColor (_x select 2);
|
||||
_ctrl ctrlCommit 0;
|
||||
_allControls pushback _ctrl;
|
||||
}foreach (missionNamespace getvariable [QGVAR(displayIconList),[]]);
|
||||
};
|
||||
missionNamespace setvariable [QGVAR(displayIconListControls), _allControls];
|
||||
private ["_ctrl", "_setting"];
|
||||
_setting = missionNamespace getvariable[QGVAR(settingFeedbackIcons), 0];
|
||||
if (_setting > 0) then {
|
||||
{
|
||||
// +19000 because we want to make certain we are using free IDCs..
|
||||
_ctrl = ((findDisplay 46) ctrlCreate ["RscPicture", _foreachIndex + 19000]);
|
||||
_position = switch (_setting) do {
|
||||
case TOP_RIGHT_DOWN: {[X_POS_ICONS, Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_RIGHT_LEFT: {[X_POS_ICONS_SECOND - ((_foreachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND - (ICON_WIDTH / 2), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_LEFT_DOWN: {[LEFT_SIDE + (0.5 * ICON_WIDTH), Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||
case TOP_LEFT_RIGHT: {[LEFT_SIDE + (0.5 * ICON_WIDTH) - ((_foreachIndex+3) * DIFFERENCE_ICONS), Y_POS_ICONS_SECOND, ICON_WIDTH, ICON_WIDTH]};
|
||||
default {[X_POS_ICONS, Y_POS_ICONS + (_foreachIndex * DIFFERENCE_ICONS), ICON_WIDTH, ICON_WIDTH]};
|
||||
};
|
||||
_ctrl ctrlSetPosition _position;
|
||||
_ctrl ctrlsetText (_x select 1);
|
||||
_ctrl ctrlSetTextColor (_x select 2);
|
||||
_ctrl ctrlCommit 0;
|
||||
_allControls pushback _ctrl;
|
||||
}foreach (missionNamespace getvariable [QGVAR(displayIconList),[]]);
|
||||
};
|
||||
missionNamespace setvariable [QGVAR(displayIconListControls), _allControls];
|
||||
};
|
||||
|
||||
if (_show) then {
|
||||
if ({(_x select 0 == _iconId)} count _list == 0) then {
|
||||
_list pushback [_iconId, _icon, _color, time];
|
||||
} else {
|
||||
{
|
||||
if (_x select 0 == _iconId) exitwith {
|
||||
_list set [_foreachIndex, [_iconId, _icon, _color, time]];
|
||||
};
|
||||
}foreach _list;
|
||||
};
|
||||
missionNamespace setvariable [QGVAR(displayIconList), _list];
|
||||
call _refresh;
|
||||
if ({(_x select 0 == _iconId)} count _list == 0) then {
|
||||
_list pushback [_iconId, _icon, _color, time];
|
||||
} else {
|
||||
{
|
||||
if (_x select 0 == _iconId) exitwith {
|
||||
_list set [_foreachIndex, [_iconId, _icon, _color, time]];
|
||||
};
|
||||
}foreach _list;
|
||||
};
|
||||
missionNamespace setvariable [QGVAR(displayIconList), _list];
|
||||
call _refresh;
|
||||
|
||||
if (_timeAlive >= 0) then {
|
||||
[{
|
||||
if (_timeAlive >= 0) then {
|
||||
[{
|
||||
[_this select 0, false, "", [0,0,0], 0] call FUNC(displayIcon);
|
||||
}, [_iconId], _timeAlive, _timeAlive] call EFUNC(common,waitAndExecute);
|
||||
};
|
||||
};
|
||||
|
||||
} else {
|
||||
if ({(_x select 0 == _iconId)} count _list == 1) then {
|
||||
private "_newList";
|
||||
_newList = [];
|
||||
{
|
||||
if (_x select 0 != _iconId) then {
|
||||
_newList pushback _x;
|
||||
};
|
||||
}foreach _list;
|
||||
if ({(_x select 0 == _iconId)} count _list == 1) then {
|
||||
private "_newList";
|
||||
_newList = [];
|
||||
{
|
||||
if (_x select 0 != _iconId) then {
|
||||
_newList pushback _x;
|
||||
};
|
||||
}foreach _list;
|
||||
|
||||
missionNamespace setvariable [QGVAR(displayIconList), _newList];
|
||||
call _refresh;
|
||||
};
|
||||
missionNamespace setvariable [QGVAR(displayIconList), _newList];
|
||||
call _refresh;
|
||||
};
|
||||
};
|
||||
|
@ -7,19 +7,19 @@ _var = _this select 0;
|
||||
_depth = _this select 1;
|
||||
_pad = "";
|
||||
for "_i" from 0 to _depth do {
|
||||
_pad = _pad + toString [9];
|
||||
_pad = _pad + toString [9];
|
||||
};
|
||||
_depth = _depth + 1;
|
||||
if(IS_ARRAY(_var)) then {
|
||||
if((count _var) > 0) then {
|
||||
diag_log text format["%1[", _pad];
|
||||
{
|
||||
[_x, _depth] call FUNC(dumpArray);
|
||||
} forEach _var;
|
||||
diag_log text format["%1],", _pad];
|
||||
} else {
|
||||
diag_log text format["%1[],", _pad];
|
||||
};
|
||||
if((count _var) > 0) then {
|
||||
diag_log text format["%1[", _pad];
|
||||
{
|
||||
[_x, _depth] call FUNC(dumpArray);
|
||||
} forEach _var;
|
||||
diag_log text format["%1],", _pad];
|
||||
} else {
|
||||
diag_log text format["%1[],", _pad];
|
||||
};
|
||||
} else {
|
||||
diag_log text format["%1%2", _pad, [_var] call FUNC(formatVar)];
|
||||
diag_log text format["%1%2", _pad, [_var] call FUNC(formatVar)];
|
||||
};
|
||||
|
@ -6,42 +6,42 @@
|
||||
diag_log text format["REGISTERED ACE PFH HANDLERS"];
|
||||
diag_log text format["-------------------------------------------"];
|
||||
if(!isNil "ACE_PFH_COUNTER") then {
|
||||
{
|
||||
private["_pfh"];
|
||||
_pfh = _x select 0;
|
||||
diag_log text format["Registered PFH: id=%1, %1:%2", (_pfh select 0), (_pfh select 1), (_pfh select 2) ];
|
||||
} forEach ACE_PFH_COUNTER;
|
||||
{
|
||||
private["_pfh"];
|
||||
_pfh = _x select 0;
|
||||
diag_log text format["Registered PFH: id=%1, %1:%2", (_pfh select 0), (_pfh select 1), (_pfh select 2) ];
|
||||
} forEach ACE_PFH_COUNTER;
|
||||
};
|
||||
|
||||
diag_log text format["ACE COUNTER RESULTS"];
|
||||
diag_log text format["-------------------------------------------"];
|
||||
{
|
||||
private["_counterEntry", "_iter", "_total", "_count", "_delta", "_averageResult"];
|
||||
_counterEntry = _x;
|
||||
_iter = 0;
|
||||
_total = 0;
|
||||
_count = 0;
|
||||
_averageResult = 0;
|
||||
if( (count _counterEntry) > 3) then {
|
||||
// calc
|
||||
{
|
||||
if(_iter > 2) then {
|
||||
_count = _count + 1;
|
||||
_delta = (_x select 1) - (_x select 0);
|
||||
private["_counterEntry", "_iter", "_total", "_count", "_delta", "_averageResult"];
|
||||
_counterEntry = _x;
|
||||
_iter = 0;
|
||||
_total = 0;
|
||||
_count = 0;
|
||||
_averageResult = 0;
|
||||
if( (count _counterEntry) > 3) then {
|
||||
// calc
|
||||
{
|
||||
if(_iter > 2) then {
|
||||
_count = _count + 1;
|
||||
_delta = (_x select 1) - (_x select 0);
|
||||
|
||||
_total = _total + _delta;
|
||||
};
|
||||
_iter = _iter + 1;
|
||||
} forEach _counterEntry;
|
||||
_total = _total + _delta;
|
||||
};
|
||||
_iter = _iter + 1;
|
||||
} forEach _counterEntry;
|
||||
|
||||
// results
|
||||
_averageResult = (_total / _count) * 1000;
|
||||
// results
|
||||
_averageResult = (_total / _count) * 1000;
|
||||
|
||||
// dump results
|
||||
diag_log text format["%1: Average: %2s / %3 = %4ms", (_counterEntry select 0), _total, _count, _averageResult];
|
||||
} else {
|
||||
diag_log text format["%1: No results", (_counterEntry select 0) ];
|
||||
};
|
||||
// dump results
|
||||
diag_log text format["%1: Average: %2s / %3 = %4ms", (_counterEntry select 0), _total, _count, _averageResult];
|
||||
} else {
|
||||
diag_log text format["%1: No results", (_counterEntry select 0) ];
|
||||
};
|
||||
} forEach ACE_COUNTERS;
|
||||
|
||||
/*
|
||||
@ -49,21 +49,21 @@ diag_log text format["-------------------------------------------"];
|
||||
diag_log text format["ACE_PERFORMANCE_EXCESSIVE_STEP_TRACKER"];
|
||||
diag_log text format["-------------------------------------------"];
|
||||
{
|
||||
private["_delay"];
|
||||
_delay = _x select 2;
|
||||
//if(_delay > 0) then { _delay = _delay / 1000; };
|
||||
private["_delay"];
|
||||
_delay = _x select 2;
|
||||
//if(_delay > 0) then { _delay = _delay / 1000; };
|
||||
|
||||
diag_log text format["%1: %2s, delay=%3, handle=%4",(_x select 0), _delay, (_x select 3), (_x select 4)];
|
||||
diag_log text format["%1: %2s, delay=%3, handle=%4",(_x select 0), _delay, (_x select 3), (_x select 4)];
|
||||
} forEach ACE_PERFORMANCE_EXCESSIVE_STEP_TRACKER;
|
||||
|
||||
// Dump PFH Trackers
|
||||
diag_log text format["ACE_PERFORMANCE_EXCESSIVE_FRAME_TRACKER"];
|
||||
diag_log text format["-------------------------------------------"];
|
||||
{
|
||||
private["_delta"];
|
||||
_delta = _x select 1;
|
||||
//if(_delta > 0) then { _delta = _delta / 1000; };
|
||||
diag_log text format[" DELTA: %1s", _delta];
|
||||
private["_delta"];
|
||||
_delta = _x select 1;
|
||||
//if(_delta > 0) then { _delta = _delta / 1000; };
|
||||
diag_log text format[" DELTA: %1s", _delta];
|
||||
} forEach ACE_PERFORMANCE_EXCESSIVE_FRAME_TRACKER;
|
||||
|
||||
//{
|
||||
|
@ -7,11 +7,11 @@ _configs = "true" configClasses (configFile >> _this);
|
||||
_entries = [];
|
||||
|
||||
{
|
||||
{
|
||||
_name = toLower configName _x;
|
||||
if !(_name in _entries) then {
|
||||
diag_log text _name;
|
||||
_entries pushBack _name;
|
||||
};
|
||||
} forEach configProperties [_x, "toLower configName _x find 'ace' == 0", false];
|
||||
{
|
||||
_name = toLower configName _x;
|
||||
if !(_name in _entries) then {
|
||||
diag_log text _name;
|
||||
_entries pushBack _name;
|
||||
};
|
||||
} forEach configProperties [_x, "toLower configName _x find 'ace' == 0", false];
|
||||
} forEach _configs;
|
||||
|
@ -18,30 +18,30 @@ _type = [_this, 3, 0,[0]] call BIS_fnc_Param;
|
||||
_parameters = [_this, 4, [], [[]]] call BIS_fnc_Param;
|
||||
|
||||
if (isPlayer _reciever) then {
|
||||
if (!local _reciever) then {
|
||||
[_this, QUOTE(FUNC(sendDisplayInformationTo)), _reciever, false] call EFUNC(common,execRemoteFnc);
|
||||
} else {
|
||||
if (isLocalized _title) then {
|
||||
_title = localize _title;
|
||||
};
|
||||
_localizationArray = [_title];
|
||||
{
|
||||
_localizationArray pushback _x;
|
||||
}foreach _parameters;
|
||||
_title = format _localizationArray;
|
||||
if (!local _reciever) then {
|
||||
[_this, QUOTE(FUNC(sendDisplayInformationTo)), _reciever, false] call EFUNC(common,execRemoteFnc);
|
||||
} else {
|
||||
if (isLocalized _title) then {
|
||||
_title = localize _title;
|
||||
};
|
||||
_localizationArray = [_title];
|
||||
{
|
||||
_localizationArray pushback _x;
|
||||
}foreach _parameters;
|
||||
_title = format _localizationArray;
|
||||
|
||||
{
|
||||
if (isLocalized _x) then {
|
||||
_localizationArray = [localize _x];
|
||||
{
|
||||
_localizationArray pushback _x;
|
||||
}foreach _parameters;
|
||||
{
|
||||
if (isLocalized _x) then {
|
||||
_localizationArray = [localize _x];
|
||||
{
|
||||
_localizationArray pushback _x;
|
||||
}foreach _parameters;
|
||||
|
||||
_content set [_foreachIndex, format _localizationArray];
|
||||
};
|
||||
_content set [_foreachIndex, format _localizationArray];
|
||||
};
|
||||
|
||||
}foreach _content;
|
||||
}foreach _content;
|
||||
|
||||
[_title,_content,_type] call EFUNC(common,displayInformation);
|
||||
};
|
||||
[_title,_content,_type] call EFUNC(common,displayInformation);
|
||||
};
|
||||
};
|
@ -18,29 +18,29 @@ _type = [_this, 3, 0,[0]] call BIS_fnc_Param;
|
||||
_parameters = [_this, 4, [], [[]]] call BIS_fnc_Param;
|
||||
|
||||
if (isPlayer _reciever) then {
|
||||
if (!local _reciever) then {
|
||||
[_this, QUOTE(FUNC(sendDisplayMessageTo)), _reciever, false] call EFUNC(common,execRemoteFnc);
|
||||
} else {
|
||||
if (!local _reciever) then {
|
||||
[_this, QUOTE(FUNC(sendDisplayMessageTo)), _reciever, false] call EFUNC(common,execRemoteFnc);
|
||||
} else {
|
||||
|
||||
if (isLocalized _title) then {
|
||||
_title = localize _title;
|
||||
};
|
||||
if (isLocalized _content) then {
|
||||
_content = localize _content;
|
||||
};
|
||||
if (isLocalized _title) then {
|
||||
_title = localize _title;
|
||||
};
|
||||
if (isLocalized _content) then {
|
||||
_content = localize _content;
|
||||
};
|
||||
|
||||
_localizationArray = [_title];
|
||||
{
|
||||
_localizationArray pushback _x;
|
||||
}foreach _parameters;
|
||||
_title = format _localizationArray;
|
||||
_localizationArray = [_title];
|
||||
{
|
||||
_localizationArray pushback _x;
|
||||
}foreach _parameters;
|
||||
_title = format _localizationArray;
|
||||
|
||||
_localizationArray = [_content];
|
||||
{
|
||||
_localizationArray pushback _x;
|
||||
}foreach _parameters;
|
||||
_content = format _localizationArray;
|
||||
_localizationArray = [_content];
|
||||
{
|
||||
_localizationArray pushback _x;
|
||||
}foreach _parameters;
|
||||
_content = format _localizationArray;
|
||||
|
||||
[_title,_content,_type] call EFUNC(common,displayMessage);
|
||||
};
|
||||
[_title,_content,_type] call EFUNC(common,displayMessage);
|
||||
};
|
||||
};
|
@ -1,13 +1,13 @@
|
||||
#include "\z\ace\addons\common\script_component.hpp"
|
||||
|
||||
#define VALIDHASH(hash) (IS_ARRAY(hash) && {(count hash) >= 2} && {IS_ARRAY(hash select 0)} && {IS_ARRAY(hash select 1)})
|
||||
#define ERROR(msg) throw msg + format[" @ %1:%2", _callFrom, _lineNo]
|
||||
#define HANDLECATCH diag_log text _exception; assert(exception=="")
|
||||
#define VALIDHASH(hash) (IS_ARRAY(hash) && {(count hash) >= 2} && {IS_ARRAY(hash select 0)} && {IS_ARRAY(hash select 1)})
|
||||
#define ERROR(msg) throw msg + format[" @ %1:%2", _callFrom, _lineNo]
|
||||
#define HANDLECATCH diag_log text _exception; assert(exception=="")
|
||||
|
||||
#define ERRORDATA(c) private ["_callFrom", "_lineNo"];\
|
||||
_callFrom = "";\
|
||||
_lineNo = -1;\
|
||||
if((count _this) > c) then {\
|
||||
_callFrom = _this select c;\
|
||||
_lineNo = _this select c+1;\
|
||||
};
|
||||
#define ERRORDATA(c) private ["_callFrom", "_lineNo"];\
|
||||
_callFrom = "";\
|
||||
_lineNo = -1;\
|
||||
if((count _this) > c) then {\
|
||||
_callFrom = _this select c;\
|
||||
_lineNo = _this select c+1;\
|
||||
};
|
@ -2,11 +2,11 @@
|
||||
#include "\z\ace\Addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_ATTACH
|
||||
#define DEBUG_MODE_FULL
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_ATTACH
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_ATTACH
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_ATTACH
|
||||
#endif
|
||||
|
||||
#include "\z\ace\Addons\main\script_macros.hpp"
|
@ -1,20 +1,20 @@
|
||||
/*
|
||||
Name: AGM_Drag_fnc_GetWeight
|
||||
Name: AGM_Drag_fnc_GetWeight
|
||||
|
||||
Author(s):
|
||||
L-H, edited by commy2
|
||||
Author(s):
|
||||
L-H, edited by commy2
|
||||
|
||||
Description:
|
||||
Returns the weight of a crate.
|
||||
Description:
|
||||
Returns the weight of a crate.
|
||||
|
||||
Parameters:
|
||||
0: OBJECT - Crate to get weight of
|
||||
Parameters:
|
||||
0: OBJECT - Crate to get weight of
|
||||
|
||||
Returns:
|
||||
NUMBER - Weight
|
||||
Returns:
|
||||
NUMBER - Weight
|
||||
|
||||
Example:
|
||||
_weight = Crate1 call AGM_Drag_fnc_GetWeight;
|
||||
Example:
|
||||
_weight = Crate1 call AGM_Drag_fnc_GetWeight;
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
@ -25,24 +25,24 @@ _object = _this select 0;
|
||||
private ["_totalWeight", "_fnc","_fnc_Extra"];
|
||||
_totalWeight = 0;
|
||||
_fnc_Extra = {
|
||||
private ["_weight", "_items"];
|
||||
_items = _this select 0;
|
||||
_weight = 0;
|
||||
{
|
||||
_weight = _weight + (getNumber (ConfigFile >> (_this select 1) >> _x >> (_this select 2) >> "mass") * ((_items select 1) select _foreachIndex));
|
||||
} foreach (_items select 0);
|
||||
private ["_weight", "_items"];
|
||||
_items = _this select 0;
|
||||
_weight = 0;
|
||||
{
|
||||
_weight = _weight + (getNumber (ConfigFile >> (_this select 1) >> _x >> (_this select 2) >> "mass") * ((_items select 1) select _foreachIndex));
|
||||
} foreach (_items select 0);
|
||||
|
||||
_weight
|
||||
_weight
|
||||
};
|
||||
_fnc = {
|
||||
private ["_weight", "_items"];
|
||||
_items = _this select 0;
|
||||
_weight = 0;
|
||||
{
|
||||
_weight = _weight + (getNumber (ConfigFile >> (_this select 1) >> _x >> "mass") * ((_items select 1) select _foreachIndex));
|
||||
} foreach (_items select 0);
|
||||
private ["_weight", "_items"];
|
||||
_items = _this select 0;
|
||||
_weight = 0;
|
||||
{
|
||||
_weight = _weight + (getNumber (ConfigFile >> (_this select 1) >> _x >> "mass") * ((_items select 1) select _foreachIndex));
|
||||
} foreach (_items select 0);
|
||||
|
||||
_weight
|
||||
_weight
|
||||
};
|
||||
_totalWeight = ([getMagazineCargo _object, "CfgMagazines"] call _fnc);
|
||||
_totalWeight = _totalWeight + ([getItemCargo _object, "CfgWeapons", "ItemInfo"] call _fnc_Extra);
|
||||
|
@ -22,46 +22,46 @@ GVAR(CurrentSpeedDial) = 0;
|
||||
|
||||
[{(_this select 0) call FUNC(handleScrollWheel);}] call EFUNC(Common,addScrollWheelEventHandler);
|
||||
player addEventHandler ["Killed", {
|
||||
private "_deadman";
|
||||
call FUNC(place_Cancel);
|
||||
_deadman = [(_this select 0), "DeadManSwitch"] call FUNC(getPlacedExplosives);
|
||||
{
|
||||
[(_this select 0), -1, _x, true] call FUNC(detonateExplosive);
|
||||
} count _deadman;
|
||||
private "_deadman";
|
||||
call FUNC(place_Cancel);
|
||||
_deadman = [(_this select 0), "DeadManSwitch"] call FUNC(getPlacedExplosives);
|
||||
{
|
||||
[(_this select 0), -1, _x, true] call FUNC(detonateExplosive);
|
||||
} count _deadman;
|
||||
}];
|
||||
player addEventHandler ["Take", {
|
||||
private ["_item", "_getter", "_giver", "_config"];
|
||||
_item = _this select 2;
|
||||
_getter = _this select 0;
|
||||
_giver = _this select 1;
|
||||
private ["_item", "_getter", "_giver", "_config"];
|
||||
_item = _this select 2;
|
||||
_getter = _this select 0;
|
||||
_giver = _this select 1;
|
||||
|
||||
_config = ConfigFile >> "CfgWeapons" >> _item;
|
||||
if (isClass _config && {getNumber(_config >> "ACE_Detonator") == 1}) then {
|
||||
private ["_clackerItems"];
|
||||
_clackerItems = _giver getVariable [QGVAR(Clackers), []];
|
||||
_getter SetVariable [QGVAR(Clackers), (_getter getVariable [QGVAR(Clackers), []]) + _clackerItems, true];
|
||||
_config = ConfigFile >> "CfgWeapons" >> _item;
|
||||
if (isClass _config && {getNumber(_config >> "ACE_Detonator") == 1}) then {
|
||||
private ["_clackerItems"];
|
||||
_clackerItems = _giver getVariable [QGVAR(Clackers), []];
|
||||
_getter SetVariable [QGVAR(Clackers), (_getter getVariable [QGVAR(Clackers), []]) + _clackerItems, true];
|
||||
|
||||
_detonators = [_giver] call FUNC(getDetonators);
|
||||
if (count _detonators == 0) then {
|
||||
_giver setVariable [QGVAR(Clackers), nil, true];
|
||||
};
|
||||
};
|
||||
_detonators = [_giver] call FUNC(getDetonators);
|
||||
if (count _detonators == 0) then {
|
||||
_giver setVariable [QGVAR(Clackers), nil, true];
|
||||
};
|
||||
};
|
||||
}];
|
||||
player addEventHandler ["Put", {
|
||||
private ["_item", "_getter", "_giver", "_config"];
|
||||
_item = _this select 2;
|
||||
_getter = _this select 1;
|
||||
_giver = _this select 0;
|
||||
private ["_item", "_getter", "_giver", "_config"];
|
||||
_item = _this select 2;
|
||||
_getter = _this select 1;
|
||||
_giver = _this select 0;
|
||||
|
||||
_config = ConfigFile >> "CfgWeapons" >> _item;
|
||||
if (isClass _config && {getNumber(_config >> "ACE_Detonator") == 1}) then {
|
||||
private ["_clackerItems"];
|
||||
_clackerItems = _giver getVariable [QGVAR(Clackers), []];
|
||||
_getter SetVariable [QGVAR(Clackers), (_getter getVariable [QGVAR(Clackers), []]) + _clackerItems, true];
|
||||
_config = ConfigFile >> "CfgWeapons" >> _item;
|
||||
if (isClass _config && {getNumber(_config >> "ACE_Detonator") == 1}) then {
|
||||
private ["_clackerItems"];
|
||||
_clackerItems = _giver getVariable [QGVAR(Clackers), []];
|
||||
_getter SetVariable [QGVAR(Clackers), (_getter getVariable [QGVAR(Clackers), []]) + _clackerItems, true];
|
||||
|
||||
_detonators = [_giver] call FUNC(getDetonators);
|
||||
if (count _detonators == 0) then {
|
||||
_giver setVariable [QGVAR(Clackers), nil, true];
|
||||
};
|
||||
};
|
||||
_detonators = [_giver] call FUNC(getDetonators);
|
||||
if (count _detonators == 0) then {
|
||||
_giver setVariable [QGVAR(Clackers), nil, true];
|
||||
};
|
||||
};
|
||||
}];
|
||||
|
@ -28,9 +28,9 @@ _requiredItems = getArray(_config >> "requires");
|
||||
_hasRequired = true;
|
||||
_detonators = [_unit] call FUNC(getDetonators);
|
||||
{
|
||||
if !(_x in _detonators) exitWith{
|
||||
_hasRequired = false;
|
||||
};
|
||||
if !(_x in _detonators) exitWith{
|
||||
_hasRequired = false;
|
||||
};
|
||||
} count _requiredItems;
|
||||
|
||||
if !(_hasRequired) exitWith {};
|
||||
@ -39,6 +39,6 @@ _config = ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> co
|
||||
_clacker = _unit getVariable [QGVAR(Clackers), []];
|
||||
GVAR(PlacedCount) = GVAR(PlacedCount) + 1;
|
||||
_clacker pushBack [_explosive, getNumber(_config >> "FuseTime"), format [localize "STR_ACE_Explosives_DetonateCode",
|
||||
GVAR(PlacedCount)], _magazineClass, configName ((_this select 3) select (count (_this select 3) - 1))];
|
||||
GVAR(PlacedCount)], _magazineClass, configName ((_this select 3) select (count (_this select 3) - 1))];
|
||||
_unit setVariable [QGVAR(Clackers), _clacker, true];
|
||||
_unit sideChat format [localize "STR_ACE_Explosives_DetonateCode", GVAR(PlacedCount)];
|
||||
|
@ -22,16 +22,16 @@ _found = false;
|
||||
EXPLODE_2_PVT(_this,_name,_code);
|
||||
|
||||
if ((_code) == "") ExitWith {
|
||||
[_name] call FUNC(removeFromSpeedDial);
|
||||
[_name] call FUNC(removeFromSpeedDial);
|
||||
};
|
||||
{
|
||||
if ((_x select 0) == _name) exitWith {
|
||||
_speedDial set [_foreachindex, _this];
|
||||
_found = true;
|
||||
};
|
||||
if ((_x select 0) == _name) exitWith {
|
||||
_speedDial set [_foreachindex, _this];
|
||||
_found = true;
|
||||
};
|
||||
} foreach _speedDial;
|
||||
if (!_found) then {
|
||||
_speedDial pushBack _this;
|
||||
_speedDial pushBack _this;
|
||||
};
|
||||
|
||||
ace_player setVariable [QGVAR(SpeedDial), _speedDial];
|
||||
|
@ -20,7 +20,7 @@ _unit = _this select 0;
|
||||
_explosive = _this select 1;
|
||||
|
||||
if (getNumber (ConfigFile >> "CfgAmmo" >> typeof _explosive >> "ACE_explodeOnDefuse") == 1) exitWith {
|
||||
[_unit, -1, [_explosive, 1], true] call FUNC(detonateExplosive);
|
||||
[_unit, -1, [_explosive, 1], true] call FUNC(detonateExplosive);
|
||||
};
|
||||
|
||||
_unit action ["Deactivate", _unit, _explosive];
|
||||
|
@ -6,8 +6,8 @@
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Max range (-1 to ignore) <NUMBER>
|
||||
* 2: Explosive <ARRAY>
|
||||
* 0: Explosive <OBJECT>
|
||||
* 1: Fuse time <NUMBER>
|
||||
* 0: Explosive <OBJECT>
|
||||
* 1: Fuse time <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
@ -29,23 +29,23 @@ _result = true;
|
||||
if (!_ignoreRange && {(_unit distance (_item select 0)) > _range}) exitWith {false};
|
||||
|
||||
if (getNumber (ConfigFile >> "CfgAmmo" >> typeof (_item select 0) >> "TriggerWhenDestroyed") == 0) then {
|
||||
private ["_exp", "_previousExp"];
|
||||
_previousExp = _item select 0;
|
||||
_exp = getText (ConfigFile >> "CfgAmmo" >> typeof (_previousExp) >> "ACE_Explosive");
|
||||
if (_exp != "") then {
|
||||
_exp = createVehicle [_exp, [0,0,15001], [], 0, "NONE"];
|
||||
_exp setDir (getDir _previousExp);
|
||||
_item set [0, _exp];
|
||||
_pos = getPosASL _previousExp;
|
||||
deleteVehicle _previousExp;
|
||||
_exp setPosASL _pos;
|
||||
};
|
||||
private ["_exp", "_previousExp"];
|
||||
_previousExp = _item select 0;
|
||||
_exp = getText (ConfigFile >> "CfgAmmo" >> typeof (_previousExp) >> "ACE_Explosive");
|
||||
if (_exp != "") then {
|
||||
_exp = createVehicle [_exp, [0,0,15001], [], 0, "NONE"];
|
||||
_exp setDir (getDir _previousExp);
|
||||
_item set [0, _exp];
|
||||
_pos = getPosASL _previousExp;
|
||||
deleteVehicle _previousExp;
|
||||
_exp setPosASL _pos;
|
||||
};
|
||||
};
|
||||
[{
|
||||
_explosive = _this;
|
||||
if (!isNull _explosive) then {
|
||||
_explosive setDamage 1;
|
||||
};
|
||||
_explosive = _this;
|
||||
if (!isNull _explosive) then {
|
||||
_explosive setDamage 1;
|
||||
};
|
||||
}, _item select 0, _item select 1, 0] call EFUNC(common,waitAndExecute);
|
||||
|
||||
_result
|
||||
|
@ -24,19 +24,19 @@ _unit setVariable [QGVAR(Dialing), true, true];
|
||||
_ran = (ceil(random 8)) + 1;
|
||||
_arr = [];
|
||||
for [{_i=0}, {_i<_ran}, {_i=_i+1}] do {
|
||||
_arr = _arr + ['.','..','...',''];
|
||||
_arr = _arr + ['.','..','...',''];
|
||||
};
|
||||
if (_unit == ace_player) then {
|
||||
ctrlSetText [1400,"Calling"];
|
||||
[FUNC(dialingPhone), 0.25, [_unit,4,_arr,_code]] call CALLSTACK(CBA_fnc_addPerFrameHandler);
|
||||
ctrlSetText [1400,"Calling"];
|
||||
[FUNC(dialingPhone), 0.25, [_unit,4,_arr,_code]] call CALLSTACK(CBA_fnc_addPerFrameHandler);
|
||||
} else {
|
||||
private ["_explosive"];
|
||||
_explosive = [_code] call FUNC(getSpeedDialExplosive);
|
||||
if ((count _explosive) > 0) then {
|
||||
[{
|
||||
playSound3D [QUOTE(PATHTO_R(Data\Audio\Cellphone_Ring.wss)),objNull, false, getPosASL (_this select 1),3.16228,1,75];
|
||||
(_this select 0) setVariable [QGVAR(Dialing), false, true];
|
||||
}, [_unit,_explosive select 0], 0.25 * (count _arr - 4), 0] call EFUNC(common,waitAndExecute);
|
||||
[_explosive select 0,(0.25 * (count _arr - 1)) + (_explosive select 2)] call FUNC(startTimer);
|
||||
};
|
||||
private ["_explosive"];
|
||||
_explosive = [_code] call FUNC(getSpeedDialExplosive);
|
||||
if ((count _explosive) > 0) then {
|
||||
[{
|
||||
playSound3D [QUOTE(PATHTO_R(Data\Audio\Cellphone_Ring.wss)),objNull, false, getPosASL (_this select 1),3.16228,1,75];
|
||||
(_this select 0) setVariable [QGVAR(Dialing), false, true];
|
||||
}, [_unit,_explosive select 0], 0.25 * (count _arr - 4), 0] call EFUNC(common,waitAndExecute);
|
||||
[_explosive select 0,(0.25 * (count _arr - 1)) + (_explosive select 2)] call FUNC(startTimer);
|
||||
};
|
||||
};
|
||||
|
@ -20,10 +20,10 @@ _items = (items _unit);
|
||||
_result = [];
|
||||
|
||||
{
|
||||
_config = ConfigFile >> "CfgWeapons" >> _x;
|
||||
if (getNumber (_config >> "ACE_Detonator") == 1) then {
|
||||
_result pushBack _x;
|
||||
};
|
||||
_config = ConfigFile >> "CfgWeapons" >> _x;
|
||||
if (getNumber (_config >> "ACE_Detonator") == 1) then {
|
||||
_result pushBack _x;
|
||||
};
|
||||
} forEach _items;
|
||||
|
||||
_result
|
||||
|
@ -20,29 +20,29 @@ private ["_unit", "_clackerList", "_adjustedList", "_list", "_filter"];
|
||||
_unit = _this select 0;
|
||||
_filter = nil;
|
||||
if (count _this > 1) then {
|
||||
_filter = ConfigFile >> "CfgACE_Triggers" >> (_this select 1);
|
||||
_filter = ConfigFile >> "CfgACE_Triggers" >> (_this select 1);
|
||||
};
|
||||
_clackerList = [];
|
||||
_adjustedList = false;
|
||||
_clackerList = _unit getVariable [QGVAR(Clackers), []];
|
||||
_list = [];
|
||||
{
|
||||
if isNull (_x select 0) then {
|
||||
_clackerList set [_foreachIndex, "X"];
|
||||
_adjustedList = true;
|
||||
} else {
|
||||
if (isNil "_filter" || {(ConfigFile >> "CfgACE_Triggers" >> (_x select 4)) == _filter}) then {
|
||||
_list pushBack _x;
|
||||
};
|
||||
};
|
||||
if isNull (_x select 0) then {
|
||||
_clackerList set [_foreachIndex, "X"];
|
||||
_adjustedList = true;
|
||||
} else {
|
||||
if (isNil "_filter" || {(ConfigFile >> "CfgACE_Triggers" >> (_x select 4)) == _filter}) then {
|
||||
_list pushBack _x;
|
||||
};
|
||||
};
|
||||
} foreach _clackerList;
|
||||
if (_adjustedList) then {
|
||||
_clackerList = _clackerList - ["X"];
|
||||
if (count _clackerList == 0) then {
|
||||
_unit SetVariable [QGVAR(Clackers), nil, true];
|
||||
} else {
|
||||
_unit SetVariable [QGVAR(Clackers), _clackerList, true];
|
||||
};
|
||||
_clackerList = _clackerList - ["X"];
|
||||
if (count _clackerList == 0) then {
|
||||
_unit SetVariable [QGVAR(Clackers), nil, true];
|
||||
} else {
|
||||
_unit SetVariable [QGVAR(Clackers), _clackerList, true];
|
||||
};
|
||||
};
|
||||
|
||||
_list
|
||||
|
@ -19,9 +19,9 @@ _result = false;
|
||||
_unit = _this select 0;
|
||||
_magazines = magazines _unit;
|
||||
{
|
||||
if (getNumber (ConfigFile >> "CfgMagazines" >> _x >> "ACE_Placeable") == 1) exitWith {
|
||||
_result = true;
|
||||
};
|
||||
if (getNumber (ConfigFile >> "CfgMagazines" >> _x >> "ACE_Placeable") == 1) exitWith {
|
||||
_result = true;
|
||||
};
|
||||
} count _magazines;
|
||||
|
||||
_result
|
||||
|
@ -23,39 +23,39 @@ _range = GetNumber (ConfigFile >> "CfgWeapons" >> _detonator >> "ACE_Range");
|
||||
|
||||
_result = [_unit] call FUNC(getPlacedExplosives);
|
||||
_actions = [localize "STR_ACE_Explosives_DetonateMenu", localize "STR_ACE_Explosives_Detonate"]
|
||||
call EFUNC(interaction,prepareSelectMenu);
|
||||
call EFUNC(interaction,prepareSelectMenu);
|
||||
_count = 0;
|
||||
{
|
||||
if (!isNull(_x select 0)) then {
|
||||
_required = getArray (ConfigFile >> "CfgACE_Triggers" >> (_x select 4) >> "requires");
|
||||
if (_detonator in _required) then {
|
||||
_item = ConfigFile >> "CfgMagazines" >> (_x select 3);
|
||||
_actions = [
|
||||
_actions,
|
||||
_x select 2,
|
||||
getText(_item >> "picture"),
|
||||
[_foreachIndex, _range]
|
||||
] call EFUNC(interaction,AddSelectableItem);
|
||||
_count = _count + 1;
|
||||
};
|
||||
};
|
||||
if (!isNull(_x select 0)) then {
|
||||
_required = getArray (ConfigFile >> "CfgACE_Triggers" >> (_x select 4) >> "requires");
|
||||
if (_detonator in _required) then {
|
||||
_item = ConfigFile >> "CfgMagazines" >> (_x select 3);
|
||||
_actions = [
|
||||
_actions,
|
||||
_x select 2,
|
||||
getText(_item >> "picture"),
|
||||
[_foreachIndex, _range]
|
||||
] call EFUNC(interaction,AddSelectableItem);
|
||||
_count = _count + 1;
|
||||
};
|
||||
};
|
||||
} foreach _result;
|
||||
if (_count > 0) then {
|
||||
[
|
||||
_actions,
|
||||
{
|
||||
[
|
||||
ACE_player,
|
||||
[_this select 1] call EFUNC(common,toNumber),
|
||||
(ACE_player getVariable [QGVAR(Clackers), []]) select ([_this select 0] call EFUNC(common,toNumber)),
|
||||
false
|
||||
] call FUNC(detonateExplosive);
|
||||
call EFUNC(interaction,hideMenu);
|
||||
},
|
||||
{[ACE_player] call FUNC(openTransmitterUI);}
|
||||
] call EFUNC(interaction,openSelectMenu);
|
||||
[
|
||||
_actions,
|
||||
{
|
||||
[
|
||||
ACE_player,
|
||||
[_this select 1] call EFUNC(common,toNumber),
|
||||
(ACE_player getVariable [QGVAR(Clackers), []]) select ([_this select 0] call EFUNC(common,toNumber)),
|
||||
false
|
||||
] call FUNC(detonateExplosive);
|
||||
call EFUNC(interaction,hideMenu);
|
||||
},
|
||||
{[ACE_player] call FUNC(openTransmitterUI);}
|
||||
] call EFUNC(interaction,openSelectMenu);
|
||||
}else{
|
||||
call EFUNC(interaction,hideMenu);
|
||||
[ACE_player] call FUNC(openTransmitterUI);
|
||||
[localize "STR_ACE_Explosives_NoExplosivesAvailable"] call EFUNC(common,displayTextStructured);
|
||||
call EFUNC(interaction,hideMenu);
|
||||
[ACE_player] call FUNC(openTransmitterUI);
|
||||
[localize "STR_ACE_Explosives_NoExplosivesAvailable"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
@ -22,34 +22,34 @@ _mags = magazines _unit;
|
||||
_list = [];
|
||||
_itemCount = [];
|
||||
{
|
||||
_item = ConfigFile >> "CfgMagazines" >> _x;
|
||||
if (getNumber(_item >> "ACE_Placeable") == 1) then {
|
||||
_index = _list find _item;
|
||||
if (_index != -1) then {
|
||||
_itemCount set [_index, (_itemCount select _index) + 1];
|
||||
} else {
|
||||
_list pushBack _item;
|
||||
_itemCount pushBack 1;
|
||||
};
|
||||
};
|
||||
_item = ConfigFile >> "CfgMagazines" >> _x;
|
||||
if (getNumber(_item >> "ACE_Placeable") == 1) then {
|
||||
_index = _list find _item;
|
||||
if (_index != -1) then {
|
||||
_itemCount set [_index, (_itemCount select _index) + 1];
|
||||
} else {
|
||||
_list pushBack _item;
|
||||
_itemCount pushBack 1;
|
||||
};
|
||||
};
|
||||
} forEach _mags;
|
||||
_actions = [localize "STR_ACE_Explosives_PlaceMenu", localize "STR_ACE_Explosives_Place"]
|
||||
call EFUNC(interaction,prepareSelectMenu);
|
||||
call EFUNC(interaction,prepareSelectMenu);
|
||||
{
|
||||
_actions = [
|
||||
_actions,
|
||||
format [getText(_x >> "displayName") + " (%1)", _itemCount select _foreachIndex],
|
||||
getText(_x >> "picture"),
|
||||
configName _x
|
||||
] call EFUNC(interaction,AddSelectableItem);
|
||||
_actions = [
|
||||
_actions,
|
||||
format [getText(_x >> "displayName") + " (%1)", _itemCount select _foreachIndex],
|
||||
getText(_x >> "picture"),
|
||||
configName _x
|
||||
] call EFUNC(interaction,AddSelectableItem);
|
||||
} foreach _list;
|
||||
|
||||
[
|
||||
_actions,
|
||||
{
|
||||
[_this] call FUNC(openTriggerSelectionUI);
|
||||
},
|
||||
{
|
||||
call EFUNC(interaction,hideMenu);
|
||||
}
|
||||
_actions,
|
||||
{
|
||||
[_this] call FUNC(openTriggerSelectionUI);
|
||||
},
|
||||
{
|
||||
call EFUNC(interaction,hideMenu);
|
||||
}
|
||||
] call EFUNC(interaction,openSelectMenu);
|
||||
|
@ -19,30 +19,30 @@ _unit = _this select 0;
|
||||
_items = (items _unit);
|
||||
|
||||
_actions = [localize "STR_ACE_Explosives_TriggerMenu", localize "STR_ACE_Explosives_SelectTrigger"]
|
||||
call EFUNC(interaction,prepareSelectMenu);
|
||||
call EFUNC(interaction,prepareSelectMenu);
|
||||
_detonators = [_unit] call FUNC(getDetonators);
|
||||
{
|
||||
_config = ConfigFile >> "CfgWeapons" >> _x;
|
||||
_actions = [
|
||||
_actions,
|
||||
getText(_config >> "displayName"),
|
||||
getText(_config >> "picture"),
|
||||
_x
|
||||
] call EFUNC(interaction,addSelectableItem);
|
||||
_config = ConfigFile >> "CfgWeapons" >> _x;
|
||||
_actions = [
|
||||
_actions,
|
||||
getText(_config >> "displayName"),
|
||||
getText(_config >> "picture"),
|
||||
_x
|
||||
] call EFUNC(interaction,addSelectableItem);
|
||||
} count _detonators;
|
||||
|
||||
if (count _detonators == 0) then {
|
||||
call EFUNC(interaction,hideMenu);
|
||||
"ACE_Explosives" call EFUNC(interaction,openMenuSelf);
|
||||
[format[localize "STR_ACE_Explosives_NoTriggersAvailable", "player"]] call EFUNC(Common,displayTextStructured);
|
||||
call EFUNC(interaction,hideMenu);
|
||||
"ACE_Explosives" call EFUNC(interaction,openMenuSelf);
|
||||
[format[localize "STR_ACE_Explosives_NoTriggersAvailable", "player"]] call EFUNC(Common,displayTextStructured);
|
||||
}else{
|
||||
[
|
||||
_actions,
|
||||
{
|
||||
[ACE_player, _this] call FUNC(openDetonateUI);
|
||||
},
|
||||
{
|
||||
call EFUNC(interaction,hideMenu);
|
||||
}
|
||||
] call EFUNC(interaction,openSelectMenu);
|
||||
[
|
||||
_actions,
|
||||
{
|
||||
[ACE_player, _this] call FUNC(openDetonateUI);
|
||||
},
|
||||
{
|
||||
call EFUNC(interaction,hideMenu);
|
||||
}
|
||||
] call EFUNC(interaction,openSelectMenu);
|
||||
};
|
||||
|
@ -21,37 +21,37 @@ _detonators = [ACE_player] call FUNC(getDetonators);
|
||||
_triggerTypes = [_magazine] call FUNC(triggerType);
|
||||
_magTriggers = ConfigFile >> "CfgMagazines" >> _magazine >> "ACE_Triggers";
|
||||
_actions = [localize "STR_ACE_Explosives_TriggerMenu", localize "STR_ACE_Explosives_SelectTrigger"]
|
||||
call EFUNC(interaction,prepareSelectMenu);
|
||||
call EFUNC(interaction,prepareSelectMenu);
|
||||
_count = 0;
|
||||
{
|
||||
_required = getArray (_x >> "requires");
|
||||
_hasRequiredItems = true;
|
||||
{
|
||||
if !(_x in _detonators) exitWith {
|
||||
_hasRequiredItems = false;
|
||||
};
|
||||
} count _required;
|
||||
if (_hasRequiredItems) then {
|
||||
_actions = [
|
||||
_actions,
|
||||
if(isText(_magTriggers >> configName _x >> "displayName"))then{getText(_magTriggers >> configName _x >> "displayName")}else{getText(_x >> "displayName")},
|
||||
if(isText(_magTriggers >> configName _x >> "picture"))then{getText(_magTriggers >> configName _x >> "picture")}else{getText(_x >> "picture")},
|
||||
[configName _x, _magazine]
|
||||
] call EFUNC(interaction,addSelectableItem);
|
||||
_count = _count + 1;
|
||||
};
|
||||
_required = getArray (_x >> "requires");
|
||||
_hasRequiredItems = true;
|
||||
{
|
||||
if !(_x in _detonators) exitWith {
|
||||
_hasRequiredItems = false;
|
||||
};
|
||||
} count _required;
|
||||
if (_hasRequiredItems) then {
|
||||
_actions = [
|
||||
_actions,
|
||||
if(isText(_magTriggers >> configName _x >> "displayName"))then{getText(_magTriggers >> configName _x >> "displayName")}else{getText(_x >> "displayName")},
|
||||
if(isText(_magTriggers >> configName _x >> "picture"))then{getText(_magTriggers >> configName _x >> "picture")}else{getText(_x >> "picture")},
|
||||
[configName _x, _magazine]
|
||||
] call EFUNC(interaction,addSelectableItem);
|
||||
_count = _count + 1;
|
||||
};
|
||||
} count _triggerTypes;
|
||||
|
||||
if (_count == 0) then {
|
||||
[ACE_player] call FUNC(openPlaceUI);
|
||||
[format[localize "STR_ACE_Explosives_NoTriggersAvailable",
|
||||
getText(configFile >> "CfgMagazines" >> _magazine >> "DisplayName")]] call EFUNC(Common,displayTextStructured);
|
||||
[ACE_player] call FUNC(openPlaceUI);
|
||||
[format[localize "STR_ACE_Explosives_NoTriggersAvailable",
|
||||
getText(configFile >> "CfgMagazines" >> _magazine >> "DisplayName")]] call EFUNC(Common,displayTextStructured);
|
||||
}else{
|
||||
[
|
||||
_actions,
|
||||
{
|
||||
[_this select 1, _this select 0] call FUNC(selectTrigger);
|
||||
},
|
||||
{[ACE_player] call FUNC(openPlaceUI);}
|
||||
] call EFUNC(interaction,openSelectMenu);
|
||||
[
|
||||
_actions,
|
||||
{
|
||||
[_this select 1, _this select 0] call FUNC(selectTrigger);
|
||||
},
|
||||
{[ACE_player] call FUNC(openPlaceUI);}
|
||||
] call EFUNC(interaction,openSelectMenu);
|
||||
};
|
||||
|
@ -16,7 +16,7 @@
|
||||
*
|
||||
* Example:
|
||||
* _explosive = [player, player modelToWorldVisual [0,0.5, 0.1], 134,
|
||||
* "SatchelCharge_Remote_Mag", "Command", []] call ACE_Explosives_fnc_placeExplosive;
|
||||
* "SatchelCharge_Remote_Mag", "Command", []] call ACE_Explosives_fnc_placeExplosive;
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
@ -30,32 +30,32 @@ _triggerConfig = _this select 4;
|
||||
_triggerSpecificVars = _this select 5;
|
||||
_setDir = true;
|
||||
if (count _this > 6) then {
|
||||
_setDir = _this select 6;
|
||||
_setDir = _this select 6;
|
||||
};
|
||||
|
||||
if (isNil "_triggerConfig") exitWith {
|
||||
diag_log format ["ACE_Explosives: Error config not passed to PlaceExplosive: %1", _this];
|
||||
objNull
|
||||
diag_log format ["ACE_Explosives: Error config not passed to PlaceExplosive: %1", _this];
|
||||
objNull
|
||||
};
|
||||
|
||||
_magazineTrigger = ConfigFile >> "CfgMagazines" >> _magazineClass >> "ACE_Triggers" >> _triggerConfig;
|
||||
_triggerConfig = ConfigFile >> "CfgACE_Triggers" >> _triggerConfig;
|
||||
|
||||
if (isNil "_triggerConfig") exitWith {
|
||||
diag_log format ["ACE_Explosives: Error config not found in PlaceExplosive: %1", _this];
|
||||
objNull
|
||||
diag_log format ["ACE_Explosives: Error config not found in PlaceExplosive: %1", _this];
|
||||
objNull
|
||||
};
|
||||
|
||||
_ammo = getText(ConfigFile >> "CfgMagazines" >> _magazineClass >> "ammo");
|
||||
if (isText(_magazineTrigger >> "ammo")) then {
|
||||
_ammo = getText (_magazineTrigger >> "ammo");
|
||||
_ammo = getText (_magazineTrigger >> "ammo");
|
||||
};
|
||||
_triggerSpecificVars pushBack _triggerConfig;
|
||||
_explosive = createVehicle [_ammo, _pos, [], 0, "NONE"];
|
||||
if (isText(_triggerConfig >> "onPlace") && {[_unit,_explosive,_magazineClass,_triggerSpecificVars]
|
||||
call compile (getText (_triggerConfig >> "onPlace"))}) exitWith {_explosive};
|
||||
call compile (getText (_triggerConfig >> "onPlace"))}) exitWith {_explosive};
|
||||
if (_setDir) then {
|
||||
[[_explosive, _dir, getNumber (_magazineTrigger >> "pitch")], QFUNC(setPosition)]
|
||||
call EFUNC(common,execRemoteFnc);
|
||||
[[_explosive, _dir, getNumber (_magazineTrigger >> "pitch")], QFUNC(setPosition)]
|
||||
call EFUNC(common,execRemoteFnc);
|
||||
};
|
||||
_explosive
|
||||
|
@ -16,8 +16,8 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
if (GVAR(pfeh_running)) then {
|
||||
[QGVAR(Placement),"OnEachFrame"] call CALLSTACK(BIS_fnc_removeStackedEventHandler);
|
||||
GVAR(pfeh_running) = false;
|
||||
[QGVAR(Placement),"OnEachFrame"] call CALLSTACK(BIS_fnc_removeStackedEventHandler);
|
||||
GVAR(pfeh_running) = false;
|
||||
};
|
||||
private ["_mag", "_setup", "_player"];
|
||||
_setup = GVAR(Setup);
|
||||
@ -29,77 +29,77 @@ _player = ACE_player;
|
||||
[_player, "MenuBack", _player getVariable [QGVAR(Cancel), -1]] call EFUNC(Common,removeActionEventHandler);
|
||||
call EFUNC(interaction,hideMouseHint);
|
||||
if ((_setup getVariable [QGVAR(Class), ""]) == "") exitWith {
|
||||
deleteVehicle _setup;
|
||||
deleteVehicle _setup;
|
||||
};
|
||||
_dir = (getDir _setup);
|
||||
if (_dir > 180) then {
|
||||
_dir = _dir - 180;
|
||||
_dir = _dir - 180;
|
||||
} else {
|
||||
_dir = 180 + _dir;
|
||||
_dir = 180 + _dir;
|
||||
};
|
||||
_setup setVariable [QGVAR(Direction), _dir];
|
||||
_player setVariable [QGVAR(PlantingExplosive), true];
|
||||
_setup addEventHandler ["EpeContactStart", {
|
||||
if (!((_this select 0) getVariable [QGVAR(Handled), false])) then {
|
||||
private ["_player", "_pos", "_attachTo"];
|
||||
_player = ACE_player;
|
||||
_player setVariable [QGVAR(PlantingExplosive), false];
|
||||
_pos = getPosATL (_this select 0);
|
||||
(_this select 0) enableSimulationGlobal false;
|
||||
if (surfaceIsWater _pos) then {
|
||||
_pos = getPosASL (_this select 0);
|
||||
(_this select 0) setPosASL _pos;
|
||||
}else{
|
||||
(_this select 0) setPosATL _pos;
|
||||
};
|
||||
(_this select 0) setVariable [QGVAR(Handled), true];
|
||||
_attachTo = objNull;
|
||||
if (!isNull (_this select 1) && {(_this select 1) isKindOf "AllVehicles"}) then {
|
||||
_attachTo = (_this select 1);
|
||||
};
|
||||
[(_this select 0),_attachTo, _pos] spawn { // TODO: Change to scheduled delay execution
|
||||
private ["_mag", "_setup", "_dir", "_player"];
|
||||
_setup = _this select 0;
|
||||
_player = ACE_player;
|
||||
_mag = _setup getVariable [QGVAR(Class), ""];
|
||||
_dir = _setup getVariable [QGVAR(Direction), 0];
|
||||
if (!((_this select 0) getVariable [QGVAR(Handled), false])) then {
|
||||
private ["_player", "_pos", "_attachTo"];
|
||||
_player = ACE_player;
|
||||
_player setVariable [QGVAR(PlantingExplosive), false];
|
||||
_pos = getPosATL (_this select 0);
|
||||
(_this select 0) enableSimulationGlobal false;
|
||||
if (surfaceIsWater _pos) then {
|
||||
_pos = getPosASL (_this select 0);
|
||||
(_this select 0) setPosASL _pos;
|
||||
}else{
|
||||
(_this select 0) setPosATL _pos;
|
||||
};
|
||||
(_this select 0) setVariable [QGVAR(Handled), true];
|
||||
_attachTo = objNull;
|
||||
if (!isNull (_this select 1) && {(_this select 1) isKindOf "AllVehicles"}) then {
|
||||
_attachTo = (_this select 1);
|
||||
};
|
||||
[(_this select 0),_attachTo, _pos] spawn { // TODO: Change to scheduled delay execution
|
||||
private ["_mag", "_setup", "_dir", "_player"];
|
||||
_setup = _this select 0;
|
||||
_player = ACE_player;
|
||||
_mag = _setup getVariable [QGVAR(Class), ""];
|
||||
_dir = _setup getVariable [QGVAR(Direction), 0];
|
||||
|
||||
sleep getNumber(ConfigFile >> "CfgMagazines" >> _mag >> "ACE_DelayTime");
|
||||
_explosive = [_player, _this select 2, _dir, _mag, _setup getVariable QGVAR(Trigger),
|
||||
[_setup getVariable QGVAR(Timer)], isNull (_this select 1)] call FUNC(placeExplosive);
|
||||
deleteVehicle _setup;
|
||||
if (!isNull(_explosive)) then {
|
||||
_player RemoveMagazine _mag;
|
||||
if (!isNull (_this select 1)) then {
|
||||
_explosive attachTo [(_this select 1)];
|
||||
_dir = _dir - (getDir (_this select 1));
|
||||
[[_explosive, _dir, 0], QFUNC(setPosition)] call EFUNC(common,execRemoteFnc);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
sleep getNumber(ConfigFile >> "CfgMagazines" >> _mag >> "ACE_DelayTime");
|
||||
_explosive = [_player, _this select 2, _dir, _mag, _setup getVariable QGVAR(Trigger),
|
||||
[_setup getVariable QGVAR(Timer)], isNull (_this select 1)] call FUNC(placeExplosive);
|
||||
deleteVehicle _setup;
|
||||
if (!isNull(_explosive)) then {
|
||||
_player RemoveMagazine _mag;
|
||||
if (!isNull (_this select 1)) then {
|
||||
_explosive attachTo [(_this select 1)];
|
||||
_dir = _dir - (getDir (_this select 1));
|
||||
[[_explosive, _dir, 0], QFUNC(setPosition)] call EFUNC(common,execRemoteFnc);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}];
|
||||
_setup enableSimulationGlobal true;
|
||||
_player playActionNow "MedicOther";
|
||||
[_setup] spawn { // TODO: Change to scheduled delay execution
|
||||
private ["_setup", "_player"];
|
||||
_setup = _this select 0;
|
||||
_player = ACE_player;
|
||||
sleep 5;
|
||||
_player setVariable [QGVAR(PlantingExplosive), false];
|
||||
if (!isNull _setup) then {
|
||||
private ["_mag", "_dir", "_delayTime"];
|
||||
_mag = _setup getVariable [QGVAR(Class), ""];
|
||||
_dir = _setup getVariable [QGVAR(Direction), 0];
|
||||
_delayTime = (getNumber(ConfigFile >> "CfgMagazines" >> _mag >> "ACE_DelayTime")) - 5;
|
||||
if (_delayTime > 0) then {
|
||||
sleep _delayTime;
|
||||
};
|
||||
if (!isNull _setup) then {
|
||||
[_player, GetPosATL _setup, _dir, _mag, _setup getVariable QGVAR(Trigger),
|
||||
[_setup getVariable QGVAR(Timer)], true] call FUNC(placeExplosive);
|
||||
deleteVehicle _setup;
|
||||
_player RemoveMagazine _mag;
|
||||
};
|
||||
};
|
||||
private ["_setup", "_player"];
|
||||
_setup = _this select 0;
|
||||
_player = ACE_player;
|
||||
sleep 5;
|
||||
_player setVariable [QGVAR(PlantingExplosive), false];
|
||||
if (!isNull _setup) then {
|
||||
private ["_mag", "_dir", "_delayTime"];
|
||||
_mag = _setup getVariable [QGVAR(Class), ""];
|
||||
_dir = _setup getVariable [QGVAR(Direction), 0];
|
||||
_delayTime = (getNumber(ConfigFile >> "CfgMagazines" >> _mag >> "ACE_DelayTime")) - 5;
|
||||
if (_delayTime > 0) then {
|
||||
sleep _delayTime;
|
||||
};
|
||||
if (!isNull _setup) then {
|
||||
[_player, GetPosATL _setup, _dir, _mag, _setup getVariable QGVAR(Trigger),
|
||||
[_setup getVariable QGVAR(Timer)], true] call FUNC(placeExplosive);
|
||||
deleteVehicle _setup;
|
||||
_player RemoveMagazine _mag;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -15,15 +15,15 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
if (GVAR(pfeh_running)) then {
|
||||
[QGVAR(Placement),"OnEachFrame"] call CALLSTACK(BIS_fnc_removeStackedEventHandler);
|
||||
GVAR(pfeh_running) = false;
|
||||
[QGVAR(Placement),"OnEachFrame"] call CALLSTACK(BIS_fnc_removeStackedEventHandler);
|
||||
GVAR(pfeh_running) = false;
|
||||
};
|
||||
if (!isNull (GVAR(Setup))) then {
|
||||
deleteVehicle GVAR(Setup);
|
||||
deleteVehicle GVAR(Setup);
|
||||
};
|
||||
GVAR(Setup) = objNull;
|
||||
if (isNil {GVAR(placer)}) then {
|
||||
GVAR(placer) = objNull;
|
||||
GVAR(placer) = objNull;
|
||||
};
|
||||
[GVAR(placer), "ACE_Explosives", false] call EFUNC(Common,setForceWalkStatus);
|
||||
GVAR(placer) = objNull;
|
||||
|
@ -18,9 +18,9 @@ private "_speedDial";
|
||||
_speedDial = ace_player getVariable [QGVAR(SpeedDial), []];
|
||||
if (count _speedDial == 0) exitWith {};
|
||||
{
|
||||
if ((_x select 0) == (_this select 0)) exitWith {
|
||||
_speedDial set [_foreachIndex, "x"];
|
||||
_speedDial = _speedDial - ["x"];
|
||||
ace_player setVariable [QGVAR(SpeedDial),_speedDial];
|
||||
};
|
||||
if ((_x select 0) == (_this select 0)) exitWith {
|
||||
_speedDial set [_foreachIndex, "x"];
|
||||
_speedDial = _speedDial - ["x"];
|
||||
ace_player setVariable [QGVAR(SpeedDial),_speedDial];
|
||||
};
|
||||
} foreach _speedDial;
|
||||
|
@ -20,6 +20,6 @@ private "_ex";
|
||||
_ex = _this select 0;
|
||||
_ex setDir (_this select 1);
|
||||
if ((_this select 2) != 0) then {
|
||||
[_ex, _this select 2, 0] call CALLSTACK(BIS_fnc_setPitchBank);
|
||||
[_ex, _this select 2, 0] call CALLSTACK(BIS_fnc_setPitchBank);
|
||||
};
|
||||
//_ex setVectorUp (surfaceNormal _pos);
|
||||
|
@ -20,6 +20,6 @@ _config = getArray (ConfigFile >> "CfgMagazines" >> (_this select 0) >> "ACE_Tri
|
||||
_count = count _config;
|
||||
|
||||
for "_index" from 0 to (_count - 1) do {
|
||||
_result set [_index, ConfigFile >> "CfgACE_Triggers" >> (_config select _index)];
|
||||
_result set [_index, ConfigFile >> "CfgACE_Triggers" >> (_config select _index)];
|
||||
};
|
||||
_result
|
||||
|
@ -2,11 +2,11 @@
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_EXPLOSIVES
|
||||
#define DEBUG_MODE_FULL
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_EXPLOSIVES
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_EXPLOSIVES
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_EXPLOSIVES
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
@ -5,7 +5,7 @@ _projectile = _this select 0 select 1;
|
||||
_zeroing = _this select 0 select 2;
|
||||
|
||||
if (isNull _projectile || {!alive _projectile}) exitWith {
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
[_this select 1] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
if (_projectile distance _vehicle < _zeroing) exitWith {};
|
||||
|
@ -1,352 +1,352 @@
|
||||
#define BASE_DRAG -0.01
|
||||
#define HD_MULT 5
|
||||
#define BASE_DRAG_HD (BASE_DRAG*HD_MULT)
|
||||
#define BASE_DRAG -0.01
|
||||
#define HD_MULT 5
|
||||
#define BASE_DRAG_HD (BASE_DRAG*HD_MULT)
|
||||
|
||||
class CfgAmmo {
|
||||
//class ace_arty_105mm_m1_m782_time;
|
||||
//class ace_arty_105mm_m1_m782_prox: ace_arty_105mm_m1_m782_time {};
|
||||
//class ace_arty_105mm_m1_m782_delay: ace_arty_105mm_m1_m782_prox {
|
||||
// ACE_FRAG_SKIP = 1;
|
||||
//};
|
||||
class Bo_GBU12_LGB;
|
||||
class Nou_GBU12 : Bo_GBU12_LGB {
|
||||
ACE_FRAG_CLASSES[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
|
||||
ACE_FRAG_METAL = 140000;
|
||||
ACE_FRAG_CHARGE = 87000;
|
||||
ACE_FRAG_GURNEY_C = 2320;
|
||||
ACE_FRAG_GURNEY_K = 1/2;
|
||||
sideAirFriction = 0.04;
|
||||
airFriction = 0.04;
|
||||
laserLock = 0;
|
||||
};
|
||||
//class ace_arty_105mm_m1_m782_time;
|
||||
//class ace_arty_105mm_m1_m782_prox: ace_arty_105mm_m1_m782_time {};
|
||||
//class ace_arty_105mm_m1_m782_delay: ace_arty_105mm_m1_m782_prox {
|
||||
// ACE_FRAG_SKIP = 1;
|
||||
//};
|
||||
class Bo_GBU12_LGB;
|
||||
class Nou_GBU12 : Bo_GBU12_LGB {
|
||||
ACE_FRAG_CLASSES[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
|
||||
ACE_FRAG_METAL = 140000;
|
||||
ACE_FRAG_CHARGE = 87000;
|
||||
ACE_FRAG_GURNEY_C = 2320;
|
||||
ACE_FRAG_GURNEY_K = 1/2;
|
||||
sideAirFriction = 0.04;
|
||||
airFriction = 0.04;
|
||||
laserLock = 0;
|
||||
};
|
||||
|
||||
class GrenadeBase;
|
||||
class Grenade;
|
||||
class GrenadeHand: Grenade {
|
||||
ACE_FRAG_SKIP = 0;
|
||||
ACE_FRAG_FORCE = 1;
|
||||
// This is a good high-drag frag type for grenades.
|
||||
ACE_FRAG_CLASSES[] = {"ACE_frag_tiny_HD"};
|
||||
/*
|
||||
These values are based on the M67 Grenade, should be tweaked for
|
||||
individual grenades.
|
||||
*/
|
||||
ACE_FRAG_METAL = 210; // metal in grams
|
||||
ACE_FRAG_CHARGE = 185; // explosive in grams
|
||||
ACE_FRAG_GURNEY_C = 2843; // Gurney velocity constant for explosive type. See: http://en.wikipedia.org/wiki/Gurney_equations
|
||||
ACE_FRAG_GURNEY_K = 3/5; // Gurney shape factor, in this case a sphere. See: http://en.wikipedia.org/wiki/Gurney_equations
|
||||
};
|
||||
class GrenadeHand_stone: GrenadeHand {
|
||||
ACE_FRAG_SKIP = 1;
|
||||
};
|
||||
class SmokeShell: GrenadeHand {
|
||||
ACE_FRAG_SKIP = 1;
|
||||
};
|
||||
class GrenadeBase;
|
||||
class Grenade;
|
||||
class GrenadeHand: Grenade {
|
||||
ACE_FRAG_SKIP = 0;
|
||||
ACE_FRAG_FORCE = 1;
|
||||
// This is a good high-drag frag type for grenades.
|
||||
ACE_FRAG_CLASSES[] = {"ACE_frag_tiny_HD"};
|
||||
/*
|
||||
These values are based on the M67 Grenade, should be tweaked for
|
||||
individual grenades.
|
||||
*/
|
||||
ACE_FRAG_METAL = 210; // metal in grams
|
||||
ACE_FRAG_CHARGE = 185; // explosive in grams
|
||||
ACE_FRAG_GURNEY_C = 2843; // Gurney velocity constant for explosive type. See: http://en.wikipedia.org/wiki/Gurney_equations
|
||||
ACE_FRAG_GURNEY_K = 3/5; // Gurney shape factor, in this case a sphere. See: http://en.wikipedia.org/wiki/Gurney_equations
|
||||
};
|
||||
class GrenadeHand_stone: GrenadeHand {
|
||||
ACE_FRAG_SKIP = 1;
|
||||
};
|
||||
class SmokeShell: GrenadeHand {
|
||||
ACE_FRAG_SKIP = 1;
|
||||
};
|
||||
|
||||
class RocketBase;
|
||||
//class R_Hydra_HE: RocketBase {
|
||||
// ACE_FRAG_SKIP = 1;
|
||||
//};
|
||||
class RocketBase;
|
||||
//class R_Hydra_HE: RocketBase {
|
||||
// ACE_FRAG_SKIP = 1;
|
||||
//};
|
||||
|
||||
//class R_57mm_HE: RocketBase {
|
||||
// ACE_FRAG_SKIP = 1;
|
||||
//};
|
||||
//class R_57mm_HE: RocketBase {
|
||||
// ACE_FRAG_SKIP = 1;
|
||||
//};
|
||||
|
||||
class R_80mm_HE: RocketBase {
|
||||
ACE_FRAG_SKIP = 1;
|
||||
};
|
||||
class R_80mm_HE: RocketBase {
|
||||
ACE_FRAG_SKIP = 1;
|
||||
};
|
||||
|
||||
//class R_S8T_AT: RocketBase {
|
||||
// ACE_FRAG_SKIP = 1;
|
||||
//};
|
||||
//class R_S8T_AT: RocketBase {
|
||||
// ACE_FRAG_SKIP = 1;
|
||||
//};
|
||||
|
||||
class BombCore;
|
||||
class Bo_Mk82: BombCore {
|
||||
ACE_FRAG_CLASSES[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
|
||||
ACE_FRAG_METAL = 140000;
|
||||
ACE_FRAG_CHARGE = 87000;
|
||||
ACE_FRAG_GURNEY_C = 2320;
|
||||
ACE_FRAG_GURNEY_K = 1/2;
|
||||
};
|
||||
class BombCore;
|
||||
class Bo_Mk82: BombCore {
|
||||
ACE_FRAG_CLASSES[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
|
||||
ACE_FRAG_METAL = 140000;
|
||||
ACE_FRAG_CHARGE = 87000;
|
||||
ACE_FRAG_GURNEY_C = 2320;
|
||||
ACE_FRAG_GURNEY_K = 1/2;
|
||||
};
|
||||
|
||||
|
||||
class G_40mm_HE: GrenadeBase {
|
||||
ACE_FRAG_SKIP = 0;
|
||||
ACE_FRAG_FORCE = 1;
|
||||
};
|
||||
class G_40mm_HE: GrenadeBase {
|
||||
ACE_FRAG_SKIP = 0;
|
||||
ACE_FRAG_FORCE = 1;
|
||||
};
|
||||
|
||||
class ACE_G_40mm_HEDP: G_40mm_HE {
|
||||
};
|
||||
class ACE_G_40mm_HE: ACE_G_40mm_HEDP {
|
||||
};
|
||||
class ACE_G_40mm_Practice: ACE_G_40mm_HE {
|
||||
ACE_FRAG_SKIP = 1;
|
||||
};
|
||||
class ACE_G40mm_HE_VOG25P: G_40mm_HE {
|
||||
ACE_FRAG_SKIP = 0;
|
||||
ACE_FRAG_FORCE = 1;
|
||||
};
|
||||
class ACE_G_40mm_HEDP: G_40mm_HE {
|
||||
};
|
||||
class ACE_G_40mm_HE: ACE_G_40mm_HEDP {
|
||||
};
|
||||
class ACE_G_40mm_Practice: ACE_G_40mm_HE {
|
||||
ACE_FRAG_SKIP = 1;
|
||||
};
|
||||
class ACE_G40mm_HE_VOG25P: G_40mm_HE {
|
||||
ACE_FRAG_SKIP = 0;
|
||||
ACE_FRAG_FORCE = 1;
|
||||
};
|
||||
|
||||
//class R_SMAW_HEDP;
|
||||
//class R_MEEWS_HEDP : R_SMAW_HEDP {
|
||||
// ACE_FRAG_FORCE = 1;
|
||||
// ACE_FRAG_MULTIPLIER = 1.2;
|
||||
//};
|
||||
//class R_SMAW_HEDP;
|
||||
//class R_MEEWS_HEDP : R_SMAW_HEDP {
|
||||
// ACE_FRAG_FORCE = 1;
|
||||
// ACE_FRAG_MULTIPLIER = 1.2;
|
||||
//};
|
||||
|
||||
//class MissileBase;
|
||||
//class M_Hellfire_AT: MissileBase {
|
||||
// ACE_FRAG_FORCE = 1;
|
||||
// ACE_FRAG_MULTIPLIER = 1.75;
|
||||
//};
|
||||
//class MissileBase;
|
||||
//class M_Hellfire_AT: MissileBase {
|
||||
// ACE_FRAG_FORCE = 1;
|
||||
// ACE_FRAG_MULTIPLIER = 1.75;
|
||||
//};
|
||||
|
||||
/*
|
||||
class B_762x51_Ball;
|
||||
class ACE_frag_base: B_762x51_Ball { ////TODO: B_762x45_Ball no longer exists, is this a valid replacement?
|
||||
model = "\A3\Weapons_f\ammo\shell";
|
||||
timeToLive = 12;
|
||||
typicalSpeed = 800;
|
||||
// Fix sounds
|
||||
effectFly = "AmmoClassic";
|
||||
soundDefault1[] = {"A3\sounds_f\weapons\hits\concrete_1.wav",0.158114,1,30};
|
||||
soundDefault2[] = {"A3\sounds_f\weapons\hits\concrete_2.wav",0.158114,1,30};
|
||||
soundDefault3[] = {"A3\sounds_f\weapons\hits\concrete_3.wav",0.158114,1,30};
|
||||
soundDefault4[] = {"A3\sounds_f\weapons\hits\concrete_4.wav",0.158114,1,30};
|
||||
soundDefault5[] = {"A3\sounds_f\weapons\hits\concrete_5.wav",0.158114,1,30};
|
||||
soundDefault6[] = {"A3\sounds_f\weapons\hits\concrete_6.wav",0.158114,1,30};
|
||||
soundDefault7[] = {"A3\sounds_f\weapons\hits\concrete_7.wav",0.158114,1,30};
|
||||
soundDefault8[] = {"A3\sounds_f\weapons\hits\concrete_8.wav",0.158114,1,30};
|
||||
soundGroundSoft1[] = {"A3\sounds_f\weapons\hits\soft_ground_1.wav",0.02811705,1,30};
|
||||
soundGroundSoft2[] = {"A3\sounds_f\weapons\hits\soft_ground_2.wav",0.02811705,1,30};
|
||||
soundGroundSoft3[] = {"A3\sounds_f\weapons\hits\soft_ground_3.wav",0.02811705,1,30};
|
||||
soundGroundSoft4[] = {"A3\sounds_f\weapons\hits\soft_ground_4.wav",0.02811705,1,30};
|
||||
soundGroundSoft5[] = {"A3\sounds_f\weapons\hits\soft_ground_5.wav",0.02811705,1,30};
|
||||
soundGroundSoft6[] = {"A3\sounds_f\weapons\hits\soft_ground_6.wav",0.02811705,1,30};
|
||||
soundGroundSoft7[] = {"A3\sounds_f\weapons\hits\soft_ground_7.wav",0.02811705,1,30};
|
||||
soundGroundSoft8[] = {"A3\sounds_f\weapons\hits\soft_ground_8.wav",0.02811705,1,30};
|
||||
soundGroundHard1[] = {"A3\sounds_f\weapons\hits\hard_ground_1.wav",0.62946,1,40};
|
||||
soundGroundHard2[] = {"A3\sounds_f\weapons\hits\hard_ground_2.wav",0.62946,1,40};
|
||||
soundGroundHard3[] = {"A3\sounds_f\weapons\hits\hard_ground_3.wav",0.62946,1,40};
|
||||
soundGroundHard4[] = {"A3\sounds_f\weapons\hits\hard_ground_4.wav",0.62946,1,40};
|
||||
soundGroundHard5[] = {"A3\sounds_f\weapons\hits\hard_ground_5.wav",0.62946,1,40};
|
||||
soundGroundHard6[] = {"A3\sounds_f\weapons\hits\hard_ground_6.wav",0.62946,1,40};
|
||||
soundGroundHard7[] = {"A3\sounds_f\weapons\hits\hard_ground_7.wav",0.62946,1,40};
|
||||
soundGroundHard8[] = {"A3\sounds_f\weapons\hits\hard_ground_8.wav",0.62946,1,40};
|
||||
soundMetal1[] = {"A3\sounds_f\weapons\hits\metal_1.wav",0.158114,1,45};
|
||||
soundMetal2[] = {"A3\sounds_f\weapons\hits\metal_2.wav",0.158114,1,45};
|
||||
soundMetal3[] = {"A3\sounds_f\weapons\hits\metal_3.wav",0.158114,1,45};
|
||||
soundMetal4[] = {"A3\sounds_f\weapons\hits\metal_4.wav",0.158114,1,45};
|
||||
soundMetal5[] = {"A3\sounds_f\weapons\hits\metal_5.wav",0.158114,1,45};
|
||||
soundMetal6[] = {"A3\sounds_f\weapons\hits\metal_6.wav",0.158114,1,45};
|
||||
soundMetal7[] = {"A3\sounds_f\weapons\hits\metal_7.wav",0.158114,1,45};
|
||||
soundMetal8[] = {"A3\sounds_f\weapons\hits\metal_8.wav",0.158114,1,45};
|
||||
soundGlass1[] = {"A3\sounds_f\weapons\hits\glass_1.wav",0.177828,1,25};
|
||||
soundGlass2[] = {"A3\sounds_f\weapons\hits\glass_2.wav",0.177828,1,25};
|
||||
soundGlass3[] = {"A3\sounds_f\weapons\hits\glass_3.wav",0.177828,1,25};
|
||||
soundGlass4[] = {"A3\sounds_f\weapons\hits\glass_4.wav",0.177828,1,25};
|
||||
soundGlass5[] = {"A3\sounds_f\weapons\hits\glass_5.wav",0.177828,1,25};
|
||||
soundGlass6[] = {"A3\sounds_f\weapons\hits\glass_6.wav",0.177828,1,25};
|
||||
soundGlass7[] = {"A3\sounds_f\weapons\hits\glass_7.wav",0.177828,1,25};
|
||||
soundGlass8[] = {"A3\sounds_f\weapons\hits\glass_8.wav",0.177828,1,25};
|
||||
soundGlassArmored1[] = {"A3\sounds_f\weapons\hits\glass_arm_1.wav",0.177828,1,30};
|
||||
soundGlassArmored2[] = {"A3\sounds_f\weapons\hits\glass_arm_2.wav",0.177828,1,30};
|
||||
soundGlassArmored3[] = {"A3\sounds_f\weapons\hits\glass_arm_3.wav",0.177828,1,30};
|
||||
soundGlassArmored4[] = {"A3\sounds_f\weapons\hits\glass_arm_4.wav",0.177828,1,30};
|
||||
soundGlassArmored5[] = {"A3\sounds_f\weapons\hits\glass_arm_5.wav",0.177828,1,30};
|
||||
soundGlassArmored6[] = {"A3\sounds_f\weapons\hits\glass_arm_6.wav",0.177828,1,30};
|
||||
soundGlassArmored7[] = {"A3\sounds_f\weapons\hits\glass_arm_7.wav",0.177828,1,30};
|
||||
soundGlassArmored8[] = {"A3\sounds_f\weapons\hits\glass_arm_8.wav",0.177828,1,30};
|
||||
soundVehiclePlate1[] = {"A3\sounds_f\weapons\hits\metal_plate_1.wav",0.281170,1,40};
|
||||
soundVehiclePlate2[] = {"A3\sounds_f\weapons\hits\metal_plate_2.wav",0.281170,1,40};
|
||||
soundVehiclePlate3[] = {"A3\sounds_f\weapons\hits\metal_plate_3.wav",0.281170,1,40};
|
||||
soundVehiclePlate4[] = {"A3\sounds_f\weapons\hits\metal_plate_4.wav",0.281170,1,40};
|
||||
soundVehiclePlate5[] = {"A3\sounds_f\weapons\hits\metal_plate_5.wav",0.281170,1,40};
|
||||
soundVehiclePlate6[] = {"A3\sounds_f\weapons\hits\metal_plate_6.wav",0.281170,1,40};
|
||||
soundVehiclePlate7[] = {"A3\sounds_f\weapons\hits\metal_plate_7.wav",0.281170,1,40};
|
||||
soundVehiclePlate8[] = {"A3\sounds_f\weapons\hits\metal_plate_8.wav",0.281170,1,40};
|
||||
soundWood1[] = {"A3\sounds_f\weapons\hits\wood_1.wav",0.158114,1,30};
|
||||
soundWood2[] = {"A3\sounds_f\weapons\hits\wood_2.wav",0.158114,1,30};
|
||||
soundWood3[] = {"A3\sounds_f\weapons\hits\wood_3.wav",0.158114,1,30};
|
||||
soundWood4[] = {"A3\sounds_f\weapons\hits\wood_4.wav",0.158114,1,30};
|
||||
soundWood5[] = {"A3\sounds_f\weapons\hits\wood_5.wav",0.158114,1,30};
|
||||
soundWood6[] = {"A3\sounds_f\weapons\hits\wood_6.wav",0.158114,1,30};
|
||||
soundWood7[] = {"A3\sounds_f\weapons\hits\wood_7.wav",0.158114,1,30};
|
||||
soundWood8[] = {"A3\sounds_f\weapons\hits\wood_8.wav",0.158114,1,30};
|
||||
soundHitBody1[] = {"A3\sounds_f\weapons\hits\body_1.wav",0.0177828,1,25};
|
||||
soundHitBody2[] = {"A3\sounds_f\weapons\hits\body_2.wav",0.0177828,1,25};
|
||||
soundHitBody3[] = {"A3\sounds_f\weapons\hits\body_3.wav",0.0177828,1,25};
|
||||
soundHitBody4[] = {"A3\sounds_f\weapons\hits\body_4.wav",0.0177828,1,25};
|
||||
soundHitBody5[] = {"A3\sounds_f\weapons\hits\body_5.wav",0.0177828,1,25};
|
||||
soundHitBody6[] = {"A3\sounds_f\weapons\hits\body_6.wav",0.0177828,1,25};
|
||||
soundHitBody7[] = {"A3\sounds_f\weapons\hits\body_7.wav",0.0177828,1,25};
|
||||
soundHitBody8[] = {"A3\sounds_f\weapons\hits\body_8.wav",0.0177828,1,25};
|
||||
soundHitBuilding1[] = {"A3\sounds_f\weapons\hits\building_1.wav",0.251189,1,30};
|
||||
soundHitBuilding2[] = {"A3\sounds_f\weapons\hits\building_2.wav",0.251189,1,30};
|
||||
soundHitBuilding3[] = {"A3\sounds_f\weapons\hits\building_3.wav",0.251189,1,30};
|
||||
soundHitBuilding4[] = {"A3\sounds_f\weapons\hits\building_4.wav",0.251189,1,30};
|
||||
soundHitBuilding5[] = {"A3\sounds_f\weapons\hits\building_5.wav",0.251189,1,30};
|
||||
soundHitBuilding6[] = {"A3\sounds_f\weapons\hits\building_6.wav",0.251189,1,30};
|
||||
soundHitBuilding7[] = {"A3\sounds_f\weapons\hits\building_7.wav",0.251189,1,30};
|
||||
soundHitBuilding8[] = {"A3\sounds_f\weapons\hits\building_8.wav",0.251189,1,30};
|
||||
soundHitFoliage1[] = {"A3\sounds_f\weapons\hits\foliage_1.wav",0.177828,1,25};
|
||||
soundHitFoliage2[] = {"A3\sounds_f\weapons\hits\foliage_2.wav",0.177828,1,25};
|
||||
soundHitFoliage3[] = {"A3\sounds_f\weapons\hits\foliage_3.wav",0.177828,1,25};
|
||||
soundHitFoliage4[] = {"A3\sounds_f\weapons\hits\foliage_4.wav",0.177828,1,25};
|
||||
soundHitFoliage5[] = {"A3\sounds_f\weapons\hits\foliage_5.wav",0.177828,1,25};
|
||||
soundHitFoliage6[] = {"A3\sounds_f\weapons\hits\foliage_6.wav",0.177828,1,25};
|
||||
soundHitFoliage7[] = {"A3\sounds_f\weapons\hits\foliage_7.wav",0.177828,1,25};
|
||||
soundHitFoliage8[] = {"A3\sounds_f\weapons\hits\foliage_8.wav",0.177828,1,25};
|
||||
soundPlastic1[] = {"A3\sounds_f\weapons\hits\plastic_1.wav",0.177828,1,25};
|
||||
soundPlastic2[] = {"A3\sounds_f\weapons\hits\plastic_2.wav",0.177828,1,25};
|
||||
soundPlastic3[] = {"A3\sounds_f\weapons\hits\plastic_3.wav",0.177828,1,25};
|
||||
soundPlastic4[] = {"A3\sounds_f\weapons\hits\plastic_4.wav",0.177828,1,25};
|
||||
soundPlastic5[] = {"A3\sounds_f\weapons\hits\plastic_5.wav",0.177828,1,25};
|
||||
soundPlastic6[] = {"A3\sounds_f\weapons\hits\plastic_6.wav",0.177828,1,25};
|
||||
soundPlastic7[] = {"A3\sounds_f\weapons\hits\plastic_7.wav",0.177828,1,25};
|
||||
soundPlastic8[] = {"A3\sounds_f\weapons\hits\plastic_8.wav",0.177828,1,25};
|
||||
soundConcrete1[] = {"A3\sounds_f\weapons\hits\concrete_1.wav",0.177828,1,35};
|
||||
soundConcrete2[] = {"A3\sounds_f\weapons\hits\concrete_2.wav",0.177828,1,35};
|
||||
soundConcrete3[] = {"A3\sounds_f\weapons\hits\concrete_3.wav",0.177828,1,35};
|
||||
soundConcrete4[] = {"A3\sounds_f\weapons\hits\concrete_4.wav",0.177828,1,35};
|
||||
soundConcrete5[] = {"A3\sounds_f\weapons\hits\concrete_5.wav",0.177828,1,35};
|
||||
soundConcrete6[] = {"A3\sounds_f\weapons\hits\concrete_6.wav",0.177828,1,35};
|
||||
soundConcrete7[] = {"A3\sounds_f\weapons\hits\concrete_7.wav",0.177828,1,35};
|
||||
soundConcrete8[] = {"A3\sounds_f\weapons\hits\concrete_8.wav",0.177828,1,35};
|
||||
soundRubber1[] = {"A3\sounds_f\weapons\hits\tyre_1.wav",0.158114,1,25};
|
||||
soundRubber2[] = {"A3\sounds_f\weapons\hits\tyre_2.wav",0.158114,1,25};
|
||||
soundRubber3[] = {"A3\sounds_f\weapons\hits\tyre_3.wav",0.158114,1,25};
|
||||
soundRubber4[] = {"A3\sounds_f\weapons\hits\tyre_4.wav",0.158114,1,25};
|
||||
soundRubber5[] = {"A3\sounds_f\weapons\hits\tyre_5.wav",0.158114,1,25};
|
||||
soundRubber6[] = {"A3\sounds_f\weapons\hits\tyre_6.wav",0.158114,1,25};
|
||||
soundRubber7[] = {"A3\sounds_f\weapons\hits\tyre_7.wav",0.158114,1,25};
|
||||
soundRubber8[] = {"A3\sounds_f\weapons\hits\tyre_8.wav",0.158114,1,25};
|
||||
soundWater1[] = {"A3\sounds_f\weapons\hits\water_01.wav",0.158114,1,25};
|
||||
soundWater2[] = {"A3\sounds_f\weapons\hits\water_02.wav",0.158114,1,25};
|
||||
soundWater3[] = {"A3\sounds_f\weapons\hits\water_03.wav",0.158114,1,25};
|
||||
soundWater4[] = {"A3\sounds_f\weapons\hits\water_04.wav",0.158114,1,25};
|
||||
soundWater5[] = {"A3\sounds_f\weapons\hits\water_05.wav",0.158114,1,25};
|
||||
soundWater6[] = {"A3\sounds_f\weapons\hits\water_06.wav",0.158114,1,25};
|
||||
soundWater7[] = {"A3\sounds_f\weapons\hits\water_07.wav",0.158114,1,25};
|
||||
soundWater8[] = {"A3\sounds_f\weapons\hits\water_08.wav",0.158114,1,25};
|
||||
hitGroundSoft[] = {"soundGroundSoft1",0.2,"soundGroundSoft2",0.2,"soundGroundSoft3",0.1,"soundGroundSoft4",0.1,"soundGroundSoft5",0.1,"soundGroundSoft6",0.1,"soundGroundSoft7",0.1,"soundGroundSoft8",0.1};
|
||||
hitGroundHard[] = {"soundGroundHard1",0.2,"soundGroundHard2",0.2,"soundGroundHard3",0.1,"soundGroundHard4",0.1,"soundGroundHard5",0.1,"soundGroundHard6",0.1,"soundGroundHard7",0.1,"soundGroundHard8",0.1};
|
||||
hitMan[] = {"soundHitBody1",0.125,"soundHitBody2",0.125,"soundHitBody3",0.125,"soundHitBody4",0.125,"soundHitBody5",0.125,"soundHitBody6",0.125,"soundHitBody7",0.125,"soundHitBody8",0.125};
|
||||
hitArmor[] = {"soundVehiclePlate1",0.125,"soundVehiclePlate2",0.125,"soundVehiclePlate3",0.125,"soundVehiclePlate4",0.125,"soundVehiclePlate5",0.125,"soundVehiclePlate6",0.125,"soundVehiclePlate7",0.125,"soundVehiclePlate8",0.125};
|
||||
hitBuilding[] = {"soundHitBuilding1",0.2,"soundHitBuilding2",0.2,"soundHitBuilding3",0.1,"soundHitBuilding4",0.1,"soundHitBuilding5",0.1,"soundHitBuilding6",0.1,"soundHitBuilding7",0.1,"soundHitBuilding8",0.1};
|
||||
hitFoliage[] = {"soundHitFoliage1",0.125,"soundHitFoliage2",0.125,"soundHitFoliage3",0.125,"soundHitFoliage4",0.125,"soundHitFoliage5",0.125,"soundHitFoliage6",0.125,"soundHitFoliage7",0.125,"soundHitFoliage8",0.125};
|
||||
hitWood[] = {"soundWood1",0.125,"soundWood2",0.125,"soundWood3",0.125,"soundWood4",0.125,"soundWood5",0.125,"soundWood6",0.125,"soundWood7",0.125,"soundWood8",0.125};
|
||||
hitGlass[] = {"soundGlass1",0.125,"soundGlass2",0.125,"soundGlass3",0.125,"soundGlass4",0.125,"soundGlass5",0.125,"soundGlass6",0.125,"soundGlass7",0.125,"soundGlass8",0.125};
|
||||
hitGlassArmored[] = {"soundGlassArmored1",0.125,"soundGlassArmored2",0.125,"soundGlassArmored3",0.125,"soundGlassArmored4",0.125,"soundGlassArmored5",0.125,"soundGlassArmored6",0.125,"soundGlassArmored7",0.125,"soundGlassArmored8",0.125};
|
||||
hitConcrete[] = {"soundConcrete1",0.125,"soundConcrete2",0.125,"soundConcrete3",0.125,"soundConcrete4",0.125,"soundConcrete5",0.125,"soundConcrete6",0.125,"soundConcrete7",0.125,"soundConcrete8",0.125};
|
||||
hitRubber[] = {"soundRubber1",0.125,"soundRubber2",0.125,"soundRubber3",0.125,"soundRubber4",0.125,"soundRubber5",0.125,"soundRubber6",0.125,"soundRubber7",0.125,"soundRubber8",0.125};
|
||||
hitPlastic[] = {"soundPlastic1",0.125,"soundPlastic2",0.125,"soundPlastic3",0.125,"soundPlastic4",0.125,"soundPlastic5",0.125,"soundPlastic6",0.125,"soundPlastic7",0.125,"soundPlastic8",0.125};
|
||||
hitDefault[] = {"soundDefault1",0.2,"soundDefault2",0.2,"soundDefault3",0.1,"soundDefault4",0.1,"soundDefault5",0.1,"soundDefault6",0.1,"soundDefault7",0.1,"soundDefault8",0.1};
|
||||
hitMetal[] = {"soundMetal1",0.125,"soundMetal2",0.125,"soundMetal3",0.125,"soundMetal4",0.125,"soundMetal5",0.125,"soundMetal6",0.125,"soundMetal7",0.125,"soundMetal8",0.125};
|
||||
hitMetalplate[] = {"soundVehiclePlate1",0.125,"soundVehiclePlate2",0.125,"soundVehiclePlate3",0.125,"soundVehiclePlate4",0.125,"soundVehiclePlate5",0.125,"soundVehiclePlate6",0.125,"soundVehiclePlate7",0.125,"soundVehiclePlate8",0.125};
|
||||
hitWater[] = {"soundWater1",0.125,"soundWater2",0.125,"soundWater3",0.125,"soundWater4",0.125,"soundWater5",0.125,"soundWater6",0.125,"soundWater7",0.125,"soundWater8",0.125};
|
||||
bulletFly1[] = {"A3\sounds_f\weapons\hits\bullet_by_1.wav",1,1,35};
|
||||
bulletFly2[] = {"A3\sounds_f\weapons\hits\bullet_by_2.wav",1,1,35};
|
||||
bulletFly3[] = {"A3\sounds_f\weapons\hits\bullet_by_3.wav",1,1,35};
|
||||
bulletFly4[] = {"A3\sounds_f\weapons\hits\bullet_by_4.wav",1,1,35};
|
||||
bulletFly5[] = {"A3\sounds_f\weapons\hits\bullet_by_5.wav",1,1,35};
|
||||
bulletFly6[] = {"A3\sounds_f\weapons\hits\bullet_by_6.wav",1,1,35};
|
||||
bulletFly7[] = {"A3\sounds_f\weapons\hits\bullet_by_7.wav",1,1,35};
|
||||
bulletFly8[] = {"A3\sounds_f\weapons\hits\bullet_by_8.wav",1,1,35};
|
||||
bulletFly[] = {"bulletFly1",0.166,"bulletFly2",0.166,"bulletFly3",0.166,"bulletFly4",0.166,"bulletFly5",0.166,"bulletFly6",0.167,"bulletFly7",0.166,"bulletFly8",0.167};
|
||||
supersonicCrackNear[] = {"A3\sounds_f\weapons\hits\sscrack1.wav",1,1,35};
|
||||
supersonicCrackFar[] = {"A3\sounds_f\weapons\hits\sscrack2.wav",1,1,135};
|
||||
};
|
||||
*/
|
||||
/*
|
||||
class B_762x51_Ball;
|
||||
class ACE_frag_base: B_762x51_Ball { ////TODO: B_762x45_Ball no longer exists, is this a valid replacement?
|
||||
model = "\A3\Weapons_f\ammo\shell";
|
||||
timeToLive = 12;
|
||||
typicalSpeed = 800;
|
||||
// Fix sounds
|
||||
effectFly = "AmmoClassic";
|
||||
soundDefault1[] = {"A3\sounds_f\weapons\hits\concrete_1.wav",0.158114,1,30};
|
||||
soundDefault2[] = {"A3\sounds_f\weapons\hits\concrete_2.wav",0.158114,1,30};
|
||||
soundDefault3[] = {"A3\sounds_f\weapons\hits\concrete_3.wav",0.158114,1,30};
|
||||
soundDefault4[] = {"A3\sounds_f\weapons\hits\concrete_4.wav",0.158114,1,30};
|
||||
soundDefault5[] = {"A3\sounds_f\weapons\hits\concrete_5.wav",0.158114,1,30};
|
||||
soundDefault6[] = {"A3\sounds_f\weapons\hits\concrete_6.wav",0.158114,1,30};
|
||||
soundDefault7[] = {"A3\sounds_f\weapons\hits\concrete_7.wav",0.158114,1,30};
|
||||
soundDefault8[] = {"A3\sounds_f\weapons\hits\concrete_8.wav",0.158114,1,30};
|
||||
soundGroundSoft1[] = {"A3\sounds_f\weapons\hits\soft_ground_1.wav",0.02811705,1,30};
|
||||
soundGroundSoft2[] = {"A3\sounds_f\weapons\hits\soft_ground_2.wav",0.02811705,1,30};
|
||||
soundGroundSoft3[] = {"A3\sounds_f\weapons\hits\soft_ground_3.wav",0.02811705,1,30};
|
||||
soundGroundSoft4[] = {"A3\sounds_f\weapons\hits\soft_ground_4.wav",0.02811705,1,30};
|
||||
soundGroundSoft5[] = {"A3\sounds_f\weapons\hits\soft_ground_5.wav",0.02811705,1,30};
|
||||
soundGroundSoft6[] = {"A3\sounds_f\weapons\hits\soft_ground_6.wav",0.02811705,1,30};
|
||||
soundGroundSoft7[] = {"A3\sounds_f\weapons\hits\soft_ground_7.wav",0.02811705,1,30};
|
||||
soundGroundSoft8[] = {"A3\sounds_f\weapons\hits\soft_ground_8.wav",0.02811705,1,30};
|
||||
soundGroundHard1[] = {"A3\sounds_f\weapons\hits\hard_ground_1.wav",0.62946,1,40};
|
||||
soundGroundHard2[] = {"A3\sounds_f\weapons\hits\hard_ground_2.wav",0.62946,1,40};
|
||||
soundGroundHard3[] = {"A3\sounds_f\weapons\hits\hard_ground_3.wav",0.62946,1,40};
|
||||
soundGroundHard4[] = {"A3\sounds_f\weapons\hits\hard_ground_4.wav",0.62946,1,40};
|
||||
soundGroundHard5[] = {"A3\sounds_f\weapons\hits\hard_ground_5.wav",0.62946,1,40};
|
||||
soundGroundHard6[] = {"A3\sounds_f\weapons\hits\hard_ground_6.wav",0.62946,1,40};
|
||||
soundGroundHard7[] = {"A3\sounds_f\weapons\hits\hard_ground_7.wav",0.62946,1,40};
|
||||
soundGroundHard8[] = {"A3\sounds_f\weapons\hits\hard_ground_8.wav",0.62946,1,40};
|
||||
soundMetal1[] = {"A3\sounds_f\weapons\hits\metal_1.wav",0.158114,1,45};
|
||||
soundMetal2[] = {"A3\sounds_f\weapons\hits\metal_2.wav",0.158114,1,45};
|
||||
soundMetal3[] = {"A3\sounds_f\weapons\hits\metal_3.wav",0.158114,1,45};
|
||||
soundMetal4[] = {"A3\sounds_f\weapons\hits\metal_4.wav",0.158114,1,45};
|
||||
soundMetal5[] = {"A3\sounds_f\weapons\hits\metal_5.wav",0.158114,1,45};
|
||||
soundMetal6[] = {"A3\sounds_f\weapons\hits\metal_6.wav",0.158114,1,45};
|
||||
soundMetal7[] = {"A3\sounds_f\weapons\hits\metal_7.wav",0.158114,1,45};
|
||||
soundMetal8[] = {"A3\sounds_f\weapons\hits\metal_8.wav",0.158114,1,45};
|
||||
soundGlass1[] = {"A3\sounds_f\weapons\hits\glass_1.wav",0.177828,1,25};
|
||||
soundGlass2[] = {"A3\sounds_f\weapons\hits\glass_2.wav",0.177828,1,25};
|
||||
soundGlass3[] = {"A3\sounds_f\weapons\hits\glass_3.wav",0.177828,1,25};
|
||||
soundGlass4[] = {"A3\sounds_f\weapons\hits\glass_4.wav",0.177828,1,25};
|
||||
soundGlass5[] = {"A3\sounds_f\weapons\hits\glass_5.wav",0.177828,1,25};
|
||||
soundGlass6[] = {"A3\sounds_f\weapons\hits\glass_6.wav",0.177828,1,25};
|
||||
soundGlass7[] = {"A3\sounds_f\weapons\hits\glass_7.wav",0.177828,1,25};
|
||||
soundGlass8[] = {"A3\sounds_f\weapons\hits\glass_8.wav",0.177828,1,25};
|
||||
soundGlassArmored1[] = {"A3\sounds_f\weapons\hits\glass_arm_1.wav",0.177828,1,30};
|
||||
soundGlassArmored2[] = {"A3\sounds_f\weapons\hits\glass_arm_2.wav",0.177828,1,30};
|
||||
soundGlassArmored3[] = {"A3\sounds_f\weapons\hits\glass_arm_3.wav",0.177828,1,30};
|
||||
soundGlassArmored4[] = {"A3\sounds_f\weapons\hits\glass_arm_4.wav",0.177828,1,30};
|
||||
soundGlassArmored5[] = {"A3\sounds_f\weapons\hits\glass_arm_5.wav",0.177828,1,30};
|
||||
soundGlassArmored6[] = {"A3\sounds_f\weapons\hits\glass_arm_6.wav",0.177828,1,30};
|
||||
soundGlassArmored7[] = {"A3\sounds_f\weapons\hits\glass_arm_7.wav",0.177828,1,30};
|
||||
soundGlassArmored8[] = {"A3\sounds_f\weapons\hits\glass_arm_8.wav",0.177828,1,30};
|
||||
soundVehiclePlate1[] = {"A3\sounds_f\weapons\hits\metal_plate_1.wav",0.281170,1,40};
|
||||
soundVehiclePlate2[] = {"A3\sounds_f\weapons\hits\metal_plate_2.wav",0.281170,1,40};
|
||||
soundVehiclePlate3[] = {"A3\sounds_f\weapons\hits\metal_plate_3.wav",0.281170,1,40};
|
||||
soundVehiclePlate4[] = {"A3\sounds_f\weapons\hits\metal_plate_4.wav",0.281170,1,40};
|
||||
soundVehiclePlate5[] = {"A3\sounds_f\weapons\hits\metal_plate_5.wav",0.281170,1,40};
|
||||
soundVehiclePlate6[] = {"A3\sounds_f\weapons\hits\metal_plate_6.wav",0.281170,1,40};
|
||||
soundVehiclePlate7[] = {"A3\sounds_f\weapons\hits\metal_plate_7.wav",0.281170,1,40};
|
||||
soundVehiclePlate8[] = {"A3\sounds_f\weapons\hits\metal_plate_8.wav",0.281170,1,40};
|
||||
soundWood1[] = {"A3\sounds_f\weapons\hits\wood_1.wav",0.158114,1,30};
|
||||
soundWood2[] = {"A3\sounds_f\weapons\hits\wood_2.wav",0.158114,1,30};
|
||||
soundWood3[] = {"A3\sounds_f\weapons\hits\wood_3.wav",0.158114,1,30};
|
||||
soundWood4[] = {"A3\sounds_f\weapons\hits\wood_4.wav",0.158114,1,30};
|
||||
soundWood5[] = {"A3\sounds_f\weapons\hits\wood_5.wav",0.158114,1,30};
|
||||
soundWood6[] = {"A3\sounds_f\weapons\hits\wood_6.wav",0.158114,1,30};
|
||||
soundWood7[] = {"A3\sounds_f\weapons\hits\wood_7.wav",0.158114,1,30};
|
||||
soundWood8[] = {"A3\sounds_f\weapons\hits\wood_8.wav",0.158114,1,30};
|
||||
soundHitBody1[] = {"A3\sounds_f\weapons\hits\body_1.wav",0.0177828,1,25};
|
||||
soundHitBody2[] = {"A3\sounds_f\weapons\hits\body_2.wav",0.0177828,1,25};
|
||||
soundHitBody3[] = {"A3\sounds_f\weapons\hits\body_3.wav",0.0177828,1,25};
|
||||
soundHitBody4[] = {"A3\sounds_f\weapons\hits\body_4.wav",0.0177828,1,25};
|
||||
soundHitBody5[] = {"A3\sounds_f\weapons\hits\body_5.wav",0.0177828,1,25};
|
||||
soundHitBody6[] = {"A3\sounds_f\weapons\hits\body_6.wav",0.0177828,1,25};
|
||||
soundHitBody7[] = {"A3\sounds_f\weapons\hits\body_7.wav",0.0177828,1,25};
|
||||
soundHitBody8[] = {"A3\sounds_f\weapons\hits\body_8.wav",0.0177828,1,25};
|
||||
soundHitBuilding1[] = {"A3\sounds_f\weapons\hits\building_1.wav",0.251189,1,30};
|
||||
soundHitBuilding2[] = {"A3\sounds_f\weapons\hits\building_2.wav",0.251189,1,30};
|
||||
soundHitBuilding3[] = {"A3\sounds_f\weapons\hits\building_3.wav",0.251189,1,30};
|
||||
soundHitBuilding4[] = {"A3\sounds_f\weapons\hits\building_4.wav",0.251189,1,30};
|
||||
soundHitBuilding5[] = {"A3\sounds_f\weapons\hits\building_5.wav",0.251189,1,30};
|
||||
soundHitBuilding6[] = {"A3\sounds_f\weapons\hits\building_6.wav",0.251189,1,30};
|
||||
soundHitBuilding7[] = {"A3\sounds_f\weapons\hits\building_7.wav",0.251189,1,30};
|
||||
soundHitBuilding8[] = {"A3\sounds_f\weapons\hits\building_8.wav",0.251189,1,30};
|
||||
soundHitFoliage1[] = {"A3\sounds_f\weapons\hits\foliage_1.wav",0.177828,1,25};
|
||||
soundHitFoliage2[] = {"A3\sounds_f\weapons\hits\foliage_2.wav",0.177828,1,25};
|
||||
soundHitFoliage3[] = {"A3\sounds_f\weapons\hits\foliage_3.wav",0.177828,1,25};
|
||||
soundHitFoliage4[] = {"A3\sounds_f\weapons\hits\foliage_4.wav",0.177828,1,25};
|
||||
soundHitFoliage5[] = {"A3\sounds_f\weapons\hits\foliage_5.wav",0.177828,1,25};
|
||||
soundHitFoliage6[] = {"A3\sounds_f\weapons\hits\foliage_6.wav",0.177828,1,25};
|
||||
soundHitFoliage7[] = {"A3\sounds_f\weapons\hits\foliage_7.wav",0.177828,1,25};
|
||||
soundHitFoliage8[] = {"A3\sounds_f\weapons\hits\foliage_8.wav",0.177828,1,25};
|
||||
soundPlastic1[] = {"A3\sounds_f\weapons\hits\plastic_1.wav",0.177828,1,25};
|
||||
soundPlastic2[] = {"A3\sounds_f\weapons\hits\plastic_2.wav",0.177828,1,25};
|
||||
soundPlastic3[] = {"A3\sounds_f\weapons\hits\plastic_3.wav",0.177828,1,25};
|
||||
soundPlastic4[] = {"A3\sounds_f\weapons\hits\plastic_4.wav",0.177828,1,25};
|
||||
soundPlastic5[] = {"A3\sounds_f\weapons\hits\plastic_5.wav",0.177828,1,25};
|
||||
soundPlastic6[] = {"A3\sounds_f\weapons\hits\plastic_6.wav",0.177828,1,25};
|
||||
soundPlastic7[] = {"A3\sounds_f\weapons\hits\plastic_7.wav",0.177828,1,25};
|
||||
soundPlastic8[] = {"A3\sounds_f\weapons\hits\plastic_8.wav",0.177828,1,25};
|
||||
soundConcrete1[] = {"A3\sounds_f\weapons\hits\concrete_1.wav",0.177828,1,35};
|
||||
soundConcrete2[] = {"A3\sounds_f\weapons\hits\concrete_2.wav",0.177828,1,35};
|
||||
soundConcrete3[] = {"A3\sounds_f\weapons\hits\concrete_3.wav",0.177828,1,35};
|
||||
soundConcrete4[] = {"A3\sounds_f\weapons\hits\concrete_4.wav",0.177828,1,35};
|
||||
soundConcrete5[] = {"A3\sounds_f\weapons\hits\concrete_5.wav",0.177828,1,35};
|
||||
soundConcrete6[] = {"A3\sounds_f\weapons\hits\concrete_6.wav",0.177828,1,35};
|
||||
soundConcrete7[] = {"A3\sounds_f\weapons\hits\concrete_7.wav",0.177828,1,35};
|
||||
soundConcrete8[] = {"A3\sounds_f\weapons\hits\concrete_8.wav",0.177828,1,35};
|
||||
soundRubber1[] = {"A3\sounds_f\weapons\hits\tyre_1.wav",0.158114,1,25};
|
||||
soundRubber2[] = {"A3\sounds_f\weapons\hits\tyre_2.wav",0.158114,1,25};
|
||||
soundRubber3[] = {"A3\sounds_f\weapons\hits\tyre_3.wav",0.158114,1,25};
|
||||
soundRubber4[] = {"A3\sounds_f\weapons\hits\tyre_4.wav",0.158114,1,25};
|
||||
soundRubber5[] = {"A3\sounds_f\weapons\hits\tyre_5.wav",0.158114,1,25};
|
||||
soundRubber6[] = {"A3\sounds_f\weapons\hits\tyre_6.wav",0.158114,1,25};
|
||||
soundRubber7[] = {"A3\sounds_f\weapons\hits\tyre_7.wav",0.158114,1,25};
|
||||
soundRubber8[] = {"A3\sounds_f\weapons\hits\tyre_8.wav",0.158114,1,25};
|
||||
soundWater1[] = {"A3\sounds_f\weapons\hits\water_01.wav",0.158114,1,25};
|
||||
soundWater2[] = {"A3\sounds_f\weapons\hits\water_02.wav",0.158114,1,25};
|
||||
soundWater3[] = {"A3\sounds_f\weapons\hits\water_03.wav",0.158114,1,25};
|
||||
soundWater4[] = {"A3\sounds_f\weapons\hits\water_04.wav",0.158114,1,25};
|
||||
soundWater5[] = {"A3\sounds_f\weapons\hits\water_05.wav",0.158114,1,25};
|
||||
soundWater6[] = {"A3\sounds_f\weapons\hits\water_06.wav",0.158114,1,25};
|
||||
soundWater7[] = {"A3\sounds_f\weapons\hits\water_07.wav",0.158114,1,25};
|
||||
soundWater8[] = {"A3\sounds_f\weapons\hits\water_08.wav",0.158114,1,25};
|
||||
hitGroundSoft[] = {"soundGroundSoft1",0.2,"soundGroundSoft2",0.2,"soundGroundSoft3",0.1,"soundGroundSoft4",0.1,"soundGroundSoft5",0.1,"soundGroundSoft6",0.1,"soundGroundSoft7",0.1,"soundGroundSoft8",0.1};
|
||||
hitGroundHard[] = {"soundGroundHard1",0.2,"soundGroundHard2",0.2,"soundGroundHard3",0.1,"soundGroundHard4",0.1,"soundGroundHard5",0.1,"soundGroundHard6",0.1,"soundGroundHard7",0.1,"soundGroundHard8",0.1};
|
||||
hitMan[] = {"soundHitBody1",0.125,"soundHitBody2",0.125,"soundHitBody3",0.125,"soundHitBody4",0.125,"soundHitBody5",0.125,"soundHitBody6",0.125,"soundHitBody7",0.125,"soundHitBody8",0.125};
|
||||
hitArmor[] = {"soundVehiclePlate1",0.125,"soundVehiclePlate2",0.125,"soundVehiclePlate3",0.125,"soundVehiclePlate4",0.125,"soundVehiclePlate5",0.125,"soundVehiclePlate6",0.125,"soundVehiclePlate7",0.125,"soundVehiclePlate8",0.125};
|
||||
hitBuilding[] = {"soundHitBuilding1",0.2,"soundHitBuilding2",0.2,"soundHitBuilding3",0.1,"soundHitBuilding4",0.1,"soundHitBuilding5",0.1,"soundHitBuilding6",0.1,"soundHitBuilding7",0.1,"soundHitBuilding8",0.1};
|
||||
hitFoliage[] = {"soundHitFoliage1",0.125,"soundHitFoliage2",0.125,"soundHitFoliage3",0.125,"soundHitFoliage4",0.125,"soundHitFoliage5",0.125,"soundHitFoliage6",0.125,"soundHitFoliage7",0.125,"soundHitFoliage8",0.125};
|
||||
hitWood[] = {"soundWood1",0.125,"soundWood2",0.125,"soundWood3",0.125,"soundWood4",0.125,"soundWood5",0.125,"soundWood6",0.125,"soundWood7",0.125,"soundWood8",0.125};
|
||||
hitGlass[] = {"soundGlass1",0.125,"soundGlass2",0.125,"soundGlass3",0.125,"soundGlass4",0.125,"soundGlass5",0.125,"soundGlass6",0.125,"soundGlass7",0.125,"soundGlass8",0.125};
|
||||
hitGlassArmored[] = {"soundGlassArmored1",0.125,"soundGlassArmored2",0.125,"soundGlassArmored3",0.125,"soundGlassArmored4",0.125,"soundGlassArmored5",0.125,"soundGlassArmored6",0.125,"soundGlassArmored7",0.125,"soundGlassArmored8",0.125};
|
||||
hitConcrete[] = {"soundConcrete1",0.125,"soundConcrete2",0.125,"soundConcrete3",0.125,"soundConcrete4",0.125,"soundConcrete5",0.125,"soundConcrete6",0.125,"soundConcrete7",0.125,"soundConcrete8",0.125};
|
||||
hitRubber[] = {"soundRubber1",0.125,"soundRubber2",0.125,"soundRubber3",0.125,"soundRubber4",0.125,"soundRubber5",0.125,"soundRubber6",0.125,"soundRubber7",0.125,"soundRubber8",0.125};
|
||||
hitPlastic[] = {"soundPlastic1",0.125,"soundPlastic2",0.125,"soundPlastic3",0.125,"soundPlastic4",0.125,"soundPlastic5",0.125,"soundPlastic6",0.125,"soundPlastic7",0.125,"soundPlastic8",0.125};
|
||||
hitDefault[] = {"soundDefault1",0.2,"soundDefault2",0.2,"soundDefault3",0.1,"soundDefault4",0.1,"soundDefault5",0.1,"soundDefault6",0.1,"soundDefault7",0.1,"soundDefault8",0.1};
|
||||
hitMetal[] = {"soundMetal1",0.125,"soundMetal2",0.125,"soundMetal3",0.125,"soundMetal4",0.125,"soundMetal5",0.125,"soundMetal6",0.125,"soundMetal7",0.125,"soundMetal8",0.125};
|
||||
hitMetalplate[] = {"soundVehiclePlate1",0.125,"soundVehiclePlate2",0.125,"soundVehiclePlate3",0.125,"soundVehiclePlate4",0.125,"soundVehiclePlate5",0.125,"soundVehiclePlate6",0.125,"soundVehiclePlate7",0.125,"soundVehiclePlate8",0.125};
|
||||
hitWater[] = {"soundWater1",0.125,"soundWater2",0.125,"soundWater3",0.125,"soundWater4",0.125,"soundWater5",0.125,"soundWater6",0.125,"soundWater7",0.125,"soundWater8",0.125};
|
||||
bulletFly1[] = {"A3\sounds_f\weapons\hits\bullet_by_1.wav",1,1,35};
|
||||
bulletFly2[] = {"A3\sounds_f\weapons\hits\bullet_by_2.wav",1,1,35};
|
||||
bulletFly3[] = {"A3\sounds_f\weapons\hits\bullet_by_3.wav",1,1,35};
|
||||
bulletFly4[] = {"A3\sounds_f\weapons\hits\bullet_by_4.wav",1,1,35};
|
||||
bulletFly5[] = {"A3\sounds_f\weapons\hits\bullet_by_5.wav",1,1,35};
|
||||
bulletFly6[] = {"A3\sounds_f\weapons\hits\bullet_by_6.wav",1,1,35};
|
||||
bulletFly7[] = {"A3\sounds_f\weapons\hits\bullet_by_7.wav",1,1,35};
|
||||
bulletFly8[] = {"A3\sounds_f\weapons\hits\bullet_by_8.wav",1,1,35};
|
||||
bulletFly[] = {"bulletFly1",0.166,"bulletFly2",0.166,"bulletFly3",0.166,"bulletFly4",0.166,"bulletFly5",0.166,"bulletFly6",0.167,"bulletFly7",0.166,"bulletFly8",0.167};
|
||||
supersonicCrackNear[] = {"A3\sounds_f\weapons\hits\sscrack1.wav",1,1,35};
|
||||
supersonicCrackFar[] = {"A3\sounds_f\weapons\hits\sscrack2.wav",1,1,135};
|
||||
};
|
||||
*/
|
||||
|
||||
class B_65x39_Caseless;
|
||||
class ACE_frag_base: B_65x39_Caseless {
|
||||
timeToLive = 12;
|
||||
typicalSpeed = 1500;
|
||||
deflecting = 65;
|
||||
};
|
||||
class B_65x39_Caseless;
|
||||
class ACE_frag_base: B_65x39_Caseless {
|
||||
timeToLive = 12;
|
||||
typicalSpeed = 1500;
|
||||
deflecting = 65;
|
||||
};
|
||||
|
||||
class ACE_frag_tiny: ACE_frag_base {
|
||||
hit = 6;
|
||||
airFriction = BASE_DRAG;
|
||||
caliber = 0.75;
|
||||
};
|
||||
class ACE_frag_tiny: ACE_frag_base {
|
||||
hit = 6;
|
||||
airFriction = BASE_DRAG;
|
||||
caliber = 0.75;
|
||||
};
|
||||
|
||||
class ACE_frag_tiny_HD: ACE_frag_base {
|
||||
hit = 6;
|
||||
airFriction = BASE_DRAG_HD;
|
||||
caliber = 0.75;
|
||||
};
|
||||
class ACE_frag_tiny_HD: ACE_frag_base {
|
||||
hit = 6;
|
||||
airFriction = BASE_DRAG_HD;
|
||||
caliber = 0.75;
|
||||
};
|
||||
|
||||
class ACE_frag_small: ACE_frag_base {
|
||||
hit = 12;
|
||||
airFriction = BASE_DRAG*0.9;
|
||||
};
|
||||
class ACE_frag_small: ACE_frag_base {
|
||||
hit = 12;
|
||||
airFriction = BASE_DRAG*0.9;
|
||||
};
|
||||
|
||||
class ACE_frag_small_HD: ACE_frag_base {
|
||||
hit = 12;
|
||||
airFriction = BASE_DRAG_HD*0.9;
|
||||
};
|
||||
class ACE_frag_small_HD: ACE_frag_base {
|
||||
hit = 12;
|
||||
airFriction = BASE_DRAG_HD*0.9;
|
||||
};
|
||||
|
||||
class ACE_frag_medium: ACE_frag_base {
|
||||
hit = 14;
|
||||
airFriction = BASE_DRAG*0.75;
|
||||
caliber = 1.2;
|
||||
};
|
||||
class ACE_frag_medium: ACE_frag_base {
|
||||
hit = 14;
|
||||
airFriction = BASE_DRAG*0.75;
|
||||
caliber = 1.2;
|
||||
};
|
||||
|
||||
class ACE_frag_medium_HD: ACE_frag_base {
|
||||
hit = 14;
|
||||
airFriction = BASE_DRAG_HD*0.75;
|
||||
caliber = 1.2;
|
||||
};
|
||||
class ACE_frag_medium_HD: ACE_frag_base {
|
||||
hit = 14;
|
||||
airFriction = BASE_DRAG_HD*0.75;
|
||||
caliber = 1.2;
|
||||
};
|
||||
|
||||
class ACE_frag_large: ACE_frag_base {
|
||||
hit = 28;
|
||||
indirectHit = 2;
|
||||
indirectHitRange = 0.25;
|
||||
airFriction = BASE_DRAG*0.65;
|
||||
caliber = 2;
|
||||
explosive = 0;
|
||||
class ACE_frag_large: ACE_frag_base {
|
||||
hit = 28;
|
||||
indirectHit = 2;
|
||||
indirectHitRange = 0.25;
|
||||
airFriction = BASE_DRAG*0.65;
|
||||
caliber = 2;
|
||||
explosive = 0;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_frag_large_HD: ACE_frag_large {
|
||||
hit = 28;
|
||||
indirectHit = 2;
|
||||
indirectHitRange = 0.25;
|
||||
airFriction = BASE_DRAG_HD*0.65;
|
||||
caliber = 2;
|
||||
class ACE_frag_large_HD: ACE_frag_large {
|
||||
hit = 28;
|
||||
indirectHit = 2;
|
||||
indirectHitRange = 0.25;
|
||||
airFriction = BASE_DRAG_HD*0.65;
|
||||
caliber = 2;
|
||||
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_frag_huge: ACE_frag_large {
|
||||
hit = 40;
|
||||
indirectHit = 4;
|
||||
indirectHitRange = 0.5;
|
||||
airFriction = BASE_DRAG*0.5;
|
||||
caliber = 2.8;
|
||||
};
|
||||
class ACE_frag_huge: ACE_frag_large {
|
||||
hit = 40;
|
||||
indirectHit = 4;
|
||||
indirectHitRange = 0.5;
|
||||
airFriction = BASE_DRAG*0.5;
|
||||
caliber = 2.8;
|
||||
};
|
||||
|
||||
class ACE_frag_huge_HD: ACE_frag_large {
|
||||
hit = 40;
|
||||
indirectHit = 4;
|
||||
indirectHitRange = 0.5;
|
||||
airFriction = BASE_DRAG_HD*0.5;
|
||||
caliber = 2.8;
|
||||
};
|
||||
class ACE_frag_huge_HD: ACE_frag_large {
|
||||
hit = 40;
|
||||
indirectHit = 4;
|
||||
indirectHitRange = 0.5;
|
||||
airFriction = BASE_DRAG_HD*0.5;
|
||||
caliber = 2.8;
|
||||
};
|
||||
|
||||
class ACE_frag_spall_small: ACE_frag_small {
|
||||
timeToLive = 0.1;
|
||||
};
|
||||
class ACE_frag_spall_small: ACE_frag_small {
|
||||
timeToLive = 0.1;
|
||||
};
|
||||
|
||||
class ACE_frag_spall_medium: ACE_frag_medium {
|
||||
timeToLive = 0.15;
|
||||
};
|
||||
class ACE_frag_spall_medium: ACE_frag_medium {
|
||||
timeToLive = 0.15;
|
||||
};
|
||||
|
||||
class ACE_frag_spall_large: ACE_frag_large {
|
||||
timeToLive = 0.25;
|
||||
};
|
||||
class ACE_frag_spall_large: ACE_frag_large {
|
||||
timeToLive = 0.25;
|
||||
};
|
||||
|
||||
class ACE_frag_spall_huge: ACE_frag_huge {
|
||||
timeToLive = 0.3;
|
||||
};
|
||||
class ACE_frag_spall_huge: ACE_frag_huge {
|
||||
timeToLive = 0.3;
|
||||
};
|
||||
};
|
||||
|
@ -1,17 +1,17 @@
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_pre_init));
|
||||
};
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_pre_init));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_post_init));
|
||||
};
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_post_init));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_FiredBIS_EventHandlers {
|
||||
class AllVehicles {
|
||||
ADDON = QUOTE(_this call FUNC(fired));
|
||||
};
|
||||
class AllVehicles {
|
||||
ADDON = QUOTE(_this call FUNC(fired));
|
||||
};
|
||||
};
|
||||
|
@ -1,18 +1,18 @@
|
||||
#include "script_component.hpp"
|
||||
if(isServer) then {
|
||||
[QGVAR(frag_eh), { _this call FUNC(frago); }] call ace_common_fnc_addEventHandler;
|
||||
[QGVAR(frag_eh), { _this call FUNC(frago); }] call ace_common_fnc_addEventHandler;
|
||||
};
|
||||
/*
|
||||
GVAR(replacedBisArtyWrapper) = false;
|
||||
[] spawn {
|
||||
waitUntil {
|
||||
if(!(isNil "BIS_ARTY_F_ShellFlight")) then {
|
||||
ACE_WRAPPER_BIS_ARTY_F_ShellFlight = BIS_ARTY_F_ShellFlight;
|
||||
BIS_ARTY_F_ShellFlight = FUNC(BIS_ARTY_WRAPPER);
|
||||
GVAR(replacedBisArtyWrapper) = true;
|
||||
};
|
||||
sleep 4;
|
||||
GVAR(replacedBisArtyWrapper)
|
||||
};
|
||||
waitUntil {
|
||||
if(!(isNil "BIS_ARTY_F_ShellFlight")) then {
|
||||
ACE_WRAPPER_BIS_ARTY_F_ShellFlight = BIS_ARTY_F_ShellFlight;
|
||||
BIS_ARTY_F_ShellFlight = FUNC(BIS_ARTY_WRAPPER);
|
||||
GVAR(replacedBisArtyWrapper) = true;
|
||||
};
|
||||
sleep 4;
|
||||
GVAR(replacedBisArtyWrapper)
|
||||
};
|
||||
};
|
||||
*/
|
@ -1,13 +1,13 @@
|
||||
#include "script_component.hpp"
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = { "A3_Misc_F", "A3_Weapons_F" };
|
||||
author[] = {"Nou"};
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = { "A3_Misc_F", "A3_Weapons_F" };
|
||||
author[] = {"Nou"};
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
//PRELOAD_ADDONS;
|
||||
|
@ -1,13 +1,13 @@
|
||||
#include "script_component.hpp"
|
||||
_ret = [(_this select 6)] call FUNC(removeTrack);
|
||||
if(!_ret) then {
|
||||
[(_this select 6)] call FUNC(addBlackList);
|
||||
[(_this select 6)] call FUNC(addBlackList);
|
||||
};
|
||||
_this call ACE_WRAPPER_BIS_ARTY_F_ShellFlight;
|
||||
_catEntry = BIS_ARTY_SHELLCAT select ((count BIS_ARTY_SHELLCAT) - 1);
|
||||
_shell = _catEntry select 0;
|
||||
_ARTY_DeployOnImpact = getText (configFile >> "CfgAmmo" >> "ARTY_DeployOnImpact");
|
||||
if(_ARTY_DeployOnImpact == "") then {
|
||||
_this set[6, _shell];
|
||||
_this call FUNC(fired);
|
||||
_this set[6, _shell];
|
||||
_this call FUNC(fired);
|
||||
};
|
@ -2,6 +2,6 @@
|
||||
private ["_round"];
|
||||
_round = _this select 0;
|
||||
if(alive _round) then {
|
||||
GVAR(trackedObjects) set[(count GVAR(trackedObjects)), _round];
|
||||
[DFUNC(trackFragRound), 0, [_round, (getPosASL _round), (velocity _round), (typeOf _round), time, objNull, false, 0, 0]] call cba_fnc_addPerFrameHandler;
|
||||
GVAR(trackedObjects) set[(count GVAR(trackedObjects)), _round];
|
||||
[DFUNC(trackFragRound), 0, [_round, (getPosASL _round), (velocity _round), (typeOf _round), time, objNull, false, 0, 0]] call cba_fnc_addPerFrameHandler;
|
||||
};
|
@ -1,6 +1,6 @@
|
||||
#include "script_component.hpp"
|
||||
if(GVAR(autoTrace)) then {
|
||||
[] call FUNC(startTracing);
|
||||
[] call FUNC(startTracing);
|
||||
};
|
||||
|
||||
// setAccTime 0.05;
|
||||
@ -9,7 +9,7 @@ _obj = _this select 1;
|
||||
_origin = _this select 0;
|
||||
_color = [1,0,0,1];
|
||||
if((count _this) > 2) then {
|
||||
_color = _this select 2;
|
||||
_color = _this select 2;
|
||||
};
|
||||
_positions = [];
|
||||
_objVel = velocity _obj;
|
||||
|
@ -3,5 +3,5 @@
|
||||
private ["_ret"];
|
||||
_ret = [(_this select 0)] call FUNC(removeTrack);
|
||||
if(!_ret) then {
|
||||
[(_this select 0)] call FUNC(addBlackList);
|
||||
[(_this select 0)] call FUNC(addBlackList);
|
||||
};
|
@ -1,14 +1,14 @@
|
||||
//fnc_doSpall.sqf
|
||||
#include "script_component.hpp"
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
GVAR(traceFrags) = true;
|
||||
GVAR(traceFrags) = true;
|
||||
#endif
|
||||
// player sideChat "WAAAAAAAAAAAAAAAAAAAAA";
|
||||
private ["_params", "_initialData", "_hpData", "_roundType", "_round", "_object", "_caliber", "_explosive",
|
||||
"_idh", "_alive", "_exit", "_vm", "_velocity", "_unitDir", "_oldVelocity", "_curVelocity", "_diff", "_polar",
|
||||
"_pos", "_spallPos", "_i", "_pos1", "_pos2", "_blah", "_data", "_spallPolar", "_c", "_warn", "_m", "_k",
|
||||
"_gC", "_shellType", "_fragPower", "_spread", "_spallCount", "_elev", "_dir", "_vel", "_spallFragVect",
|
||||
"_fragment"];
|
||||
"_idh", "_alive", "_exit", "_vm", "_velocity", "_unitDir", "_oldVelocity", "_curVelocity", "_diff", "_polar",
|
||||
"_pos", "_spallPos", "_i", "_pos1", "_pos2", "_blah", "_data", "_spallPolar", "_c", "_warn", "_m", "_k",
|
||||
"_gC", "_shellType", "_fragPower", "_spread", "_spallCount", "_elev", "_dir", "_vel", "_spallFragVect",
|
||||
"_fragment"];
|
||||
|
||||
|
||||
_params = _this select 0;
|
||||
@ -23,7 +23,7 @@ _object removeEventHandler ["hitPart", _initialData select 0];
|
||||
_foundObjects = _initialData select 7;
|
||||
_index = _foundObjects find _object;
|
||||
if(_index != -1) then {
|
||||
_foundObjecsts set[_index, nil];
|
||||
_foundObjecsts set[_index, nil];
|
||||
};
|
||||
|
||||
_roundType = (_initialData select 2);
|
||||
@ -36,131 +36,131 @@ _idh = getNumber(configFile >> "CfgAmmo" >> _roundType >> "indirectHitRange");
|
||||
|
||||
_alive = true;
|
||||
if(!alive _round && (_initialData select 6) == 1) then {
|
||||
_alive = false;
|
||||
_alive = false;
|
||||
};
|
||||
|
||||
if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then {
|
||||
// player sideChat format["BBBB"];
|
||||
_exit = false;
|
||||
_vm = 1;
|
||||
_velocity = _initialData select 5;
|
||||
// player sideChat format["BBBB"];
|
||||
_exit = false;
|
||||
_vm = 1;
|
||||
_velocity = _initialData select 5;
|
||||
|
||||
_oldVelocity = _velocity call BIS_fnc_magnitude;
|
||||
_curVelocity = (velocity _round) call BIS_fnc_magnitude;
|
||||
_oldVelocity = _velocity call BIS_fnc_magnitude;
|
||||
_curVelocity = (velocity _round) call BIS_fnc_magnitude;
|
||||
|
||||
if(alive _round) then {
|
||||
_diff = _velocity vectorDiff (velocity _round);
|
||||
_polar = _diff call CBA_fnc_vect2polar;
|
||||
// player sideChat format["polar: %1", _polar];
|
||||
if((abs(_polar select 1) > 45 || abs(_polar select 2) > 45)) then {
|
||||
if(_caliber < 2.5) then {
|
||||
// player sideChat format["exit!"];
|
||||
_exit = true;
|
||||
} else {
|
||||
_vm = 1-(_curVelocity/_oldVelocity);
|
||||
};
|
||||
};
|
||||
};
|
||||
if(!_exit) then {
|
||||
_unitDir = vectorNormalized _velocity;
|
||||
_pos = _hpData select 3;
|
||||
_spallPos = nil;
|
||||
for "_i" from 0 to 100 do {
|
||||
_pos1 = [
|
||||
(_pos select 0) + (((_unitDir select 0)*0.01)*_i),
|
||||
(_pos select 1) + (((_unitDir select 1)*0.01)*_i),
|
||||
(_pos select 2) + (((_unitDir select 2)*0.01)*_i)
|
||||
];
|
||||
_pos2 = [
|
||||
(_pos select 0) + (((_unitDir select 0)*0.01)*(_i+1)),
|
||||
(_pos select 1) + (((_unitDir select 1)*0.01)*(_i+1)),
|
||||
(_pos select 2) + (((_unitDir select 2)*0.01)*(_i+1))
|
||||
];
|
||||
// _blah = [_object, "FIRE"] intersect [_object worldToModel (ASLtoATL _pos1), _object worldToModel (ASLtoATL _pos2)];
|
||||
// diag_log text format["b: %1", _blah];
|
||||
if(alive _round) then {
|
||||
_diff = _velocity vectorDiff (velocity _round);
|
||||
_polar = _diff call CBA_fnc_vect2polar;
|
||||
// player sideChat format["polar: %1", _polar];
|
||||
if((abs(_polar select 1) > 45 || abs(_polar select 2) > 45)) then {
|
||||
if(_caliber < 2.5) then {
|
||||
// player sideChat format["exit!"];
|
||||
_exit = true;
|
||||
} else {
|
||||
_vm = 1-(_curVelocity/_oldVelocity);
|
||||
};
|
||||
};
|
||||
};
|
||||
if(!_exit) then {
|
||||
_unitDir = vectorNormalized _velocity;
|
||||
_pos = _hpData select 3;
|
||||
_spallPos = nil;
|
||||
for "_i" from 0 to 100 do {
|
||||
_pos1 = [
|
||||
(_pos select 0) + (((_unitDir select 0)*0.01)*_i),
|
||||
(_pos select 1) + (((_unitDir select 1)*0.01)*_i),
|
||||
(_pos select 2) + (((_unitDir select 2)*0.01)*_i)
|
||||
];
|
||||
_pos2 = [
|
||||
(_pos select 0) + (((_unitDir select 0)*0.01)*(_i+1)),
|
||||
(_pos select 1) + (((_unitDir select 1)*0.01)*(_i+1)),
|
||||
(_pos select 2) + (((_unitDir select 2)*0.01)*(_i+1))
|
||||
];
|
||||
// _blah = [_object, "FIRE"] intersect [_object worldToModel (ASLtoATL _pos1), _object worldToModel (ASLtoATL _pos2)];
|
||||
// diag_log text format["b: %1", _blah];
|
||||
|
||||
// _data = [nil, nil, nil, 1, [[ASLtoATL _pos1, 1], [ASLtoATL _pos2, 1]]];
|
||||
// NOU_TRACES set[(count NOU_TRACES), _data];
|
||||
// _data = [nil, nil, nil, 1, [[ASLtoATL _pos1, 1], [ASLtoATL _pos2, 1]]];
|
||||
// NOU_TRACES set[(count NOU_TRACES), _data];
|
||||
|
||||
if(!lineIntersects [_pos1, _pos2]) exitWith {
|
||||
// player sideChat format["FOUND!"];
|
||||
_spallPos = _pos2;
|
||||
};
|
||||
};
|
||||
if(!isNil "_spallPos") then {
|
||||
_spallPolar = _velocity call CBA_fnc_vect2polar;
|
||||
if(!lineIntersects [_pos1, _pos2]) exitWith {
|
||||
// player sideChat format["FOUND!"];
|
||||
_spallPos = _pos2;
|
||||
};
|
||||
};
|
||||
if(!isNil "_spallPos") then {
|
||||
_spallPolar = _velocity call CBA_fnc_vect2polar;
|
||||
|
||||
if(_explosive > 0) then {
|
||||
// player sideChat format["EXPLOSIVE!"];
|
||||
_warn = false;
|
||||
_c = getNumber(configFile >> "CfgAmmo" >> _roundType >> "ACE_frag_CHARGE");
|
||||
if(_c == 0) then { _c = 1; _warn = true;};
|
||||
_m = getNumber(configFile >> "CfgAmmo" >> _roundType >> "ACE_frag_METAL");
|
||||
if(_m == 0) then { _m = 2; _warn = true;};
|
||||
_k = getNumber(configFile >> "CfgAmmo" >> _roundType >> "ACE_frag_GURNEY_K");
|
||||
if(_k == 0) then { _k = 1/2; _warn = true;};
|
||||
_gC = getNumber(configFile >> "CfgAmmo" >> _roundType >> "ACE_frag_GURNEY_C");
|
||||
if(_gC == 0) then { _gC = 2440; _warn = true;};
|
||||
if(_explosive > 0) then {
|
||||
// player sideChat format["EXPLOSIVE!"];
|
||||
_warn = false;
|
||||
_c = getNumber(configFile >> "CfgAmmo" >> _roundType >> "ACE_frag_CHARGE");
|
||||
if(_c == 0) then { _c = 1; _warn = true;};
|
||||
_m = getNumber(configFile >> "CfgAmmo" >> _roundType >> "ACE_frag_METAL");
|
||||
if(_m == 0) then { _m = 2; _warn = true;};
|
||||
_k = getNumber(configFile >> "CfgAmmo" >> _roundType >> "ACE_frag_GURNEY_K");
|
||||
if(_k == 0) then { _k = 1/2; _warn = true;};
|
||||
_gC = getNumber(configFile >> "CfgAmmo" >> _roundType >> "ACE_frag_GURNEY_C");
|
||||
if(_gC == 0) then { _gC = 2440; _warn = true;};
|
||||
|
||||
if(_warn) then {
|
||||
diag_log text format["Ammo class %1 lacks proper explosive properties definitions for frag!", _roundType]; //TODO: turn this off when we get closer to release
|
||||
};
|
||||
if(_warn) then {
|
||||
diag_log text format["Ammo class %1 lacks proper explosive properties definitions for frag!", _roundType]; //TODO: turn this off when we get closer to release
|
||||
};
|
||||
|
||||
_fragPower = (((_m/_c)+_k)^-(1/2))*_gC;
|
||||
_spallPolar set[0, _fragPower*0.66];
|
||||
};
|
||||
_fragPower = (((_m/_c)+_k)^-(1/2))*_gC;
|
||||
_spallPolar set[0, _fragPower*0.66];
|
||||
};
|
||||
|
||||
_fragTypes = [
|
||||
"ACE_frag_spall_small", "ACE_frag_spall_small", "ACE_frag_spall_small",
|
||||
"ACE_frag_spall_small","ACE_frag_spall_medium","ACE_frag_spall_medium","ACE_frag_spall_medium",
|
||||
"ACE_frag_spall_medium", "ACE_frag_spall_large", "ACE_frag_spall_large", "ACE_frag_spall_huge",
|
||||
"ACE_frag_spall_huge"
|
||||
_fragTypes = [
|
||||
"ACE_frag_spall_small", "ACE_frag_spall_small", "ACE_frag_spall_small",
|
||||
"ACE_frag_spall_small","ACE_frag_spall_medium","ACE_frag_spall_medium","ACE_frag_spall_medium",
|
||||
"ACE_frag_spall_medium", "ACE_frag_spall_large", "ACE_frag_spall_large", "ACE_frag_spall_huge",
|
||||
"ACE_frag_spall_huge"
|
||||
|
||||
];
|
||||
];
|
||||
|
||||
// diag_log text format["SPALL POWER: %1", _spallPolar select 0];
|
||||
_spread = 15+(random 25);
|
||||
_spallCount = 5+(random 10);
|
||||
for "_i" from 1 to _spallCount do {
|
||||
_elev = ((_spallPolar select 2)-_spread)+(random (_spread*2));
|
||||
_dir = ((_spallPolar select 1)-_spread)+(random (_spread*2));
|
||||
if(abs _elev > 90) then {
|
||||
_dir = _dir + 180;
|
||||
};
|
||||
_dir = _dir % 360;
|
||||
_vel = (_spallPolar select 0)*0.33*_vm;
|
||||
_vel = (_vel-(_vel*0.25))+(random (_vel*0.5));
|
||||
// diag_log text format["SPALL POWER: %1", _spallPolar select 0];
|
||||
_spread = 15+(random 25);
|
||||
_spallCount = 5+(random 10);
|
||||
for "_i" from 1 to _spallCount do {
|
||||
_elev = ((_spallPolar select 2)-_spread)+(random (_spread*2));
|
||||
_dir = ((_spallPolar select 1)-_spread)+(random (_spread*2));
|
||||
if(abs _elev > 90) then {
|
||||
_dir = _dir + 180;
|
||||
};
|
||||
_dir = _dir % 360;
|
||||
_vel = (_spallPolar select 0)*0.33*_vm;
|
||||
_vel = (_vel-(_vel*0.25))+(random (_vel*0.5));
|
||||
|
||||
_spallFragVect = [_vel, _dir, _elev] call CBA_fnc_polar2vect;
|
||||
_fragType = round (random ((count _fragTypes)-1));
|
||||
_fragment = (_fragTypes select _fragType) createVehicleLocal [0,0,10000];
|
||||
_fragment setPosASL _spallPos;
|
||||
_fragment setVelocity _spallFragVect;
|
||||
if(GVAR(traceFrags)) then {
|
||||
[player, _fragment, [1,0.5,0,1]] call FUNC(addTrack);
|
||||
};
|
||||
};
|
||||
_spread = 5+(random 5);
|
||||
_spallCount = 3+(random 5);
|
||||
for "_i" from 1 to _spallCount do {
|
||||
_elev = ((_spallPolar select 2)-_spread)+(random (_spread*2));
|
||||
_dir = ((_spallPolar select 1)-_spread)+(random (_spread*2));
|
||||
if(abs _elev > 90) then {
|
||||
_dir = _dir + 180;
|
||||
};
|
||||
_dir = _dir % 360;
|
||||
_vel = (_spallPolar select 0)*0.55*_vm;
|
||||
_vel = (_vel-(_vel*0.25))+(random (_vel*0.5));
|
||||
_spallFragVect = [_vel, _dir, _elev] call CBA_fnc_polar2vect;
|
||||
_fragType = round (random ((count _fragTypes)-1));
|
||||
_fragment = (_fragTypes select _fragType) createVehicleLocal [0,0,10000];
|
||||
_fragment setPosASL _spallPos;
|
||||
_fragment setVelocity _spallFragVect;
|
||||
if(GVAR(traceFrags)) then {
|
||||
[player, _fragment, [1,0.5,0,1]] call FUNC(addTrack);
|
||||
};
|
||||
};
|
||||
_spread = 5+(random 5);
|
||||
_spallCount = 3+(random 5);
|
||||
for "_i" from 1 to _spallCount do {
|
||||
_elev = ((_spallPolar select 2)-_spread)+(random (_spread*2));
|
||||
_dir = ((_spallPolar select 1)-_spread)+(random (_spread*2));
|
||||
if(abs _elev > 90) then {
|
||||
_dir = _dir + 180;
|
||||
};
|
||||
_dir = _dir % 360;
|
||||
_vel = (_spallPolar select 0)*0.55*_vm;
|
||||
_vel = (_vel-(_vel*0.25))+(random (_vel*0.5));
|
||||
|
||||
_spallFragVect = [_vel, _dir, _elev] call CBA_fnc_polar2vect;
|
||||
_fragType = round (random ((count _fragTypes)-1));
|
||||
_fragment = (_fragTypes select _fragType) createVehicleLocal [0,0,10000];
|
||||
_fragment setPosASL _spallPos;
|
||||
_fragment setVelocity _spallFragVect;
|
||||
if(GVAR(traceFrags)) then {
|
||||
[player, _fragment, [1,0,0,1]] call FUNC(addTrack);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
_spallFragVect = [_vel, _dir, _elev] call CBA_fnc_polar2vect;
|
||||
_fragType = round (random ((count _fragTypes)-1));
|
||||
_fragment = (_fragTypes select _fragType) createVehicleLocal [0,0,10000];
|
||||
_fragment setPosASL _spallPos;
|
||||
_fragment setVelocity _spallFragVect;
|
||||
if(GVAR(traceFrags)) then {
|
||||
[player, _fragment, [1,0,0,1]] call FUNC(addTrack);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -1,32 +1,32 @@
|
||||
#include "script_component.hpp"
|
||||
{
|
||||
_positions = _x select 4;
|
||||
_color = _x select 5;
|
||||
_index = 0;
|
||||
_max = count _positions;
|
||||
_startSpeed = (_positions select 0) select 1;
|
||||
if(_startSpeed <= 0) then {
|
||||
_startSpeed = 0.01;
|
||||
};
|
||||
_lastSpd = [];
|
||||
_lastPos = [];
|
||||
while {_index < _max} do {
|
||||
_data1 = _positions select _index;
|
||||
_data2 = nil;
|
||||
if(_index + ACE_TRACE_DRAW_INC >= _max) then {
|
||||
_data2 = _positions select (_max - 1);
|
||||
} else {
|
||||
_data2 = _positions select (_index + ACE_TRACE_DRAW_INC);
|
||||
};
|
||||
_positions = _x select 4;
|
||||
_color = _x select 5;
|
||||
_index = 0;
|
||||
_max = count _positions;
|
||||
_startSpeed = (_positions select 0) select 1;
|
||||
if(_startSpeed <= 0) then {
|
||||
_startSpeed = 0.01;
|
||||
};
|
||||
_lastSpd = [];
|
||||
_lastPos = [];
|
||||
while {_index < _max} do {
|
||||
_data1 = _positions select _index;
|
||||
_data2 = nil;
|
||||
if(_index + ACE_TRACE_DRAW_INC >= _max) then {
|
||||
_data2 = _positions select (_max - 1);
|
||||
} else {
|
||||
_data2 = _positions select (_index + ACE_TRACE_DRAW_INC);
|
||||
};
|
||||
|
||||
_pos1 = _data1 select 0;
|
||||
_pos2 = _data2 select 0;
|
||||
_index = _index + ACE_TRACE_DRAW_INC;
|
||||
_pos1 = _data1 select 0;
|
||||
_pos2 = _data2 select 0;
|
||||
_index = _index + ACE_TRACE_DRAW_INC;
|
||||
|
||||
|
||||
drawLine3D [_pos1, _pos2, _color];
|
||||
_lastPos = _pos2;
|
||||
_lastSpd = _data1 select 1;
|
||||
};
|
||||
// drawIcon3D ["", [1,0,0,1], _lastPos, 0, 0, 0, format["%1m/s", _lastSpd], 1, 0.05, "PuristaMedium"];
|
||||
drawLine3D [_pos1, _pos2, _color];
|
||||
_lastPos = _pos2;
|
||||
_lastSpd = _data1 select 1;
|
||||
};
|
||||
// drawIcon3D ["", [1,0,0,1], _lastPos, 0, 0, 0, format["%1m/s", _lastSpd], 1, 0.05, "PuristaMedium"];
|
||||
} forEach GVAR(traces);
|
@ -7,42 +7,42 @@ _type = _this select 4;
|
||||
_round = _this select 6;
|
||||
|
||||
if(_round in GVAR(blackList)) exitWith {
|
||||
GVAR(blackList) = GVAR(blackList) - [_round];
|
||||
GVAR(blackList) = GVAR(blackList) - [_round];
|
||||
};
|
||||
|
||||
_doFragTrack = false;
|
||||
if(_gun == player) then {
|
||||
_doFragTrack = true;
|
||||
_doFragTrack = true;
|
||||
} else {
|
||||
if((gunner _gun) == player) then {
|
||||
_doFragTrack = true;
|
||||
} else {
|
||||
if(local _gun && {!(isPlayer (gunner _gun))} && {!(isPlayer _gun)}) then {
|
||||
_doFragTrack = true;
|
||||
};
|
||||
};
|
||||
if((gunner _gun) == player) then {
|
||||
_doFragTrack = true;
|
||||
} else {
|
||||
if(local _gun && {!(isPlayer (gunner _gun))} && {!(isPlayer _gun)}) then {
|
||||
_doFragTrack = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
_doSpall = false;
|
||||
if(_doSpall) then {
|
||||
if(GVAR(spallIsTrackingCount) <= 0) then {
|
||||
GVAR(spallHPData) = [];
|
||||
};
|
||||
if(GVAR(spallIsTrackingCount) > 5) then {
|
||||
// player sideChat "LIMT!";
|
||||
_doSpall = false;
|
||||
} else {
|
||||
GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) + 1;
|
||||
};
|
||||
if(GVAR(spallIsTrackingCount) <= 0) then {
|
||||
GVAR(spallHPData) = [];
|
||||
};
|
||||
if(GVAR(spallIsTrackingCount) > 5) then {
|
||||
// player sideChat "LIMT!";
|
||||
_doSpall = false;
|
||||
} else {
|
||||
GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) + 1;
|
||||
};
|
||||
};
|
||||
// player sideChat format["c: %1", GVAR(spallIsTrackingCount)];
|
||||
[player, _round, [1,0,0,1]] call nou_fnc_addTrack;
|
||||
if(_doFragTrack && alive _round) then {
|
||||
GVAR(trackedObjects) pushBack _round;
|
||||
_spallTrack = [];
|
||||
_spallTrackID = [];
|
||||
[DFUNC(trackFragRound), 0, [_round, (getPosASL _round), (velocity _round), _type, time, _gun, _doSpall, _spallTrack, _spallTrackID]] call cba_fnc_addPerFrameHandler;
|
||||
if(_doSpall) then {
|
||||
[_round, 2, _spallTrack, _spallTrackID] call FUNC(spallTrack);
|
||||
};
|
||||
// player sideChat "WTF2";
|
||||
GVAR(trackedObjects) pushBack _round;
|
||||
_spallTrack = [];
|
||||
_spallTrackID = [];
|
||||
[DFUNC(trackFragRound), 0, [_round, (getPosASL _round), (velocity _round), _type, time, _gun, _doSpall, _spallTrack, _spallTrackID]] call cba_fnc_addPerFrameHandler;
|
||||
if(_doSpall) then {
|
||||
[_round, 2, _spallTrack, _spallTrackID] call FUNC(spallTrack);
|
||||
};
|
||||
// player sideChat "WTF2";
|
||||
};
|
||||
|
@ -4,7 +4,7 @@ private ["_params", "_shell"];
|
||||
_params = _this select 0;
|
||||
_shell = _params select 0;
|
||||
if(alive _shell) then {
|
||||
drop ["\Ca\Data\Cl_basic","","Billboard",1,30,(getPos _shell),[0,0,0],1,1.275,1.0,0.0,[0.5],[[0,1,0,1]],[0],0.0,2.0,"","",""];
|
||||
drop ["\Ca\Data\Cl_basic","","Billboard",1,30,(getPos _shell),[0,0,0],1,1.275,1.0,0.0,[0.5],[[0,1,0,1]],[0],0.0,2.0,"","",""];
|
||||
} else {
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
};
|
@ -10,11 +10,11 @@ if(!isServer) exitWith { };
|
||||
|
||||
// _startTime = diag_tickTime;
|
||||
private ["_round", "_lastPos", "_lastVel", "_shellType", "_gun", "_fragTypes", "_warn", "_atlPos", "_isArmed",
|
||||
"_fuseDist", "_indirectHitRange", "_fragRange", "_c", "_m", "_k", "_gC", "_fragPower", "_fragPowerRandom",
|
||||
"_manObjects", "_objects", "_crew", "_fragCount", "_fragArcs", "_doRandom", "_target", "_boundingBox",
|
||||
"_targetPos", "_distance", "_add", "_bbX", "_bbY", "_bbZ", "_cubic", "_targetVel", "_baseVec", "_dir",
|
||||
"_currentCount", "_count", "_vecVar", "_i", "_vec", "_fp", "_vel", "_fragType", "_fragObj", "_randomCount",
|
||||
"_sectorSize", "_sectorOffset", "_randomDir"];
|
||||
"_fuseDist", "_indirectHitRange", "_fragRange", "_c", "_m", "_k", "_gC", "_fragPower", "_fragPowerRandom",
|
||||
"_manObjects", "_objects", "_crew", "_fragCount", "_fragArcs", "_doRandom", "_target", "_boundingBox",
|
||||
"_targetPos", "_distance", "_add", "_bbX", "_bbY", "_bbZ", "_cubic", "_targetVel", "_baseVec", "_dir",
|
||||
"_currentCount", "_count", "_vecVar", "_i", "_vec", "_fp", "_vel", "_fragType", "_fragObj", "_randomCount",
|
||||
"_sectorSize", "_sectorOffset", "_randomDir"];
|
||||
|
||||
|
||||
_round = _this select 0;
|
||||
@ -23,30 +23,30 @@ _lastVel = _this select 2;
|
||||
_shellType = _this select 3;
|
||||
_gun = nil;
|
||||
if((count _this) > 5) then {
|
||||
_gun = _this select 5;
|
||||
_gun = _this select 5;
|
||||
};
|
||||
|
||||
_fragTypes = [
|
||||
"ACE_frag_tiny", "ACE_frag_tiny", "ACE_frag_tiny",
|
||||
"ACE_frag_tiny_HD", "ACE_frag_tiny_HD", "ACE_frag_tiny_HD",
|
||||
"ACE_frag_small","ACE_frag_small","ACE_frag_small","ACE_frag_small",
|
||||
"ACE_frag_small_HD","ACE_frag_small_HD","ACE_frag_small_HD","ACE_frag_small_HD",
|
||||
"ACE_frag_medium_HD", "ACE_frag_medium_HD", "ACE_frag_medium_HD", "ACE_frag_medium_HD", "ACE_frag_medium_HD"
|
||||
];
|
||||
"ACE_frag_tiny", "ACE_frag_tiny", "ACE_frag_tiny",
|
||||
"ACE_frag_tiny_HD", "ACE_frag_tiny_HD", "ACE_frag_tiny_HD",
|
||||
"ACE_frag_small","ACE_frag_small","ACE_frag_small","ACE_frag_small",
|
||||
"ACE_frag_small_HD","ACE_frag_small_HD","ACE_frag_small_HD","ACE_frag_small_HD",
|
||||
"ACE_frag_medium_HD", "ACE_frag_medium_HD", "ACE_frag_medium_HD", "ACE_frag_medium_HD", "ACE_frag_medium_HD"
|
||||
];
|
||||
|
||||
_warn = false;
|
||||
if(isArray (configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_CLASSES")) then {
|
||||
_fragTypes = getArray (configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_CLASSES");
|
||||
_fragTypes = getArray (configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_CLASSES");
|
||||
} else {
|
||||
_warn = true;
|
||||
_warn = true;
|
||||
};
|
||||
|
||||
_atlPos = ASLtoATL _lastPos;
|
||||
|
||||
_isArmed = true;
|
||||
if(!isNil "_gun") then {
|
||||
_fuseDist = getNumber(configFile >> "CfgAmmo" >> _shellType >> "fuseDistance");
|
||||
_isArmed = ((getPosASL _gun) distance _lastPos > _fuseDist);
|
||||
_fuseDist = getNumber(configFile >> "CfgAmmo" >> _shellType >> "fuseDistance");
|
||||
_isArmed = ((getPosASL _gun) distance _lastPos > _fuseDist);
|
||||
};
|
||||
|
||||
_indirectHitRange = getNumber(configFile >> "CfgAmmo" >> _shellType >> "indirecthitrange");
|
||||
@ -72,7 +72,7 @@ _gC = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_GURNEY_C");
|
||||
if(_gC == 0) then { _gC = 2440; _warn = true;};
|
||||
|
||||
if(_warn) then {
|
||||
diag_log text format["Ammo class %1 lacks proper explosive properties definitions for frag!", _shellType]; //TODO: turn this off when we get closer to release
|
||||
diag_log text format["Ammo class %1 lacks proper explosive properties definitions for frag!", _shellType]; //TODO: turn this off when we get closer to release
|
||||
};
|
||||
|
||||
_fragPower = (((_m/_c)+_k)^-(1/2))*_gC;
|
||||
@ -80,7 +80,7 @@ _fragPower = _fragPower*0.8; // Gunery equation is for a non-fragmenting metal,
|
||||
|
||||
_fragPowerRandom = _fragPower*0.5;
|
||||
if((_atlPos select 2) < 0.5) then {
|
||||
_lastPos set[2, (_lastPos select 2)+0.5];
|
||||
_lastPos set[2, (_lastPos select 2)+0.5];
|
||||
};
|
||||
|
||||
// _manObjects = _atlPos nearEntities ["CaManBase", _fragRange];
|
||||
@ -108,123 +108,123 @@ _fragArcs = [];
|
||||
_fragArcs set[360, 0];
|
||||
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
player sideChat format["_fragRange: %1", _fragRange];
|
||||
player sideChat format["_objects: %1", _objects];
|
||||
player sideChat format["_fragRange: %1", _fragRange];
|
||||
player sideChat format["_objects: %1", _objects];
|
||||
#endif
|
||||
_doRandom = false;
|
||||
if(_isArmed && (count _objects) > 0) then {
|
||||
{
|
||||
//if(random(1) > 0.5) then {
|
||||
_target = _x;
|
||||
if(alive _target) then {
|
||||
_boundingBox = boundingBox _target;
|
||||
_targetPos = (getPosASL _target);
|
||||
_distance = _targetPos distance _lastPos;
|
||||
_add = (((_boundingBox select 1) select 2)/2)+((((_distance-(_fragpower/8)) max 0)/_fragPower)*10);
|
||||
_bbX = (abs((_boundingBox select 0) select 0))+((_boundingBox select 1) select 0);
|
||||
_bbY = (abs((_boundingBox select 0) select 1))+((_boundingBox select 1) select 1);
|
||||
_bbZ = (abs((_boundingBox select 0) select 2))+((_boundingBox select 1) select 2);
|
||||
_cubic = _bbX*_bbY*_bbZ;
|
||||
if(_cubic > 1) then {
|
||||
_doRandom = true;
|
||||
{
|
||||
//if(random(1) > 0.5) then {
|
||||
_target = _x;
|
||||
if(alive _target) then {
|
||||
_boundingBox = boundingBox _target;
|
||||
_targetPos = (getPosASL _target);
|
||||
_distance = _targetPos distance _lastPos;
|
||||
_add = (((_boundingBox select 1) select 2)/2)+((((_distance-(_fragpower/8)) max 0)/_fragPower)*10);
|
||||
_bbX = (abs((_boundingBox select 0) select 0))+((_boundingBox select 1) select 0);
|
||||
_bbY = (abs((_boundingBox select 0) select 1))+((_boundingBox select 1) select 1);
|
||||
_bbZ = (abs((_boundingBox select 0) select 2))+((_boundingBox select 1) select 2);
|
||||
_cubic = _bbX*_bbY*_bbZ;
|
||||
if(_cubic > 1) then {
|
||||
_doRandom = true;
|
||||
|
||||
_targetVel = (velocity _target);
|
||||
_targetVel = (velocity _target);
|
||||
|
||||
|
||||
_targetPos set[0, (_targetPos select 0)+((_targetVel select 0)*(_distance/_fragPower))];
|
||||
_targetPos set[1, (_targetPos select 1)+((_targetVel select 1)*(_distance/_fragPower))];
|
||||
_targetPos set[2, (_targetPos select 2)+_add];
|
||||
_targetPos set[0, (_targetPos select 0)+((_targetVel select 0)*(_distance/_fragPower))];
|
||||
_targetPos set[1, (_targetPos select 1)+((_targetVel select 1)*(_distance/_fragPower))];
|
||||
_targetPos set[2, (_targetPos select 2)+_add];
|
||||
|
||||
_baseVec = _lastPos vectorFromTo _targetPos;
|
||||
|
||||
_dir = floor(_baseVec call CBA_fnc_vectDir);
|
||||
_currentCount = _fragArcs select _dir;
|
||||
if(isNil "_currentCount") then {
|
||||
_currentCount = 0;
|
||||
};
|
||||
if(_currentCount < 20) then {
|
||||
_count = ceil(random(sqrt(_m/1000)));
|
||||
_vecVar = FRAG_VEC_VAR;
|
||||
if(!(_target isKindOf "Man")) then {
|
||||
_vecVar = ((sqrt _cubic)/2000)+FRAG_VEC_VAR;
|
||||
if((count (crew _target)) == 0 && _count > 0) then {
|
||||
_count = 0 max (_count/2);
|
||||
};
|
||||
};
|
||||
for "_i" from 1 to _count do {
|
||||
_vec = +_baseVec;
|
||||
_dir = floor(_baseVec call CBA_fnc_vectDir);
|
||||
_currentCount = _fragArcs select _dir;
|
||||
if(isNil "_currentCount") then {
|
||||
_currentCount = 0;
|
||||
};
|
||||
if(_currentCount < 20) then {
|
||||
_count = ceil(random(sqrt(_m/1000)));
|
||||
_vecVar = FRAG_VEC_VAR;
|
||||
if(!(_target isKindOf "Man")) then {
|
||||
_vecVar = ((sqrt _cubic)/2000)+FRAG_VEC_VAR;
|
||||
if((count (crew _target)) == 0 && _count > 0) then {
|
||||
_count = 0 max (_count/2);
|
||||
};
|
||||
};
|
||||
for "_i" from 1 to _count do {
|
||||
_vec = +_baseVec;
|
||||
|
||||
_vec set[0, (_vec select 0)-(_vecVar/2)+(random _vecVar)];
|
||||
_vec set[1, (_vec select 1)-(_vecVar/2)+(random _vecVar)];
|
||||
_vec set[2, (_vec select 2)-(_vecVar/2)+(random _vecVar)];
|
||||
_vec set[0, (_vec select 0)-(_vecVar/2)+(random _vecVar)];
|
||||
_vec set[1, (_vec select 1)-(_vecVar/2)+(random _vecVar)];
|
||||
_vec set[2, (_vec select 2)-(_vecVar/2)+(random _vecVar)];
|
||||
|
||||
_fp = (_fragPower-(random (_fragPowerRandom)));
|
||||
_vel = [
|
||||
(_vec select 0)*_fp,
|
||||
(_vec select 1)*_fp,
|
||||
(_vec select 2)*_fp
|
||||
];
|
||||
_fp = (_fragPower-(random (_fragPowerRandom)));
|
||||
_vel = [
|
||||
(_vec select 0)*_fp,
|
||||
(_vec select 1)*_fp,
|
||||
(_vec select 2)*_fp
|
||||
];
|
||||
|
||||
_fragType = round (random ((count _fragTypes)-1));
|
||||
_fragObj = (_fragTypes select _fragType) createVehicleLocal [0,0,10000];
|
||||
// diag_log text format["fp: %1 %2", _fp, typeOf _fragObj];
|
||||
_fragObj setPosASL _lastPos;
|
||||
_fragObj setVectorDir _vec;
|
||||
_fragObj setVelocity _vel;
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
GVAR(TOTALFRAGS) = GVAR(TOTALFRAGS) + 1;
|
||||
GVAR(traceFrags) = true;
|
||||
#endif
|
||||
if(GVAR(traceFrags)) then {
|
||||
[player, _fragObj, [1,0,0,1]] call FUNC(addTrack);
|
||||
};
|
||||
_fragCount = _fragCount + 1;
|
||||
_currentCount = _currentCount + 1;
|
||||
};
|
||||
_fragArcs set[_dir, _currentCount];
|
||||
};
|
||||
};
|
||||
};
|
||||
//};
|
||||
if(_fragCount > MAX_FRAG_COUNT) exitWith {};
|
||||
} forEach _objects;
|
||||
if(_fragCount > MAX_FRAG_COUNT) exitWith {};
|
||||
_randomCount = (ceil((MAX_FRAG_COUNT-_fragCount)*0.1)) max 0;
|
||||
_sectorSize = 360 / (_randomCount max 1);
|
||||
// _doRandom = false;
|
||||
if(_doRandom) then {
|
||||
for "_i" from 1 to _randomCount do {
|
||||
// Distribute evenly
|
||||
_sectorOffset = 360 * (_i - 1) / (_randomCount max 1);
|
||||
_randomDir = random(_sectorSize);
|
||||
_vec = [cos(_sectorOffset + _randomDir), sin(_sectorOffset + _randomDir), sin(30 - (random 45))];
|
||||
_fragType = round (random ((count _fragTypes)-1));
|
||||
_fragObj = (_fragTypes select _fragType) createVehicleLocal [0,0,10000];
|
||||
// diag_log text format["fp: %1 %2", _fp, typeOf _fragObj];
|
||||
_fragObj setPosASL _lastPos;
|
||||
_fragObj setVectorDir _vec;
|
||||
_fragObj setVelocity _vel;
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
GVAR(TOTALFRAGS) = GVAR(TOTALFRAGS) + 1;
|
||||
GVAR(traceFrags) = true;
|
||||
#endif
|
||||
if(GVAR(traceFrags)) then {
|
||||
[player, _fragObj, [1,0,0,1]] call FUNC(addTrack);
|
||||
};
|
||||
_fragCount = _fragCount + 1;
|
||||
_currentCount = _currentCount + 1;
|
||||
};
|
||||
_fragArcs set[_dir, _currentCount];
|
||||
};
|
||||
};
|
||||
};
|
||||
//};
|
||||
if(_fragCount > MAX_FRAG_COUNT) exitWith {};
|
||||
} forEach _objects;
|
||||
if(_fragCount > MAX_FRAG_COUNT) exitWith {};
|
||||
_randomCount = (ceil((MAX_FRAG_COUNT-_fragCount)*0.1)) max 0;
|
||||
_sectorSize = 360 / (_randomCount max 1);
|
||||
// _doRandom = false;
|
||||
if(_doRandom) then {
|
||||
for "_i" from 1 to _randomCount do {
|
||||
// Distribute evenly
|
||||
_sectorOffset = 360 * (_i - 1) / (_randomCount max 1);
|
||||
_randomDir = random(_sectorSize);
|
||||
_vec = [cos(_sectorOffset + _randomDir), sin(_sectorOffset + _randomDir), sin(30 - (random 45))];
|
||||
|
||||
_fp = (_fragPower-(random (_fragPowerRandom)));
|
||||
_fp = (_fragPower-(random (_fragPowerRandom)));
|
||||
|
||||
_vel = [
|
||||
(_vec select 0)*_fp,
|
||||
(_vec select 1)*_fp,
|
||||
(_vec select 2)*_fp
|
||||
];
|
||||
_vel = [
|
||||
(_vec select 0)*_fp,
|
||||
(_vec select 1)*_fp,
|
||||
(_vec select 2)*_fp
|
||||
];
|
||||
|
||||
_fragType = round (random ((count _fragTypes)-1));
|
||||
_fragObj = (_fragTypes select _fragType) createVehicleLocal [0,0,10000];
|
||||
_fragObj setPosASL _lastPos;
|
||||
_fragObj setVectorDir _vec;
|
||||
_fragObj setVelocity _vel;
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
GVAR(TOTALFRAGS) = GVAR(TOTALFRAGS) + 1;
|
||||
GVAR(traceFrags) = true;
|
||||
#endif
|
||||
if(GVAR(traceFrags)) then {
|
||||
[player, _fragObj, [1,0.5,0,1]] call FUNC(addTrack);
|
||||
};
|
||||
_fragCount = _fragCount + 1;
|
||||
};
|
||||
};
|
||||
_fragType = round (random ((count _fragTypes)-1));
|
||||
_fragObj = (_fragTypes select _fragType) createVehicleLocal [0,0,10000];
|
||||
_fragObj setPosASL _lastPos;
|
||||
_fragObj setVectorDir _vec;
|
||||
_fragObj setVelocity _vel;
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
GVAR(TOTALFRAGS) = GVAR(TOTALFRAGS) + 1;
|
||||
GVAR(traceFrags) = true;
|
||||
#endif
|
||||
if(GVAR(traceFrags)) then {
|
||||
[player, _fragObj, [1,0.5,0,1]] call FUNC(addTrack);
|
||||
};
|
||||
_fragCount = _fragCount + 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
// #ifdef DEBUG_MODE_FULL
|
||||
// player sideChat format["total frags: %1", GVAR(TOTALFRAGS)];
|
||||
// player sideChat format["tracks: %1", (count GVAR(trackedObjects))];
|
||||
// player sideChat format["total frags: %1", GVAR(TOTALFRAGS)];
|
||||
// player sideChat format["tracks: %1", (count GVAR(trackedObjects))];
|
||||
// #endif
|
||||
// _endTime = diag_tickTime;
|
||||
|
@ -3,12 +3,12 @@
|
||||
private ["_ret"];
|
||||
_ret = true;
|
||||
if(IS_ARRAY((_this select 0))) then {
|
||||
_ret = false;
|
||||
_ret = false;
|
||||
} else {
|
||||
if((_this select 0) in GVAR(trackedObjects)) then {
|
||||
GVAR(trackedObjects) = GVAR(trackedObjects) - [(_this select 0)];
|
||||
} else {
|
||||
_ret = false;
|
||||
};
|
||||
if((_this select 0) in GVAR(trackedObjects)) then {
|
||||
GVAR(trackedObjects) = GVAR(trackedObjects) - [(_this select 0)];
|
||||
} else {
|
||||
_ret = false;
|
||||
};
|
||||
};
|
||||
_ret
|
@ -3,27 +3,27 @@
|
||||
private ["_initialData", "_currentCount", "_hpData", "_round", "_hpRound"];
|
||||
//player sideChat format["f: %1 c: %2", (_this select 0), (count GVAR(spallHPData))];
|
||||
if((_this select 0) <= (count GVAR(spallHPData))) then {
|
||||
_initialData = GVAR(spallHPData) select (_this select 0);
|
||||
if(!isNil "_initialData") then {
|
||||
_hpRound = ((_this select 1) select 0) select 2;
|
||||
_round = _initialData select 3;
|
||||
_hpDirect = ((_this select 1) select 0) select 10;
|
||||
if(_hpDirect && {_round == _hpRound}) then {
|
||||
_initialData = GVAR(spallHPData) select (_this select 0);
|
||||
if(!isNil "_initialData") then {
|
||||
_hpRound = ((_this select 1) select 0) select 2;
|
||||
_round = _initialData select 3;
|
||||
_hpDirect = ((_this select 1) select 0) select 10;
|
||||
if(_hpDirect && {_round == _hpRound}) then {
|
||||
|
||||
{
|
||||
_hpData = _x;
|
||||
_round = _initialData select 3;
|
||||
// diag_log text format["HPDUMP-------------------------------------"];
|
||||
// {
|
||||
// _hp = _x;
|
||||
// diag_log text format["%1 --", _forEachIndex];
|
||||
// {
|
||||
// diag_log text format["%1: %2", _forEachIndex, _x];
|
||||
// } forEach _hp;
|
||||
// } forEach (_this select 1);
|
||||
[DFUNC(doSpall), 0, [_this, _forEachIndex]] call cba_fnc_addPerFrameHandler;
|
||||
// player sideChat "WEEE";
|
||||
} forEach (_this select 1);
|
||||
};
|
||||
};
|
||||
{
|
||||
_hpData = _x;
|
||||
_round = _initialData select 3;
|
||||
// diag_log text format["HPDUMP-------------------------------------"];
|
||||
// {
|
||||
// _hp = _x;
|
||||
// diag_log text format["%1 --", _forEachIndex];
|
||||
// {
|
||||
// diag_log text format["%1: %2", _forEachIndex, _x];
|
||||
// } forEach _hp;
|
||||
// } forEach (_this select 1);
|
||||
[DFUNC(doSpall), 0, [_this, _forEachIndex]] call cba_fnc_addPerFrameHandler;
|
||||
// player sideChat "WEEE";
|
||||
} forEach (_this select 1);
|
||||
};
|
||||
};
|
||||
};
|
@ -12,29 +12,29 @@ _curPos = getPosASL _round;
|
||||
_velocity = velocity _round;
|
||||
|
||||
_velocityStep = [
|
||||
(_velocity select 0)*_delta,
|
||||
(_velocity select 1)*_delta,
|
||||
(_velocity select 2)*_delta
|
||||
];
|
||||
(_velocity select 0)*_delta,
|
||||
(_velocity select 1)*_delta,
|
||||
(_velocity select 2)*_delta
|
||||
];
|
||||
_forwardPos = [
|
||||
(_curPos select 0) + (_velocityStep select 0),
|
||||
(_curPos select 1) + (_velocityStep select 1),
|
||||
(_curPos select 2) + (_velocityStep select 2)
|
||||
];
|
||||
(_curPos select 0) + (_velocityStep select 0),
|
||||
(_curPos select 1) + (_velocityStep select 1),
|
||||
(_curPos select 2) + (_velocityStep select 2)
|
||||
];
|
||||
|
||||
_intersectsWith = lineIntersectsWith [_curPos, _forwardPos];
|
||||
|
||||
if(count _intersectsWith > 0) then {
|
||||
// player sideChat format["inter: %1", _intersectsWith];
|
||||
{
|
||||
if(!(_x in _foundObjects)) then {
|
||||
// diag_log text format["Adding HP: %1", _x];
|
||||
_index = (count GVAR(spallHPData));
|
||||
_hpId = _x addEventHandler ["hitPart", format["[%1, _this] call " + QUOTE(FUNC(spallHP)), _index]];
|
||||
_foundObjects set[(count _foundObjects), _x];
|
||||
_foundObjectHPIds set[(count _foundObjectHPIds), _hpId];
|
||||
_data = [_hpId, _x, typeOf _round, _round, _curPos, _velocity, 0, _foundObjects, _foundObjectHPIds];
|
||||
GVAR(spallHPData) set[_index, _data];
|
||||
};
|
||||
} forEach _intersectsWith;
|
||||
// player sideChat format["inter: %1", _intersectsWith];
|
||||
{
|
||||
if(!(_x in _foundObjects)) then {
|
||||
// diag_log text format["Adding HP: %1", _x];
|
||||
_index = (count GVAR(spallHPData));
|
||||
_hpId = _x addEventHandler ["hitPart", format["[%1, _this] call " + QUOTE(FUNC(spallHP)), _index]];
|
||||
_foundObjects set[(count _foundObjects), _x];
|
||||
_foundObjectHPIds set[(count _foundObjectHPIds), _hpId];
|
||||
_data = [_hpId, _x, typeOf _round, _round, _curPos, _velocity, 0, _foundObjects, _foundObjectHPIds];
|
||||
GVAR(spallHPData) set[_index, _data];
|
||||
};
|
||||
} forEach _intersectsWith;
|
||||
};
|
@ -1,5 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
if(!GVAR(tracesStarted)) then {
|
||||
GVAR(tracesStarted) = true;
|
||||
GVAR(traceID) = [FUNC(drawTraces), 0, []] call cba_fnc_addPerFrameHandler;
|
||||
GVAR(tracesStarted) = true;
|
||||
GVAR(traceID) = [FUNC(drawTraces), 0, []] call cba_fnc_addPerFrameHandler;
|
||||
};
|
@ -1,5 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
if(GVAR(tracesStarted)) then {
|
||||
GVAR(tracesStarted) = false;
|
||||
[GVAR(traceID)] call cba_fnc_removePerFrameHandler;
|
||||
GVAR(tracesStarted) = false;
|
||||
[GVAR(traceID)] call cba_fnc_removePerFrameHandler;
|
||||
};
|
@ -12,41 +12,41 @@ _spallTrack = _params select 7;
|
||||
_foundObjectHPIds = _params select 8;
|
||||
|
||||
if (!alive _round) then {
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
if(_time != time && {_round in GVAR(trackedObjects)} && {!(_round in GVAR(blackList))}) then {
|
||||
GVAR(trackedObjects) = GVAR(trackedObjects) - [_round];
|
||||
_skip = getNumber (configFile >> "CfgAmmo" >> _type >> "ACE_FRAG_SKIP");
|
||||
if(_skip == 0) then {
|
||||
_explosive = getNumber (configFile >> "CfgAmmo" >> _type >> "explosive");
|
||||
_indirectRange = getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange");
|
||||
_force = getNumber (configFile >> "CfgAmmo" >> _type >> "ACE_FRAG_FORCE");
|
||||
_fragPower = getNumber(configFile >> "CfgAmmo" >> _type >> "indirecthit")*(sqrt(_indirectRange));
|
||||
if((_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}) || {_force == 1} ) then {
|
||||
[QGVAR(frag_eh), _params] call ace_common_fnc_serverEvent;
|
||||
GVAR(trackedObjects) = GVAR(trackedObjects) - [_round];
|
||||
};
|
||||
};
|
||||
};
|
||||
if(_doSpall) then {
|
||||
GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) - 1;
|
||||
// diag_log text format["F: %1", _foundObjectHPIds];
|
||||
{
|
||||
if(!isNil "_x") then {
|
||||
_x removeEventHandler ["hitPart", _foundObjectHPIds select _forEachIndex];
|
||||
};
|
||||
} forEach _spallTrack;
|
||||
};
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
if(_time != time && {_round in GVAR(trackedObjects)} && {!(_round in GVAR(blackList))}) then {
|
||||
GVAR(trackedObjects) = GVAR(trackedObjects) - [_round];
|
||||
_skip = getNumber (configFile >> "CfgAmmo" >> _type >> "ACE_FRAG_SKIP");
|
||||
if(_skip == 0) then {
|
||||
_explosive = getNumber (configFile >> "CfgAmmo" >> _type >> "explosive");
|
||||
_indirectRange = getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange");
|
||||
_force = getNumber (configFile >> "CfgAmmo" >> _type >> "ACE_FRAG_FORCE");
|
||||
_fragPower = getNumber(configFile >> "CfgAmmo" >> _type >> "indirecthit")*(sqrt(_indirectRange));
|
||||
if((_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}) || {_force == 1} ) then {
|
||||
[QGVAR(frag_eh), _params] call ace_common_fnc_serverEvent;
|
||||
GVAR(trackedObjects) = GVAR(trackedObjects) - [_round];
|
||||
};
|
||||
};
|
||||
};
|
||||
if(_doSpall) then {
|
||||
GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) - 1;
|
||||
// diag_log text format["F: %1", _foundObjectHPIds];
|
||||
{
|
||||
if(!isNil "_x") then {
|
||||
_x removeEventHandler ["hitPart", _foundObjectHPIds select _forEachIndex];
|
||||
};
|
||||
} forEach _spallTrack;
|
||||
};
|
||||
} else {
|
||||
if(!(_round in GVAR(trackedObjects)) || {_round in GVAR(blackList)}) then {
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
if(_round in GVAR(blackList)) then {
|
||||
GVAR(blackList) = GVAR(blackList) - [_round];
|
||||
};
|
||||
};
|
||||
if(!(_round in GVAR(trackedObjects)) || {_round in GVAR(blackList)}) then {
|
||||
[_this select 1] call cba_fnc_removePerFrameHandler;
|
||||
if(_round in GVAR(blackList)) then {
|
||||
GVAR(blackList) = GVAR(blackList) - [_round];
|
||||
};
|
||||
};
|
||||
|
||||
_params set[1, (getPosASL _round)];
|
||||
_params set[2, (velocity _round)];
|
||||
if(_doSpall) then {
|
||||
[_round, 1, _spallTrack, _foundObjectHPIds] call FUNC(spallTrack);
|
||||
};
|
||||
_params set[1, (getPosASL _round)];
|
||||
_params set[2, (velocity _round)];
|
||||
if(_doSpall) then {
|
||||
[_round, 1, _spallTrack, _foundObjectHPIds] call FUNC(spallTrack);
|
||||
};
|
||||
};
|
||||
|
@ -4,11 +4,11 @@ _tracerObj = _params select 0;
|
||||
_index = _params select 1;
|
||||
|
||||
if(alive _tracerObj && (count GVAR(traces)) > 0) then {
|
||||
_data = GVAR(traces) select _index;
|
||||
_positions = _data select 4;
|
||||
_objVel = velocity _tracerObj;
|
||||
_objTVel = sqrt((_objVel select 0)^2 + (_objVel select 1)^2 + (_objVel select 2)^2);
|
||||
_positions set[(count _positions), [(getPos _tracerObj), _objTVel]];
|
||||
_data = GVAR(traces) select _index;
|
||||
_positions = _data select 4;
|
||||
_objVel = velocity _tracerObj;
|
||||
_objTVel = sqrt((_objVel select 0)^2 + (_objVel select 1)^2 + (_objVel select 2)^2);
|
||||
_positions set[(count _positions), [(getPos _tracerObj), _objTVel]];
|
||||
} else {
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
[(_this select 1)] call cba_fnc_removePerFrameHandler;
|
||||
};
|
@ -4,13 +4,13 @@
|
||||
//#define DEBUG_ENABLED_FRAG
|
||||
|
||||
#ifdef DEBUG_ENABLED_FRAG
|
||||
#define DEBUG_MODE_FULL
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_FRAG
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_FRAG
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_FRAG
|
||||
#endif
|
||||
|
||||
#include "\z\ace\Addons\main\script_macros.hpp"
|
||||
|
||||
#define ACE_TRACE_DRAW_INC 1
|
||||
#define ACE_TRACE_DRAW_INC 1
|
@ -2,11 +2,11 @@
|
||||
#include "\z\ace\Addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_GFORCES
|
||||
#define DEBUG_MODE_FULL
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_GFORCES
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_GFORCES
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_GFORCES
|
||||
#endif
|
||||
|
||||
#include "\z\ace\Addons\main\script_macros.hpp"
|
||||
|
@ -1,42 +1,42 @@
|
||||
class RscTitles{
|
||||
#include "define.hpp"
|
||||
#include "define.hpp"
|
||||
|
||||
class RscACE_Goggles_BaseTitle{
|
||||
idd = -1;
|
||||
onLoad = "uiNamespace setVariable ['ACE_Goggles_Display', _this select 0]";
|
||||
onUnload = "uiNamespace setVariable ['ACE_Goggles_Display', displayNull]";
|
||||
fadeIn=0.5;
|
||||
fadeOut=0.5;
|
||||
movingEnable = false;
|
||||
duration = 10e10;
|
||||
name = "RscACE_Goggles_BaseTitle";
|
||||
class controls;
|
||||
};
|
||||
class RscACE_Goggles_BaseTitle{
|
||||
idd = -1;
|
||||
onLoad = "uiNamespace setVariable ['ACE_Goggles_Display', _this select 0]";
|
||||
onUnload = "uiNamespace setVariable ['ACE_Goggles_Display', displayNull]";
|
||||
fadeIn=0.5;
|
||||
fadeOut=0.5;
|
||||
movingEnable = false;
|
||||
duration = 10e10;
|
||||
name = "RscACE_Goggles_BaseTitle";
|
||||
class controls;
|
||||
};
|
||||
|
||||
class RscACE_Goggles:RscACE_Goggles_BaseTitle{
|
||||
idd = 1044;
|
||||
name = "RscACE_Goggles";
|
||||
class controls{
|
||||
class gogglesImage: RscPicture{
|
||||
idc = 10650;
|
||||
};
|
||||
};
|
||||
};
|
||||
class RscACE_Goggles:RscACE_Goggles_BaseTitle{
|
||||
idd = 1044;
|
||||
name = "RscACE_Goggles";
|
||||
class controls{
|
||||
class gogglesImage: RscPicture{
|
||||
idc = 10650;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class RscACE_GogglesEffects:RscACE_Goggles_BaseTitle{
|
||||
idd = 1045;
|
||||
onLoad = "uiNamespace setVariable ['ACE_Goggles_DisplayEffects', _this select 0]";
|
||||
onUnload = "uiNamespace setVariable ['ACE_Goggles_DisplayEffects', displayNull]";
|
||||
name = "RscACE_GogglesEffects";
|
||||
fadeIn=0;
|
||||
fadeOut=0.5;
|
||||
class controls{
|
||||
class dirtImage: RscPicture {
|
||||
idc = 10660;
|
||||
};
|
||||
class dustImage: RscPicture {
|
||||
idc = 10662;
|
||||
};
|
||||
};
|
||||
};
|
||||
class RscACE_GogglesEffects:RscACE_Goggles_BaseTitle{
|
||||
idd = 1045;
|
||||
onLoad = "uiNamespace setVariable ['ACE_Goggles_DisplayEffects', _this select 0]";
|
||||
onUnload = "uiNamespace setVariable ['ACE_Goggles_DisplayEffects', displayNull]";
|
||||
name = "RscACE_GogglesEffects";
|
||||
fadeIn=0;
|
||||
fadeOut=0.5;
|
||||
class controls{
|
||||
class dirtImage: RscPicture {
|
||||
idc = 10660;
|
||||
};
|
||||
class dustImage: RscPicture {
|
||||
idc = 10662;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -3,279 +3,279 @@
|
||||
#define COLOUR 8.0
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author[] = {"Garth 'L-H' de Wet"};
|
||||
authorUrl = "http://garth.snakebiteink.co.za/";
|
||||
VERSION_CONFIG;
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author[] = {"Garth 'L-H' de Wet"};
|
||||
authorUrl = "http://garth.snakebiteink.co.za/";
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
|
||||
#define COMBAT_GOGGLES ACE_Overlay = QUOTE(PATHTOF(textures\HUD\CombatGoggles.paa)); \
|
||||
ACE_OverlayCracked = QUOTE(PATHTOF(textures\HUD\CombatGogglesCracked.paa)); \
|
||||
ACE_Resistance = 2; \
|
||||
ACE_Protection = 1;
|
||||
#define COMBAT_GOGGLES ACE_Overlay = QUOTE(PATHTOF(textures\HUD\CombatGoggles.paa)); \
|
||||
ACE_OverlayCracked = QUOTE(PATHTOF(textures\HUD\CombatGogglesCracked.paa)); \
|
||||
ACE_Resistance = 2; \
|
||||
ACE_Protection = 1;
|
||||
|
||||
class CfgGlasses {
|
||||
class None {
|
||||
ACE_Color[] = {0,0,0};
|
||||
ACE_TintAmount=0;
|
||||
ACE_Overlay = "";
|
||||
ACE_OverlayDirt = "A3\Ui_f\data\igui\rsctitles\HealthTextures\dust_upper_ca.paa";
|
||||
ACE_OverlayCracked = QUOTE(PATHTOF(textures\HUD\Cracked.paa));
|
||||
ACE_Resistance = 0;
|
||||
ACE_Protection = 0;
|
||||
ACE_DustPath = QUOTE(PATHTOF(textures\fx\dust\%1.paa));
|
||||
};
|
||||
class None {
|
||||
ACE_Color[] = {0,0,0};
|
||||
ACE_TintAmount=0;
|
||||
ACE_Overlay = "";
|
||||
ACE_OverlayDirt = "A3\Ui_f\data\igui\rsctitles\HealthTextures\dust_upper_ca.paa";
|
||||
ACE_OverlayCracked = QUOTE(PATHTOF(textures\HUD\Cracked.paa));
|
||||
ACE_Resistance = 0;
|
||||
ACE_Protection = 0;
|
||||
ACE_DustPath = QUOTE(PATHTOF(textures\fx\dust\%1.paa));
|
||||
};
|
||||
|
||||
class G_Combat:None {
|
||||
COMBAT_GOGGLES
|
||||
};
|
||||
class G_Combat:None {
|
||||
COMBAT_GOGGLES
|
||||
};
|
||||
|
||||
class G_Diving {
|
||||
ACE_Overlay = QUOTE(PATHTOF(textures\HUD\DivingGoggles.paa));
|
||||
ACE_OverlayCracked = QUOTE(PATHTOF(textures\HUD\DivingGogglesCracked.paa));
|
||||
ACE_Resistance = 2;
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
class G_Diving {
|
||||
ACE_Overlay = QUOTE(PATHTOF(textures\HUD\DivingGoggles.paa));
|
||||
ACE_OverlayCracked = QUOTE(PATHTOF(textures\HUD\DivingGogglesCracked.paa));
|
||||
ACE_Resistance = 2;
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
|
||||
class G_Lowprofile:None {
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Resistance = 2;
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
class G_Lowprofile:None {
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Resistance = 2;
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
|
||||
class G_Shades_Black:None {
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Shades_Black:None {
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Shades_Blue:None{
|
||||
ACE_Color[] = {0,0,1};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Shades_Blue:None{
|
||||
ACE_Color[] = {0,0,1};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Shades_Green:None{
|
||||
ACE_Color[] = {0,1,0};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Shades_Green:None{
|
||||
ACE_Color[] = {0,1,0};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Shades_Red:None{
|
||||
ACE_Color[] = {1,0,0};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Shades_Red:None{
|
||||
ACE_Color[] = {1,0,0};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Spectacles:None{
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Spectacles:None{
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Spectacles_Tinted:None{
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Spectacles_Tinted:None{
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Sport_Blackred:None{
|
||||
ACE_Color[] = {1,0,0};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Sport_Blackred:None{
|
||||
ACE_Color[] = {1,0,0};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Sport_BlackWhite:None{
|
||||
ACE_Color[] = {0,0,1};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Sport_BlackWhite:None{
|
||||
ACE_Color[] = {0,0,1};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Sport_Blackyellow:None{
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Sport_Blackyellow:None{
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Sport_Checkered:None{
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Sport_Checkered:None{
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Sport_Greenblack:None{
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Sport_Greenblack:None{
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Sport_Red:None{
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Color[] = {0,0,0};
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Sport_Red:None{
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Color[] = {0,0,0};
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Squares:None{
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Squares:None{
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Squares_Tinted:None{
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Squares_Tinted:None{
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Tactical_Black:None{
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Color[] = {0,0,-1.5};
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Tactical_Black:None{
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Color[] = {0,0,-1.5};
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Tactical_Clear:None{
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Color[] = {0,0,-1};
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Tactical_Clear:None{
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Color[] = {0,0,-1};
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Aviator:None{
|
||||
ACE_Color[] = {0,0,-1};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Aviator:None{
|
||||
ACE_Color[] = {0,0,-1};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Lady_Blue:None{
|
||||
ACE_Color[] = {0,0,1};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Lady_Blue:None{
|
||||
ACE_Color[] = {0,0,1};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Lady_Red:None{
|
||||
ACE_Color[] = {1,0,0};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Lady_Red:None{
|
||||
ACE_Color[] = {1,0,0};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Lady_Dark:None{
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Lady_Dark:None{
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class G_Lady_Mirror:None{
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
class G_Lady_Mirror:None{
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
};
|
||||
|
||||
class AV_ESS_blk:None{
|
||||
COMBAT_GOGGLES
|
||||
};
|
||||
class AV_ESS_blk:None{
|
||||
COMBAT_GOGGLES
|
||||
};
|
||||
|
||||
class G_Balaclava_blk;
|
||||
class G_Balaclava_blk;
|
||||
|
||||
class G_Balaclava_combat:G_Balaclava_blk {
|
||||
COMBAT_GOGGLES
|
||||
};
|
||||
class G_Balaclava_combat:G_Balaclava_blk {
|
||||
COMBAT_GOGGLES
|
||||
};
|
||||
|
||||
class G_Balaclava_lowprofile:G_Balaclava_blk {
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Resistance = 2;
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
class G_Balaclava_lowprofile:G_Balaclava_blk {
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Resistance = 2;
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
|
||||
class G_Bandanna_blk;
|
||||
class G_Bandanna_shades:G_Bandanna_blk {
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Resistance = 1;
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
class G_Bandanna_sport:G_Bandanna_blk {
|
||||
ACE_Color[] = {1,0,0};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
class G_Bandanna_aviator:G_Bandanna_blk {
|
||||
ACE_Color[] = {0,0,-1};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
class G_Bandanna_blk;
|
||||
class G_Bandanna_shades:G_Bandanna_blk {
|
||||
ACE_TintAmount=COLOUR*2;
|
||||
ACE_Resistance = 1;
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
class G_Bandanna_sport:G_Bandanna_blk {
|
||||
ACE_Color[] = {1,0,0};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
class G_Bandanna_aviator:G_Bandanna_blk {
|
||||
ACE_Color[] = {0,0,-1};
|
||||
ACE_TintAmount=COLOUR;
|
||||
ACE_Resistance = 1;
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
};
|
||||
|
||||
#include "RscTitles.hpp"
|
||||
|
||||
class CfgMovesBasic {
|
||||
class ManActions {
|
||||
GestureWipeFace[] = {"GestureWipeFace", "gesture"};
|
||||
};
|
||||
class ManActions {
|
||||
GestureWipeFace[] = {"GestureWipeFace", "gesture"};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgGesturesMale {
|
||||
class States {
|
||||
class GestureFreezeStand;
|
||||
class GestureWipeFace: GestureFreezeStand {
|
||||
file = QUOTE(PATHTOF(anim\WipeGlasses.rtm));
|
||||
canPullTrigger = 0;
|
||||
};
|
||||
};
|
||||
class States {
|
||||
class GestureFreezeStand;
|
||||
class GestureWipeFace: GestureFreezeStand {
|
||||
file = QUOTE(PATHTOF(anim\WipeGlasses.rtm));
|
||||
canPullTrigger = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgWeapons {
|
||||
class H_HelmetB;
|
||||
class H_HelmetB;
|
||||
|
||||
class H_CrewHelmetHeli_B:H_HelmetB {
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
class H_PilotHelmetHeli_B:H_HelmetB {
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
class H_PilotHelmetFighter_B:H_HelmetB {
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
class H_CrewHelmetHeli_B:H_HelmetB {
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
class H_PilotHelmetHeli_B:H_HelmetB {
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
class H_PilotHelmetFighter_B:H_HelmetB {
|
||||
ACE_Protection = 1;
|
||||
};
|
||||
};
|
||||
|
||||
class RifleAssaultCloud {
|
||||
ACE_Goggles_BulletCount = 4;
|
||||
ACE_Goggles_BulletCount = 4;
|
||||
};
|
||||
class MachineGunCloud {
|
||||
ACE_Goggles_BulletCount = 3;
|
||||
ACE_Goggles_BulletCount = 3;
|
||||
};
|
||||
class SniperCloud {
|
||||
ACE_Goggles_BulletCount = 1;
|
||||
ACE_Goggles_BulletCount = 1;
|
||||
};
|
||||
|
||||
class ACE_Settings {
|
||||
class GVAR(showInThirdPerson) {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
isClientSetable = 1;
|
||||
displayName = "$STR_ACE_Goggles_ShowInThirdPerson";
|
||||
};
|
||||
class GVAR(showInThirdPerson) {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
isClientSetable = 1;
|
||||
displayName = "$STR_ACE_Goggles_ShowInThirdPerson";
|
||||
};
|
||||
};
|
||||
|
||||
class CfgCloudlets {
|
||||
class Default;
|
||||
class ACERainEffect:Default {
|
||||
interval = 0.001;
|
||||
particleShape = "\A3\data_f\ParticleEffects\Universal\Refract";
|
||||
particleFSNtieth = 1;
|
||||
particleFSIndex = 0;
|
||||
particleFSFrameCount = 1;
|
||||
particleFSLoop = 1;
|
||||
class Default;
|
||||
class ACERainEffect:Default {
|
||||
interval = 0.001;
|
||||
particleShape = "\A3\data_f\ParticleEffects\Universal\Refract";
|
||||
particleFSNtieth = 1;
|
||||
particleFSIndex = 0;
|
||||
particleFSFrameCount = 1;
|
||||
particleFSLoop = 1;
|
||||
|
||||
particleType = "Billboard";
|
||||
lifeTime = 0.5;
|
||||
rotationVelocity = 1;
|
||||
weight = 100;
|
||||
volume = 0.000;
|
||||
rubbing = 1.7;
|
||||
size[] = {0.1};
|
||||
color[] = {{1,1,1,1}};
|
||||
animationSpeed[] = {0,1};
|
||||
randomDirectionPeriod = 0.2;
|
||||
randomDirectionIntensity = 1.2;
|
||||
positionVar[] = {2, 2, 2.5};
|
||||
sizeVar = 0.01;
|
||||
colorVar[] = {0, 0, 0, 0.1};
|
||||
destroyOnWaterSurface = 1;
|
||||
};
|
||||
particleType = "Billboard";
|
||||
lifeTime = 0.5;
|
||||
rotationVelocity = 1;
|
||||
weight = 100;
|
||||
volume = 0.000;
|
||||
rubbing = 1.7;
|
||||
size[] = {0.1};
|
||||
color[] = {{1,1,1,1}};
|
||||
animationSpeed[] = {0,1};
|
||||
randomDirectionPeriod = 0.2;
|
||||
randomDirectionIntensity = 1.2;
|
||||
positionVar[] = {2, 2, 2.5};
|
||||
sizeVar = 0.01;
|
||||
colorVar[] = {0, 0, 0, 0.1};
|
||||
destroyOnWaterSurface = 1;
|
||||
};
|
||||
};
|
||||
|
@ -22,12 +22,12 @@ _effects set [DIRT, true];
|
||||
SETGLASSES(ace_player,_effects);
|
||||
|
||||
if ([ace_player] call FUNC(isGogglesVisible)) then{
|
||||
_dirtImage = getText(ConfigFile >> "CfgGlasses" >> (goggles ace_player) >> "ACE_OverlayDirt");
|
||||
if (_dirtImage != "") then {
|
||||
100 cutRsc["RscACE_GogglesEffects", "PLAIN",0.1, false];
|
||||
_dirtImage = getText(ConfigFile >> "CfgGlasses" >> (goggles ace_player) >> "ACE_OverlayDirt");
|
||||
if (_dirtImage != "") then {
|
||||
100 cutRsc["RscACE_GogglesEffects", "PLAIN",0.1, false];
|
||||
|
||||
(GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10660) ctrlSetText _dirtImage;
|
||||
};
|
||||
(GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10660) ctrlSetText _dirtImage;
|
||||
};
|
||||
};
|
||||
|
||||
true
|
||||
|
@ -16,10 +16,10 @@
|
||||
#include "script_component.hpp"
|
||||
if (call FUNC(ExternalCamera)) exitWith {};
|
||||
if ([ace_player] call FUNC(isGogglesVisible)) exitWith {
|
||||
100 cutRsc["RscACE_GogglesEffects", "PLAIN",2,false];
|
||||
(uiNamespace getVariable ["ACE_Goggles_DisplayEffects", displayNull] displayCtrl 10662) ctrlSetText format[getText(ConfigFile >> "CfgGlasses" >> GVAR(Current) >> "ACE_DustPath"), GETDUSTT(DAMOUNT)+1];
|
||||
SETDUST(DAMOUNT,CLAMP(GETDUSTT(DAMOUNT)+1,0,1));
|
||||
SETDUST(DBULLETS,0);
|
||||
100 cutRsc["RscACE_GogglesEffects", "PLAIN",2,false];
|
||||
(uiNamespace getVariable ["ACE_Goggles_DisplayEffects", displayNull] displayCtrl 10662) ctrlSetText format[getText(ConfigFile >> "CfgGlasses" >> GVAR(Current) >> "ACE_DustPath"), GETDUSTT(DAMOUNT)+1];
|
||||
SETDUST(DAMOUNT,CLAMP(GETDUSTT(DAMOUNT)+1,0,1));
|
||||
SETDUST(DBULLETS,0);
|
||||
};
|
||||
|
||||
if (GETVAR(ace_player,ACE_EyesDamaged,false)) exitWith {SETDUST(DACTIVE,false);SETDUST(DBULLETS,0);SETDUST(DAMOUNT,0);};
|
||||
@ -34,26 +34,26 @@ GVAR(PostProcessEyes) ppEffectEnable true;
|
||||
SETDUST(DBULLETS,0);
|
||||
|
||||
if (GVAR(DustHandler) != -1) then { // should be fixed in dev CBA
|
||||
[GVAR(DustHandler)] call CALLSTACK(cba_fnc_removePerFrameHandler);
|
||||
GVAR(DustHandler) = -1;
|
||||
[GVAR(DustHandler)] call CALLSTACK(cba_fnc_removePerFrameHandler);
|
||||
GVAR(DustHandler) = -1;
|
||||
};
|
||||
GVAR(DustHandler) = [{
|
||||
if (diag_tickTime >= GETDUSTT(DTIME) + 3) then {
|
||||
SETDUST(DAMOUNT,CLAMP(GETDUSTT(DAMOUNT)-1,0,2));
|
||||
private "_amount";
|
||||
_amount = 1 - (GETDUSTT(DAMOUNT) * 0.125);
|
||||
if !(ace_player getVariable ["ACE_EyesDamaged", false]) then {
|
||||
GVAR(PostProcessEyes) ppEffectAdjust[1, 1, 0, [0,0,0,0], [_amount,_amount,_amount,_amount],[1,1,1,0]];
|
||||
GVAR(PostProcessEyes) ppEffectCommit 0.5;
|
||||
};
|
||||
if (GETDUSTT(DAMOUNT) <= 0) then {
|
||||
GVAR(PostProcessEyes) ppEffectAdjust[1, 1, 0, [0,0,0,0], [1,1,1,1],[1,1,1,0]];
|
||||
GVAR(PostProcessEyes) ppEffectCommit 2;
|
||||
[{GVAR(PostProcessEyes) ppEffectEnable false;}, [], 2, 0.5] call EFUNC(common,waitAndExecute);
|
||||
SETDUST(DACTIVE,false);
|
||||
SETDUST(DBULLETS,0);
|
||||
[GVAR(DustHandler)] call CALLSTACK(cba_fnc_removePerFrameHandler);
|
||||
GVAR(DustHandler) = -1;
|
||||
};
|
||||
};
|
||||
if (diag_tickTime >= GETDUSTT(DTIME) + 3) then {
|
||||
SETDUST(DAMOUNT,CLAMP(GETDUSTT(DAMOUNT)-1,0,2));
|
||||
private "_amount";
|
||||
_amount = 1 - (GETDUSTT(DAMOUNT) * 0.125);
|
||||
if !(ace_player getVariable ["ACE_EyesDamaged", false]) then {
|
||||
GVAR(PostProcessEyes) ppEffectAdjust[1, 1, 0, [0,0,0,0], [_amount,_amount,_amount,_amount],[1,1,1,0]];
|
||||
GVAR(PostProcessEyes) ppEffectCommit 0.5;
|
||||
};
|
||||
if (GETDUSTT(DAMOUNT) <= 0) then {
|
||||
GVAR(PostProcessEyes) ppEffectAdjust[1, 1, 0, [0,0,0,0], [1,1,1,1],[1,1,1,0]];
|
||||
GVAR(PostProcessEyes) ppEffectCommit 2;
|
||||
[{GVAR(PostProcessEyes) ppEffectEnable false;}, [], 2, 0.5] call EFUNC(common,waitAndExecute);
|
||||
SETDUST(DACTIVE,false);
|
||||
SETDUST(DBULLETS,0);
|
||||
[GVAR(DustHandler)] call CALLSTACK(cba_fnc_removePerFrameHandler);
|
||||
GVAR(DustHandler) = -1;
|
||||
};
|
||||
};
|
||||
},0,[]] call CALLSTACK(cba_fnc_addPerFrameHandler);
|
||||
|
@ -26,29 +26,29 @@ call FUNC(removeGlassesEffect);
|
||||
GVAR(EffectsActive) = true;
|
||||
|
||||
if (_postProcessTintAmount != 0 && {GVAR(UsePP)}) then {
|
||||
_postProcessColour set [3, _postProcessTintAmount/100];
|
||||
GVAR(PostProcess) ppEffectAdjust[0.9, 1.1, 0.004, _postProcessColour, [0,0,0,1],[0,0,0,0]];
|
||||
GVAR(PostProcess) ppEffectCommit 0;
|
||||
GVAR(PostProcess) ppEffectEnable true;
|
||||
_postProcessColour set [3, _postProcessTintAmount/250];
|
||||
GVAR(PostProcess) ppEffectAdjust[0.9, 1.1, 0.004, _postProcessColour, [0,0,0,1],[0,0,0,0]];
|
||||
GVAR(PostProcess) ppEffectCommit 30;
|
||||
_postProcessColour set [3, _postProcessTintAmount/100];
|
||||
GVAR(PostProcess) ppEffectAdjust[0.9, 1.1, 0.004, _postProcessColour, [0,0,0,1],[0,0,0,0]];
|
||||
GVAR(PostProcess) ppEffectCommit 0;
|
||||
GVAR(PostProcess) ppEffectEnable true;
|
||||
_postProcessColour set [3, _postProcessTintAmount/250];
|
||||
GVAR(PostProcess) ppEffectAdjust[0.9, 1.1, 0.004, _postProcessColour, [0,0,0,1],[0,0,0,0]];
|
||||
GVAR(PostProcess) ppEffectCommit 30;
|
||||
};
|
||||
|
||||
_glassImagePath = getText(configFile >> "CfgGlasses" >> _glassesClassname >> "ACE_Overlay");
|
||||
if GETBROKEN then {
|
||||
_glassImagePath = getText(configFile >> "CfgGlasses" >> _glassesClassname >> "ACE_OverlayCracked");
|
||||
_glassImagePath = getText(configFile >> "CfgGlasses" >> _glassesClassname >> "ACE_OverlayCracked");
|
||||
};
|
||||
if (_glassImagePath != "") then {
|
||||
150 cutRsc["RscACE_Goggles", "PLAIN",1, false];
|
||||
(GLASSDISPLAY displayCtrl 10650) ctrlSetText _glassImagePath;
|
||||
150 cutRsc["RscACE_Goggles", "PLAIN",1, false];
|
||||
(GLASSDISPLAY displayCtrl 10650) ctrlSetText _glassImagePath;
|
||||
};
|
||||
|
||||
if GETDIRT then {
|
||||
call FUNC(applyDirtEffect);
|
||||
call FUNC(applyDirtEffect);
|
||||
};
|
||||
|
||||
if GETDUSTT(DACTIVE) then {
|
||||
SETDUST(DAMOUNT,CLAMP(GETDUSTT(DAMOUNT)-1,0,2));
|
||||
call FUNC(applyDust);
|
||||
SETDUST(DAMOUNT,CLAMP(GETDUSTT(DAMOUNT)-1,0,2));
|
||||
call FUNC(applyDust);
|
||||
};
|
||||
|
@ -17,30 +17,30 @@
|
||||
#include "script_component.hpp"
|
||||
if (!alive ace_player) exitWith {};
|
||||
if (true) then {
|
||||
// Detect if curator interface is open and disable effects
|
||||
if (!isNull(findDisplay 312)) exitWith {
|
||||
if (GVAR(EffectsActive)) then {
|
||||
call FUNC(removeGlassesEffect);
|
||||
};
|
||||
};
|
||||
call FUNC(checkGlasses);
|
||||
if !([ace_player] call FUNC(isGogglesVisible)) exitWith {
|
||||
if (GVAR(EffectsActive)) then {
|
||||
call FUNC(removeGlassesEffect);
|
||||
};
|
||||
};
|
||||
if (call FUNC(externalCamera)) exitWith {
|
||||
if (GVAR(EffectsActive)) then {
|
||||
call FUNC(removeGlassesEffect);
|
||||
};
|
||||
};
|
||||
if !(GVAR(EffectsActive)) then {
|
||||
[goggles ace_player] call FUNC(applyGlassesEffect);
|
||||
} else {
|
||||
if ([goggles ace_player] call FUNC(isDivingGoggles) && {underwater ace_player}) then {
|
||||
call FUNC(removeRainEffect);
|
||||
call FUNC(removeDirtEffect);
|
||||
call FUNC(removeDustEffect);
|
||||
};
|
||||
};
|
||||
// Detect if curator interface is open and disable effects
|
||||
if (!isNull(findDisplay 312)) exitWith {
|
||||
if (GVAR(EffectsActive)) then {
|
||||
call FUNC(removeGlassesEffect);
|
||||
};
|
||||
};
|
||||
call FUNC(checkGlasses);
|
||||
if !([ace_player] call FUNC(isGogglesVisible)) exitWith {
|
||||
if (GVAR(EffectsActive)) then {
|
||||
call FUNC(removeGlassesEffect);
|
||||
};
|
||||
};
|
||||
if (call FUNC(externalCamera)) exitWith {
|
||||
if (GVAR(EffectsActive)) then {
|
||||
call FUNC(removeGlassesEffect);
|
||||
};
|
||||
};
|
||||
if !(GVAR(EffectsActive)) then {
|
||||
[goggles ace_player] call FUNC(applyGlassesEffect);
|
||||
} else {
|
||||
if ([goggles ace_player] call FUNC(isDivingGoggles) && {underwater ace_player}) then {
|
||||
call FUNC(removeRainEffect);
|
||||
call FUNC(removeDirtEffect);
|
||||
call FUNC(removeDustEffect);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -23,12 +23,12 @@ _effects set [BROKEN, _broken];
|
||||
SETGLASSES(ace_player,_effects);
|
||||
|
||||
if ((stance ace_player) != "PRONE") then {
|
||||
ace_player playActionNow "gestureWipeFace";
|
||||
ace_player playActionNow "gestureWipeFace";
|
||||
};
|
||||
[{
|
||||
if (cameraView == "INTERNAL") then {
|
||||
addCamShake [5, 1.75, 2];
|
||||
};
|
||||
if (cameraView == "INTERNAL") then {
|
||||
addCamShake [5, 1.75, 2];
|
||||
};
|
||||
}, [], 0.3, 0] call EFUNC(common,waitAndExecute);
|
||||
|
||||
call FUNC(removeDirtEffect);
|
||||
|
@ -24,11 +24,11 @@ if (rain > 0.1) exitWith {true};
|
||||
if ((stance _unit) != "PRONE") exitWith {true};
|
||||
|
||||
if (isClass(configFile >> "CfgWeapons" >> _weapon >> "GunParticles" >> "FirstEffect")) then {
|
||||
_cloudType = getText(configFile >> "CfgWeapons" >> _weapon >> "GunParticles" >> "FirstEffect" >> "effectName");
|
||||
_cloudType = getText(configFile >> "CfgWeapons" >> _weapon >> "GunParticles" >> "FirstEffect" >> "effectName");
|
||||
} else {
|
||||
if (isClass(configFile >> "CfgWeapons" >> _weapon >> "GunParticles" >> "effect1")) then {
|
||||
_cloudType = getText(configFile >> "CfgWeapons" >> _weapon >> "GunParticles" >> "effect1" >> "effectName");
|
||||
};
|
||||
if (isClass(configFile >> "CfgWeapons" >> _weapon >> "GunParticles" >> "effect1")) then {
|
||||
_cloudType = getText(configFile >> "CfgWeapons" >> _weapon >> "GunParticles" >> "effect1" >> "effectName");
|
||||
};
|
||||
};
|
||||
|
||||
if (_cloudType == "") exitWith {true};
|
||||
@ -49,7 +49,7 @@ if (!_found) exitWith {};
|
||||
_bullets = GETDUSTT(DBULLETS);
|
||||
|
||||
if ((diag_tickTime - GETDUSTT(DTIME)) > 1) then {
|
||||
_bullets = 0;
|
||||
_bullets = 0;
|
||||
};
|
||||
|
||||
_bullets = _bullets + 1;
|
||||
@ -57,15 +57,15 @@ SETDUST(DBULLETS,_bullets);
|
||||
SETDUST(DTIME,diag_tickTime);
|
||||
|
||||
if (GETDUSTT(DAMOUNT) < 2) then {
|
||||
private "_bulletsRequired";
|
||||
_bulletsRequired = 100;
|
||||
if (isNumber (ConfigFile >> _cloudType >> "ACE_Goggles_BulletCount")) then {
|
||||
_bulletsRequired = getNumber (ConfigFile >> _cloudType >> "ACE_Goggles_BulletCount");
|
||||
};
|
||||
private "_bulletsRequired";
|
||||
_bulletsRequired = 100;
|
||||
if (isNumber (ConfigFile >> _cloudType >> "ACE_Goggles_BulletCount")) then {
|
||||
_bulletsRequired = getNumber (ConfigFile >> _cloudType >> "ACE_Goggles_BulletCount");
|
||||
};
|
||||
|
||||
if (_bulletsRequired <= _bullets) then {
|
||||
SETDUST(DACTIVE,true);
|
||||
call FUNC(applyDust);
|
||||
};
|
||||
if (_bulletsRequired <= _bullets) then {
|
||||
SETDUST(DACTIVE,true);
|
||||
call FUNC(applyDust);
|
||||
};
|
||||
};
|
||||
true
|
||||
|
@ -16,10 +16,10 @@
|
||||
private ["_effectIndex"];
|
||||
|
||||
_effectIndex = switch true do {
|
||||
case (_this <= 0.04): {0};
|
||||
case (_this <= 0.06): {1};
|
||||
case (_this <= 0.09): {2};
|
||||
default {3};
|
||||
case (_this <= 0.04): {0};
|
||||
case (_this <= 0.06): {1};
|
||||
case (_this <= 0.09): {2};
|
||||
default {3};
|
||||
};
|
||||
|
||||
_effectIndex
|
||||
|
@ -23,14 +23,14 @@ _result = false;
|
||||
if ((vehicle _unit) != _unit) exitWith {(cameraView != "GUNNER")};
|
||||
|
||||
if (_currentGlasses != "") then {
|
||||
_position =(getPosASLW _unit);
|
||||
if (surfaceIsWater _position && {((_position select 2) < 0.25)}) exitWith {
|
||||
_result = ([_currentGlasses] call FUNC(isDivingGoggles));
|
||||
};
|
||||
if (getNumber (ConfigFile >> "CfgGlasses" >> _currentGlasses >> "ACE_Resistance") == 0) exitWith {
|
||||
_result = false;
|
||||
};
|
||||
_result = !([_currentGlasses] call FUNC(isDivingGoggles));
|
||||
_position =(getPosASLW _unit);
|
||||
if (surfaceIsWater _position && {((_position select 2) < 0.25)}) exitWith {
|
||||
_result = ([_currentGlasses] call FUNC(isDivingGoggles));
|
||||
};
|
||||
if (getNumber (ConfigFile >> "CfgGlasses" >> _currentGlasses >> "ACE_Resistance") == 0) exitWith {
|
||||
_result = false;
|
||||
};
|
||||
_result = !([_currentGlasses] call FUNC(isDivingGoggles));
|
||||
};
|
||||
|
||||
_result
|
||||
|
@ -8,8 +8,8 @@
|
||||
*
|
||||
* Return Value:
|
||||
* <ARRAY>:
|
||||
* 0: In rotorwash <BOOL>
|
||||
* 1: Amount of rotor wash. <NUMBER>
|
||||
* 0: In rotorwash <BOOL>
|
||||
* 1: Amount of rotor wash. <NUMBER>
|
||||
*
|
||||
* Example:
|
||||
* if (([ace_player, 10] call ace_goggles_fnc_isInRotorWash) select 0) then { hint "Rotor wash"; };
|
||||
@ -22,25 +22,25 @@ private ["_heli", "_unit", "_result", "_radius"];
|
||||
_unit = _this select 0;
|
||||
_radius = 15;
|
||||
if (count _this > 1) then {
|
||||
_radius = _this select 1;
|
||||
_radius = _this select 1;
|
||||
};
|
||||
_result = [false, _radius + 2];
|
||||
|
||||
_heli = (getPosATL _unit) nearEntities [["Helicopter"], _radius];
|
||||
{
|
||||
if !(_x isKindOf "ParachuteBase") then {
|
||||
if (isEngineOn _x) then {
|
||||
private "_distance";
|
||||
_distance = (_radius - (_unit distance _x));
|
||||
if (_distance != 0) then {
|
||||
_distance = _distance / _radius;
|
||||
};
|
||||
if (_distance < (_result select 1)) then {
|
||||
_result = [true, _distance];
|
||||
};
|
||||
};
|
||||
};
|
||||
false
|
||||
if !(_x isKindOf "ParachuteBase") then {
|
||||
if (isEngineOn _x) then {
|
||||
private "_distance";
|
||||
_distance = (_radius - (_unit distance _x));
|
||||
if (_distance != 0) then {
|
||||
_distance = _distance / _radius;
|
||||
};
|
||||
if (_distance < (_result select 1)) then {
|
||||
_result = [true, _distance];
|
||||
};
|
||||
};
|
||||
};
|
||||
false
|
||||
} count _heli;
|
||||
|
||||
_result
|
||||
|
@ -17,62 +17,62 @@
|
||||
if (isNull(ace_player)) exitWith {};
|
||||
GVAR(FrameEvent) set [0, !(GVAR(FrameEvent) select 0)];
|
||||
if (GVAR(FrameEvent) select 0) exitWith {
|
||||
if (vehicle ace_player != ace_player && {!([ace_player] call EFUNC(common,isTurnedOut))}) exitWith {(GVAR(FrameEvent) select 1) set [0, false]; };
|
||||
GVAR(FrameEvent) set [1, ([ace_player] call FUNC(isInRotorWash))];
|
||||
if (vehicle ace_player != ace_player && {!([ace_player] call EFUNC(common,isTurnedOut))}) exitWith {(GVAR(FrameEvent) select 1) set [0, false]; };
|
||||
GVAR(FrameEvent) set [1, ([ace_player] call FUNC(isInRotorWash))];
|
||||
};
|
||||
private ["_rotorWash","_safe"];
|
||||
_rotorWash = GVAR(FrameEvent) select 1;
|
||||
_safe = false;
|
||||
if !(_rotorWash select 0) exitWith {
|
||||
if (GVAR(PostProcessEyes_Enabled)) then {
|
||||
GVAR(PostProcessEyes_Enabled) = false;
|
||||
if (GVAR(DustHandler) != -1) then { // should be fixed in dev CBA
|
||||
[GVAR(DustHandler)] call CALLSTACK(cba_fnc_removePerFrameHandler);
|
||||
GVAR(DustHandler) = -1;
|
||||
};
|
||||
GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0,0,0,0], [0,0,0,1],[1,1,1,0]];
|
||||
GVAR(PostProcessEyes) ppEffectCommit 2;
|
||||
GVAR(DustHandler) = [{
|
||||
GVAR(PostProcessEyes) ppEffectEnable false;
|
||||
GVAR(DustHandler) = -1;
|
||||
}, [], 2, 0.5] call EFUNC(common,waitAndExecute);
|
||||
};
|
||||
if (GVAR(PostProcessEyes_Enabled)) then {
|
||||
GVAR(PostProcessEyes_Enabled) = false;
|
||||
if (GVAR(DustHandler) != -1) then { // should be fixed in dev CBA
|
||||
[GVAR(DustHandler)] call CALLSTACK(cba_fnc_removePerFrameHandler);
|
||||
GVAR(DustHandler) = -1;
|
||||
};
|
||||
GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0,0,0,0], [0,0,0,1],[1,1,1,0]];
|
||||
GVAR(PostProcessEyes) ppEffectCommit 2;
|
||||
GVAR(DustHandler) = [{
|
||||
GVAR(PostProcessEyes) ppEffectEnable false;
|
||||
GVAR(DustHandler) = -1;
|
||||
}, [], 2, 0.5] call EFUNC(common,waitAndExecute);
|
||||
};
|
||||
};
|
||||
if ((headgear ace_player) != "") then {
|
||||
_safe = (getNumber (ConfigFile >> "CfgWeapons" >> (headgear ace_player) >> "ACE_Protection") == 1);
|
||||
_safe = (getNumber (ConfigFile >> "CfgWeapons" >> (headgear ace_player) >> "ACE_Protection") == 1);
|
||||
};
|
||||
if !(_safe) then {
|
||||
if !([ace_player] call FUNC(isGogglesVisible)) exitWith{};
|
||||
if (GETDUSTT(DAMOUNT) < 2) then {
|
||||
if (!GETDUSTT(DACTIVE)) then {
|
||||
SETDUST(DACTIVE,true);
|
||||
call FUNC(ApplyDust);
|
||||
} else {
|
||||
if ((_rotorWash select 1) > 0.5) then {
|
||||
call FUNC(ApplyDust);
|
||||
};
|
||||
};
|
||||
};
|
||||
_safe = (getNumber (ConfigFile >> "CfgGlasses" >> GVAR(Current) >> "ACE_Protection") == 1);
|
||||
if !([ace_player] call FUNC(isGogglesVisible)) exitWith{};
|
||||
if (GETDUSTT(DAMOUNT) < 2) then {
|
||||
if (!GETDUSTT(DACTIVE)) then {
|
||||
SETDUST(DACTIVE,true);
|
||||
call FUNC(ApplyDust);
|
||||
} else {
|
||||
if ((_rotorWash select 1) > 0.5) then {
|
||||
call FUNC(ApplyDust);
|
||||
};
|
||||
};
|
||||
};
|
||||
_safe = (getNumber (ConfigFile >> "CfgGlasses" >> GVAR(Current) >> "ACE_Protection") == 1);
|
||||
};
|
||||
if (_safe) exitWith {};
|
||||
if ((_rotorWash select 1) <= 15) then {
|
||||
private "_scale";
|
||||
_scale = 0.7;
|
||||
if ((_rotorWash select 1) != 0) then {
|
||||
_scale = CLAMP(0.3*(_rotorWash select 1),0.1,0.3);
|
||||
} else {
|
||||
_scale = 0.1;
|
||||
};
|
||||
_scale = 1 - _scale;
|
||||
if (GVAR(DustHandler) != -1) then { // should be fixed in dev CBA
|
||||
[GVAR(DustHandler)] call CALLSTACK(cba_fnc_removePerFrameHandler);
|
||||
GVAR(DustHandler) = -1;
|
||||
};
|
||||
if !(ace_player getVariable ["ACE_EyesDamaged", false]) then {
|
||||
GVAR(PostProcessEyes_Enabled) = true;
|
||||
GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0,0,0,0], [_scale,_scale,_scale,_scale],[1,1,1,0]];
|
||||
GVAR(PostProcessEyes) ppEffectCommit 0.5;
|
||||
GVAR(PostProcessEyes) ppEffectEnable true;
|
||||
};
|
||||
private "_scale";
|
||||
_scale = 0.7;
|
||||
if ((_rotorWash select 1) != 0) then {
|
||||
_scale = CLAMP(0.3*(_rotorWash select 1),0.1,0.3);
|
||||
} else {
|
||||
_scale = 0.1;
|
||||
};
|
||||
_scale = 1 - _scale;
|
||||
if (GVAR(DustHandler) != -1) then { // should be fixed in dev CBA
|
||||
[GVAR(DustHandler)] call CALLSTACK(cba_fnc_removePerFrameHandler);
|
||||
GVAR(DustHandler) = -1;
|
||||
};
|
||||
if !(ace_player getVariable ["ACE_EyesDamaged", false]) then {
|
||||
GVAR(PostProcessEyes_Enabled) = true;
|
||||
GVAR(PostProcessEyes) ppEffectAdjust [1, 1, 0, [0,0,0,0], [_scale,_scale,_scale,_scale],[1,1,1,0]];
|
||||
GVAR(PostProcessEyes) ppEffectCommit 0.5;
|
||||
GVAR(PostProcessEyes) ppEffectEnable true;
|
||||
};
|
||||
};
|
||||
|
@ -17,37 +17,37 @@
|
||||
private ["_fnc_underCover"];
|
||||
if (isNull(ace_player) || {!(alive ace_player)}) exitWith {};
|
||||
_fnc_underCover = {
|
||||
private ["_pos", "_unit"];
|
||||
_unit = (_this select 0);
|
||||
if (vehicle _unit != _unit && {!([_unit] call EFUNC(common,isTurnedOut))}) exitWith {true};
|
||||
_pos = eyePos _unit;
|
||||
((positionCameraToWorld [0,0,1] select 2) < ((positionCameraToWorld [0,0,0] select 2) - 0.4)) || {(lineIntersects [_pos, _pos vectorAdd [0,0,15], _unit])}
|
||||
private ["_pos", "_unit"];
|
||||
_unit = (_this select 0);
|
||||
if (vehicle _unit != _unit && {!([_unit] call EFUNC(common,isTurnedOut))}) exitWith {true};
|
||||
_pos = eyePos _unit;
|
||||
((positionCameraToWorld [0,0,1] select 2) < ((positionCameraToWorld [0,0,0] select 2) - 0.4)) || {(lineIntersects [_pos, _pos vectorAdd [0,0,15], _unit])}
|
||||
};
|
||||
if (!isNull(findDisplay 312)) exitWith {
|
||||
if (GVAR(RainActive)) then {
|
||||
call FUNC(RemoveRainEffect);
|
||||
};
|
||||
if (GVAR(RainActive)) then {
|
||||
call FUNC(RemoveRainEffect);
|
||||
};
|
||||
};
|
||||
// Ignore if ace_player is under water
|
||||
if (!GVAR(EffectsActive) || {underwater ace_player}) exitWith{call FUNC(RemoveRainEffect);};
|
||||
if (GVAR(RainLastLevel) != rain) then {
|
||||
call FUNC(RemoveRainEffect);
|
||||
GVAR(RainLastLevel) = rain;
|
||||
// Rain is happening
|
||||
if (GVAR(RainLastLevel) > 0.05 && {!([ace_player] call _fnc_underCover)}) then {
|
||||
GVAR(RainActive) = true;
|
||||
GVAR(RainDrops) = "#particlesource" createVehicleLocal GetPos ace_player;
|
||||
GVAR(RainDrops) setParticleClass "ACERainEffect";
|
||||
GVAR(RainDrops) setDropInterval (0.07 * (1.1 - GVAR(RainLastLevel)));
|
||||
GVAR(RainDrops) attachTo [vehicle ace_player,[0,0,0]];
|
||||
};
|
||||
call FUNC(RemoveRainEffect);
|
||||
GVAR(RainLastLevel) = rain;
|
||||
// Rain is happening
|
||||
if (GVAR(RainLastLevel) > 0.05 && {!([ace_player] call _fnc_underCover)}) then {
|
||||
GVAR(RainActive) = true;
|
||||
GVAR(RainDrops) = "#particlesource" createVehicleLocal GetPos ace_player;
|
||||
GVAR(RainDrops) setParticleClass "ACERainEffect";
|
||||
GVAR(RainDrops) setDropInterval (0.07 * (1.1 - GVAR(RainLastLevel)));
|
||||
GVAR(RainDrops) attachTo [vehicle ace_player,[0,0,0]];
|
||||
};
|
||||
}else{
|
||||
if (GVAR(RainLastLevel) > 0.05) then {
|
||||
if (GVAR(RainActive) && {[ace_player] call _fnc_underCover}) exitWith {
|
||||
call FUNC(RemoveRainEffect);
|
||||
};
|
||||
if (!GVAR(RainActive)) then {
|
||||
GVAR(RainLastLevel) = -1;
|
||||
};
|
||||
};
|
||||
if (GVAR(RainLastLevel) > 0.05) then {
|
||||
if (GVAR(RainActive) && {[ace_player] call _fnc_underCover}) exitWith {
|
||||
call FUNC(RemoveRainEffect);
|
||||
};
|
||||
if (!GVAR(RainActive)) then {
|
||||
GVAR(RainLastLevel) = -1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -15,5 +15,5 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
if (!isNull(GETUVAR(GVAR(DisplayEffects),displayNull))) then {
|
||||
(GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10660) ctrlSetText "";
|
||||
(GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10660) ctrlSetText "";
|
||||
};
|
||||
|
@ -15,5 +15,5 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
if (!isNull(GETUVAR(GVAR(DisplayEffects),displayNull))) then {
|
||||
(GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10662) ctrlSetText "";
|
||||
(GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10662) ctrlSetText "";
|
||||
};
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Author: Garth 'L-H' de Wet
|
||||
* Removes the glasses effect from the screen, removes dirt effect, removes rain effect,
|
||||
* removes dust effect. Does not reset array (glasses will still be broken, dirty, ect.)
|
||||
* Removes the glasses effect from the screen, removes dirt effect, removes rain effect,
|
||||
* removes dust effect. Does not reset array (glasses will still be broken, dirty, ect.)
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
@ -19,7 +19,7 @@ GVAR(EffectsActive) = false;
|
||||
GVAR(PostProcess) ppEffectEnable false;
|
||||
|
||||
if (!isNull(GLASSDISPLAY)) then {
|
||||
GLASSDISPLAY closeDisplay 0;
|
||||
GLASSDISPLAY closeDisplay 0;
|
||||
};
|
||||
|
||||
call FUNC(removeDirtEffect);
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
if (!isNull (GVAR(RainDrops))) then {
|
||||
deleteVehicle (GVAR(RainDrops));
|
||||
deleteVehicle (GVAR(RainDrops));
|
||||
};
|
||||
GVAR(RainActive) = false;
|
||||
GVAR(RainLastLevel) = 0;
|
||||
|
@ -2,11 +2,11 @@
|
||||
#include "\z\ace\Addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_HEARING
|
||||
#define DEBUG_MODE_FULL
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_HEARING
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_HEARING
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_HEARING
|
||||
#endif
|
||||
|
||||
#include "\z\ace\Addons\main\script_macros.hpp"
|
||||
|
@ -19,9 +19,9 @@ for [{_i = 0},{_i < (count _this) - 1},{_i = _i + 1}] do {
|
||||
_parentPath pushBack (_this select _i);
|
||||
};
|
||||
_actionName = if (count _this > 0) then {
|
||||
_this select ((count _this) - 1);
|
||||
_this select ((count _this) - 1);
|
||||
} else {
|
||||
""
|
||||
""
|
||||
};
|
||||
|
||||
[_parentPath, _actionName]
|
||||
|
@ -1,19 +1,19 @@
|
||||
/*
|
||||
Author: Garth de Wet (LH)
|
||||
Author: Garth de Wet (LH)
|
||||
|
||||
Description:
|
||||
Adds an item to the select menu
|
||||
Description:
|
||||
Adds an item to the select menu
|
||||
|
||||
Parameters:
|
||||
0: ARRAY/NUMBER - List container
|
||||
1: String - Display Name
|
||||
2: String - Picture
|
||||
3: String/code - data
|
||||
Parameters:
|
||||
0: ARRAY/NUMBER - List container
|
||||
1: String - Display Name
|
||||
2: String - Picture
|
||||
3: String/code - data
|
||||
|
||||
Returns:
|
||||
ARRAY/Number
|
||||
Returns:
|
||||
ARRAY/Number
|
||||
|
||||
Example:
|
||||
Example:
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
@ -26,7 +26,7 @@ _picture = _this select 2;
|
||||
_data = _this select 3;
|
||||
|
||||
if (_picture == "" || _picture == "PictureThing") then {
|
||||
_picture = QUOTE(PATHTOF(UI\dot_ca.paa));
|
||||
_picture = QUOTE(PATHTOF(UI\dot_ca.paa));
|
||||
};
|
||||
|
||||
_index = lbAdd [_container, _displayName];
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
Author: Garth de Wet (LH)
|
||||
Author: Garth de Wet (LH)
|
||||
|
||||
Description:
|
||||
Depending on the passed value, either scrolls down through the list or up.
|
||||
Description:
|
||||
Depending on the passed value, either scrolls down through the list or up.
|
||||
|
||||
Parameters:
|
||||
NUMBER - Amount to increase current interaction target
|
||||
Parameters:
|
||||
NUMBER - Amount to increase current interaction target
|
||||
|
||||
Returns:
|
||||
Nothing
|
||||
Returns:
|
||||
Nothing
|
||||
|
||||
Example:
|
||||
1 call FUNC(MoveDown);
|
||||
-1 call FUNC(MoveDown);
|
||||
Example:
|
||||
1 call FUNC(MoveDown);
|
||||
-1 call FUNC(MoveDown);
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
@ -31,27 +31,27 @@ _dlgInteractionDialog = uiNamespace getVariable QGVAR(Flow_Display);
|
||||
_top = GVAR(SelectedButton) - 2;
|
||||
_i = 0;
|
||||
while {_i <= 4} do {
|
||||
_index =_i + _top;
|
||||
_ctrl = _dlgInteractionDialog displayCtrl (1200 + _i);
|
||||
if (_index >= 0 && {_index <= _count}) then {
|
||||
_action = GVAR(Buttons) select _index;
|
||||
_ctrl ctrlShow true;
|
||||
_ctrl ctrlSetText (_action select 5);
|
||||
_color = [1,1,1,1];
|
||||
if !([_target, _player] call (_action select 2)) then {
|
||||
_color = [0.3,0.3,0.3,0.8];
|
||||
};
|
||||
if (_i == 0 || _i == 4) then {
|
||||
_color set [3, 0.5];
|
||||
};
|
||||
if (_i == 1 || _i == 3) then {
|
||||
_color set [3, 0.75];
|
||||
};
|
||||
_ctrl ctrlSetTextColor _color;
|
||||
}else{
|
||||
_ctrl ctrlShow false;
|
||||
};
|
||||
_i = _i + 1;
|
||||
_index =_i + _top;
|
||||
_ctrl = _dlgInteractionDialog displayCtrl (1200 + _i);
|
||||
if (_index >= 0 && {_index <= _count}) then {
|
||||
_action = GVAR(Buttons) select _index;
|
||||
_ctrl ctrlShow true;
|
||||
_ctrl ctrlSetText (_action select 5);
|
||||
_color = [1,1,1,1];
|
||||
if !([_target, _player] call (_action select 2)) then {
|
||||
_color = [0.3,0.3,0.3,0.8];
|
||||
};
|
||||
if (_i == 0 || _i == 4) then {
|
||||
_color set [3, 0.5];
|
||||
};
|
||||
if (_i == 1 || _i == 3) then {
|
||||
_color set [3, 0.75];
|
||||
};
|
||||
_ctrl ctrlSetTextColor _color;
|
||||
}else{
|
||||
_ctrl ctrlShow false;
|
||||
};
|
||||
_i = _i + 1;
|
||||
};
|
||||
|
||||
_ctrl = _dlgInteractionDialog displayCtrl 1000;
|
||||
@ -60,7 +60,7 @@ _ctrl = _dlgInteractionDialog displayCtrl 1100;
|
||||
_current = (GVAR(Buttons) select GVAR(SelectedButton));
|
||||
_infoText = "";
|
||||
if !([_target, _player] call (_current select 2)) then {
|
||||
_infoText = "Unavailable";
|
||||
_infoText = "Unavailable";
|
||||
};
|
||||
_ctrl ctrlSetText _infoText;
|
||||
_ctrl ctrlShow (_infoText != "");
|
||||
|
@ -13,12 +13,12 @@ _dlgInteractionDialog = uiNamespace getVariable QGVAR(Dialog);
|
||||
|
||||
/*
|
||||
for "_a" from 0 to (_count - 1) do {
|
||||
_action = GVAR(Buttons) select _a;
|
||||
_action = GVAR(Buttons) select _a;
|
||||
|
||||
_ctrlInteractionDialog = _dlgInteractionDialog displayCtrl (10 + _a);
|
||||
_ctrlInteractionDialog ctrlShow true;
|
||||
_ctrlInteractionDialog ctrlSetText (_action select 0);
|
||||
_ctrlInteractionDialog ctrlEnable (call (_action select 2));
|
||||
_ctrlInteractionDialog = _dlgInteractionDialog displayCtrl (10 + _a);
|
||||
_ctrlInteractionDialog ctrlShow true;
|
||||
_ctrlInteractionDialog ctrlSetText (_action select 0);
|
||||
_ctrlInteractionDialog ctrlEnable (call (_action select 2));
|
||||
};
|
||||
*/
|
||||
|
||||
@ -27,27 +27,27 @@ _ctrlInteractionDialog = _dlgInteractionDialog displayCtrl 3;
|
||||
GVAR(MainButton) = "(findDisplay 1713999) closeDisplay 1;";
|
||||
|
||||
if (_object isKindOf "Man") then {
|
||||
_ctrlInteractionDialog ctrlSetText (if (alive _object) then {name _object} else {_object getVariable ["ACE_Name", "Unknown"]});
|
||||
_ctrlInteractionDialog ctrlSetText (if (alive _object) then {name _object} else {_object getVariable ["ACE_Name", "Unknown"]});
|
||||
} else {
|
||||
_ctrlInteractionDialog ctrlSetText (getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName"));
|
||||
_ctrlInteractionDialog ctrlSetText (getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName"));
|
||||
};
|
||||
|
||||
for "_index" from 0 to 9 do {
|
||||
_ctrlInteractionDialog = _dlgInteractionDialog displayCtrl (10 + _index);
|
||||
_ctrlInteractionDialog ctrlShow true;
|
||||
_ctrlInteractionDialog = _dlgInteractionDialog displayCtrl (10 + _index);
|
||||
_ctrlInteractionDialog ctrlShow true;
|
||||
|
||||
_ctrlInteractionDialogIcon = _dlgInteractionDialog displayCtrl (20 + _index);
|
||||
_ctrlInteractionDialogIcon = _dlgInteractionDialog displayCtrl (20 + _index);
|
||||
|
||||
if (_index < _count) then {
|
||||
_action = GVAR(Buttons) select _index;
|
||||
_ctrlInteractionDialog ctrlSetText (_action select 0);
|
||||
_ctrlInteractionDialog ctrlEnable (call (_action select 2));
|
||||
if (_index < _count) then {
|
||||
_action = GVAR(Buttons) select _index;
|
||||
_ctrlInteractionDialog ctrlSetText (_action select 0);
|
||||
_ctrlInteractionDialog ctrlEnable (call (_action select 2));
|
||||
|
||||
_ctrlInteractionDialogIcon ctrlSetText (_action select 5);
|
||||
} else {
|
||||
_ctrlInteractionDialog ctrlSetText "";
|
||||
_ctrlInteractionDialog ctrlEnable false;
|
||||
_ctrlInteractionDialogIcon ctrlSetText (_action select 5);
|
||||
} else {
|
||||
_ctrlInteractionDialog ctrlSetText "";
|
||||
_ctrlInteractionDialog ctrlEnable false;
|
||||
|
||||
_ctrlInteractionDialogIcon ctrlSetText "";
|
||||
};
|
||||
_ctrlInteractionDialogIcon ctrlSetText "";
|
||||
};
|
||||
};
|
||||
|
@ -7,101 +7,101 @@ _house = _this select 0;
|
||||
_door = _this select 1;
|
||||
|
||||
_index = [
|
||||
"door_1",
|
||||
"door_2",
|
||||
"door_3",
|
||||
"door_4",
|
||||
"door_5",
|
||||
"door_6",
|
||||
"door_7",
|
||||
"door_8",
|
||||
"door_9",
|
||||
"door_10",
|
||||
"door_11",
|
||||
"door_12",
|
||||
"door_13",
|
||||
"Door_14",
|
||||
"door_15",
|
||||
"door_16",
|
||||
"door_17",
|
||||
"door_18",
|
||||
"door_19",
|
||||
"door_20",
|
||||
"door_21",
|
||||
"door_22",
|
||||
"door_1",
|
||||
"door_2",
|
||||
"door_3",
|
||||
"door_4",
|
||||
"door_5",
|
||||
"door_6",
|
||||
"door_7",
|
||||
"door_8",
|
||||
"door_9",
|
||||
"door_10",
|
||||
"door_11",
|
||||
"door_12",
|
||||
"door_13",
|
||||
"Door_14",
|
||||
"door_15",
|
||||
"door_16",
|
||||
"door_17",
|
||||
"door_18",
|
||||
"door_19",
|
||||
"door_20",
|
||||
"door_21",
|
||||
"door_22",
|
||||
|
||||
"hatch_1",
|
||||
"hatch_2",
|
||||
"hatch_3",
|
||||
"hatch_4",
|
||||
"hatch_5",
|
||||
"hatch_6"
|
||||
"hatch_1",
|
||||
"hatch_2",
|
||||
"hatch_3",
|
||||
"hatch_4",
|
||||
"hatch_5",
|
||||
"hatch_6"
|
||||
] find toLower _door;
|
||||
|
||||
if (_index == -1) exitWith {[[],""]};
|
||||
|
||||
_animations = [
|
||||
["Door_1_rot", "Door_Handle_1_rot_1", "Door_Handle_1_rot_2"],
|
||||
["Door_2_rot", "Door_Handle_2_rot_1", "Door_Handle_2_rot_2"],
|
||||
["Door_3_rot", "Door_Handle_3_rot_1", "Door_Handle_3_rot_2"],
|
||||
["Door_4_rot", "Door_Handle_4_rot_1", "Door_Handle_4_rot_2"],
|
||||
["Door_5_rot", "Door_Handle_5_rot_1", "Door_Handle_5_rot_2"],
|
||||
["Door_6_rot", "Door_Handle_6_rot_1", "Door_Handle_6_rot_2"],
|
||||
["Door_7_rot", "Door_Handle_7_rot_1", "Door_Handle_7_rot_2"],
|
||||
["Door_8_rot", "Door_Handle_8_rot_1", "Door_Handle_8_rot_2"],
|
||||
["Door_9_rot", "Door_Handle_9_rot_1", "Door_Handle_9_rot_2"],
|
||||
["Door_10_rot", "Door_Handle_10_rot_1", "Door_Handle_10_rot_2"],
|
||||
["Door_11_rot", "Door_Handle_11_rot_1", "Door_Handle_11_rot_2"],
|
||||
["Door_12_rot", "Door_Handle_12_rot_1", "Door_Handle_12_rot_2"],
|
||||
["Door_13_rot", "Door_Handle_13_rot_1", "Door_Handle_13_rot_2"],
|
||||
["Door_14_rot", "Door_Handle_14_rot_1", "Door_Handle_14_rot_2"],
|
||||
["Door_15_rot", "Door_Handle_15_rot_1", "Door_Handle_15_rot_2"],
|
||||
["Door_16_rot", "Door_Handle_16_rot_1", "Door_Handle_16_rot_2"],
|
||||
["Door_17_rot", "Door_Handle_17_rot_1", "Door_Handle_17_rot_2"],
|
||||
["Door_18_rot", "Door_Handle_18_rot_1", "Door_Handle_18_rot_2"],
|
||||
["Door_19_rot", "Door_Handle_19_rot_1", "Door_Handle_19_rot_2"],
|
||||
["Door_20_rot", "Door_Handle_20_rot_1", "Door_Handle_20_rot_2"],
|
||||
["Door_21_rot", "Door_Handle_21_rot_1", "Door_Handle_21_rot_2"],
|
||||
["Door_22_rot", "Door_Handle_22_rot_1", "Door_Handle_22_rot_2"],
|
||||
["Door_1_rot", "Door_Handle_1_rot_1", "Door_Handle_1_rot_2"],
|
||||
["Door_2_rot", "Door_Handle_2_rot_1", "Door_Handle_2_rot_2"],
|
||||
["Door_3_rot", "Door_Handle_3_rot_1", "Door_Handle_3_rot_2"],
|
||||
["Door_4_rot", "Door_Handle_4_rot_1", "Door_Handle_4_rot_2"],
|
||||
["Door_5_rot", "Door_Handle_5_rot_1", "Door_Handle_5_rot_2"],
|
||||
["Door_6_rot", "Door_Handle_6_rot_1", "Door_Handle_6_rot_2"],
|
||||
["Door_7_rot", "Door_Handle_7_rot_1", "Door_Handle_7_rot_2"],
|
||||
["Door_8_rot", "Door_Handle_8_rot_1", "Door_Handle_8_rot_2"],
|
||||
["Door_9_rot", "Door_Handle_9_rot_1", "Door_Handle_9_rot_2"],
|
||||
["Door_10_rot", "Door_Handle_10_rot_1", "Door_Handle_10_rot_2"],
|
||||
["Door_11_rot", "Door_Handle_11_rot_1", "Door_Handle_11_rot_2"],
|
||||
["Door_12_rot", "Door_Handle_12_rot_1", "Door_Handle_12_rot_2"],
|
||||
["Door_13_rot", "Door_Handle_13_rot_1", "Door_Handle_13_rot_2"],
|
||||
["Door_14_rot", "Door_Handle_14_rot_1", "Door_Handle_14_rot_2"],
|
||||
["Door_15_rot", "Door_Handle_15_rot_1", "Door_Handle_15_rot_2"],
|
||||
["Door_16_rot", "Door_Handle_16_rot_1", "Door_Handle_16_rot_2"],
|
||||
["Door_17_rot", "Door_Handle_17_rot_1", "Door_Handle_17_rot_2"],
|
||||
["Door_18_rot", "Door_Handle_18_rot_1", "Door_Handle_18_rot_2"],
|
||||
["Door_19_rot", "Door_Handle_19_rot_1", "Door_Handle_19_rot_2"],
|
||||
["Door_20_rot", "Door_Handle_20_rot_1", "Door_Handle_20_rot_2"],
|
||||
["Door_21_rot", "Door_Handle_21_rot_1", "Door_Handle_21_rot_2"],
|
||||
["Door_22_rot", "Door_Handle_22_rot_1", "Door_Handle_22_rot_2"],
|
||||
|
||||
["Hatch_1_rot"],
|
||||
["Hatch_2_rot"],
|
||||
["Hatch_3_rot"],
|
||||
["Hatch_4_rot"],
|
||||
["Hatch_5_rot"],
|
||||
["Hatch_6_rot"]
|
||||
["Hatch_1_rot"],
|
||||
["Hatch_2_rot"],
|
||||
["Hatch_3_rot"],
|
||||
["Hatch_4_rot"],
|
||||
["Hatch_5_rot"],
|
||||
["Hatch_6_rot"]
|
||||
] select _index;
|
||||
|
||||
_lockedVariable = [
|
||||
["BIS_Disabled_Door_1", "Door_Handle_1_rot_1", "Door_Locked_1_rot"],
|
||||
["BIS_Disabled_Door_2", "Door_Handle_2_rot_1", "Door_Locked_2_rot"],
|
||||
["BIS_Disabled_Door_3", "Door_Handle_3_rot_1", "Door_Locked_3_rot"],
|
||||
["BIS_Disabled_Door_4", "Door_Handle_4_rot_1", "Door_Locked_4_rot"],
|
||||
["BIS_Disabled_Door_5", "Door_Handle_5_rot_1", "Door_Locked_5_rot"],
|
||||
["BIS_Disabled_Door_6", "Door_Handle_6_rot_1", "Door_Locked_6_rot"],
|
||||
["BIS_Disabled_Door_7", "Door_Handle_7_rot_1", "Door_Locked_7_rot"],
|
||||
["BIS_Disabled_Door_8", "Door_Handle_8_rot_1", "Door_Locked_8_rot"],
|
||||
["BIS_Disabled_Door_9", "Door_Handle_9_rot_1", "Door_Locked_9_rot"],
|
||||
["BIS_Disabled_Door_10", "Door_Handle_10_rot_1", "Door_Locked_10_rot"],
|
||||
["BIS_Disabled_Door_11", "Door_Handle_11_rot_1", "Door_Locked_11_rot"],
|
||||
["BIS_Disabled_Door_12", "Door_Handle_12_rot_1", "Door_Locked_12_rot"],
|
||||
["BIS_Disabled_Door_13", "Door_Handle_13_rot_1", "Door_Locked_13_rot"],
|
||||
["BIS_Disabled_Door_14", "Door_Handle_14_rot_1", "Door_Locked_14_rot"],
|
||||
["BIS_Disabled_Door_15", "Door_Handle_15_rot_1", "Door_Locked_15_rot"],
|
||||
["BIS_Disabled_Door_16", "Door_Handle_16_rot_1", "Door_Locked_16_rot"],
|
||||
["BIS_Disabled_Door_17", "Door_Handle_17_rot_1", "Door_Locked_17_rot"],
|
||||
["BIS_Disabled_Door_18", "Door_Handle_18_rot_1", "Door_Locked_18_rot"],
|
||||
["BIS_Disabled_Door_19", "Door_Handle_19_rot_1", "Door_Locked_19_rot"],
|
||||
["BIS_Disabled_Door_20", "Door_Handle_20_rot_1", "Door_Locked_20_rot"],
|
||||
["BIS_Disabled_Door_21", "Door_Handle_21_rot_1", "Door_Locked_21_rot"],
|
||||
["BIS_Disabled_Door_22", "Door_Handle_22_rot_1", "Door_Locked_22_rot"],
|
||||
["BIS_Disabled_Door_1", "Door_Handle_1_rot_1", "Door_Locked_1_rot"],
|
||||
["BIS_Disabled_Door_2", "Door_Handle_2_rot_1", "Door_Locked_2_rot"],
|
||||
["BIS_Disabled_Door_3", "Door_Handle_3_rot_1", "Door_Locked_3_rot"],
|
||||
["BIS_Disabled_Door_4", "Door_Handle_4_rot_1", "Door_Locked_4_rot"],
|
||||
["BIS_Disabled_Door_5", "Door_Handle_5_rot_1", "Door_Locked_5_rot"],
|
||||
["BIS_Disabled_Door_6", "Door_Handle_6_rot_1", "Door_Locked_6_rot"],
|
||||
["BIS_Disabled_Door_7", "Door_Handle_7_rot_1", "Door_Locked_7_rot"],
|
||||
["BIS_Disabled_Door_8", "Door_Handle_8_rot_1", "Door_Locked_8_rot"],
|
||||
["BIS_Disabled_Door_9", "Door_Handle_9_rot_1", "Door_Locked_9_rot"],
|
||||
["BIS_Disabled_Door_10", "Door_Handle_10_rot_1", "Door_Locked_10_rot"],
|
||||
["BIS_Disabled_Door_11", "Door_Handle_11_rot_1", "Door_Locked_11_rot"],
|
||||
["BIS_Disabled_Door_12", "Door_Handle_12_rot_1", "Door_Locked_12_rot"],
|
||||
["BIS_Disabled_Door_13", "Door_Handle_13_rot_1", "Door_Locked_13_rot"],
|
||||
["BIS_Disabled_Door_14", "Door_Handle_14_rot_1", "Door_Locked_14_rot"],
|
||||
["BIS_Disabled_Door_15", "Door_Handle_15_rot_1", "Door_Locked_15_rot"],
|
||||
["BIS_Disabled_Door_16", "Door_Handle_16_rot_1", "Door_Locked_16_rot"],
|
||||
["BIS_Disabled_Door_17", "Door_Handle_17_rot_1", "Door_Locked_17_rot"],
|
||||
["BIS_Disabled_Door_18", "Door_Handle_18_rot_1", "Door_Locked_18_rot"],
|
||||
["BIS_Disabled_Door_19", "Door_Handle_19_rot_1", "Door_Locked_19_rot"],
|
||||
["BIS_Disabled_Door_20", "Door_Handle_20_rot_1", "Door_Locked_20_rot"],
|
||||
["BIS_Disabled_Door_21", "Door_Handle_21_rot_1", "Door_Locked_21_rot"],
|
||||
["BIS_Disabled_Door_22", "Door_Handle_22_rot_1", "Door_Locked_22_rot"],
|
||||
|
||||
["", ""],
|
||||
["", ""],
|
||||
["", ""],
|
||||
["", ""],
|
||||
["", ""],
|
||||
["", ""]
|
||||
["", ""],
|
||||
["", ""],
|
||||
["", ""],
|
||||
["", ""],
|
||||
["", ""],
|
||||
["", ""]
|
||||
] select _index;
|
||||
|
||||
[_animations, _lockedVariable]
|
||||
|
@ -1,17 +1,17 @@
|
||||
/*
|
||||
Author: Garth de Wet (LH)
|
||||
Author: Garth de Wet (LH)
|
||||
|
||||
Description:
|
||||
Closes the Interaction menu
|
||||
Description:
|
||||
Closes the Interaction menu
|
||||
|
||||
Parameters:
|
||||
Nothing
|
||||
Parameters:
|
||||
Nothing
|
||||
|
||||
Returns:
|
||||
Nothing
|
||||
Returns:
|
||||
Nothing
|
||||
|
||||
Example:
|
||||
call FUNC(hideMenu);
|
||||
Example:
|
||||
call FUNC(hideMenu);
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
Author(s):
|
||||
Garth de Wet (LH)
|
||||
Author(s):
|
||||
Garth de Wet (LH)
|
||||
|
||||
Description:
|
||||
Hides the interaction helper text with the mouse buttons at the bottom middle of the screen
|
||||
Description:
|
||||
Hides the interaction helper text with the mouse buttons at the bottom middle of the screen
|
||||
|
||||
Parameters:
|
||||
Nothing
|
||||
Parameters:
|
||||
Nothing
|
||||
|
||||
Returns:
|
||||
Nothing
|
||||
Returns:
|
||||
Nothing
|
||||
|
||||
Example:
|
||||
call FUNC(hideMouseHint);
|
||||
Example:
|
||||
call FUNC(hideMouseHint);
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
|
@ -43,8 +43,8 @@ _position1 = ATLToASL positionCameraToWorld [0, 0, _distance];
|
||||
_position1 set [2, (_position1 select 2) - (getTerrainHeightASL _position1 min 0)];
|
||||
|
||||
if (_vehicle in lineIntersectsWith [_position0, _position1] || {_player distance _vehicle < _distance}) then {
|
||||
true
|
||||
true
|
||||
} else {
|
||||
["Not in Range"] call FUNC(addToTooltip);
|
||||
false
|
||||
["Not in Range"] call FUNC(addToTooltip);
|
||||
false
|
||||
}
|
||||
|
@ -10,12 +10,12 @@ _unit setVariable [QGVAR(assignedFireTeam), _team, true];
|
||||
[_unit, format ["{_this assignTeam '%1'}", _team]] call EFUNC(common,execRemoteFnc);
|
||||
|
||||
if (_unit == ACE_player) then {
|
||||
_message = if (_team == "MAIN") then {
|
||||
localize "STR_ACE_Interaction_LeftTeam";
|
||||
} else {
|
||||
_team = localize format ["STR_ACE_Interaction_Team%1", _team];
|
||||
format [localize "STR_ACE_Interaction_JoinedTeam", _team];
|
||||
};
|
||||
_message = if (_team == "MAIN") then {
|
||||
localize "STR_ACE_Interaction_LeftTeam";
|
||||
} else {
|
||||
_team = localize format ["STR_ACE_Interaction_Team%1", _team];
|
||||
format [localize "STR_ACE_Interaction_JoinedTeam", _team];
|
||||
};
|
||||
|
||||
[_message] call EFUNC(common,displayTextStructured);
|
||||
[_message] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
@ -11,9 +11,9 @@ _count = count GVAR(Buttons);
|
||||
_index = call FUNC(getSelectedButton);
|
||||
|
||||
_action = if (_index != -1 && {_index < _count}) then {
|
||||
GVAR(Buttons) select _index
|
||||
GVAR(Buttons) select _index
|
||||
} else {
|
||||
["", {}, {false}, 0, [], "", "", {false}, [], 0]
|
||||
["", {}, {false}, 0, [], "", "", {false}, [], 0]
|
||||
};
|
||||
|
||||
(findDisplay 1713999) closeDisplay 1;
|
||||
@ -28,5 +28,5 @@ _exceptions = _action select 8;//
|
||||
_distance = _action select 9;
|
||||
|
||||
if ((_distance == 0 || {[GVAR(Target), _distance] call FUNC(isInRange)}) && {[_target, _player] call _condition} && {[_target, _player] call _conditionShow}) then {
|
||||
[_target, _player] call _statement;
|
||||
[_target, _player] call _statement;
|
||||
};
|
||||
|
@ -10,35 +10,35 @@ _count = count GVAR(Buttons);
|
||||
_index = _this;
|
||||
|
||||
_action = if (_index != -1 && {_index < _count}) then {
|
||||
GVAR(Buttons) select _index
|
||||
GVAR(Buttons) select _index
|
||||
} else {
|
||||
["", {}, {false}, 0, [], "", "", {false}, [], 0]
|
||||
["", {}, {false}, 0, [], "", "", {false}, [], 0]
|
||||
};
|
||||
|
||||
_subMenu = _action select 4;
|
||||
|
||||
// back
|
||||
if (_index == -1) exitWith {
|
||||
call GVAR(MainButton);
|
||||
call GVAR(MainButton);
|
||||
};
|
||||
|
||||
if (count _subMenu < 2) then {
|
||||
(findDisplay 1713999) closeDisplay 1;
|
||||
closeDialog 0;
|
||||
(findDisplay 1713999) closeDisplay 1;
|
||||
closeDialog 0;
|
||||
|
||||
_statement = _action select 1;
|
||||
_condition = _action select 2;
|
||||
_conditionShow = _action select 7;
|
||||
_exceptions = _action select 8;//
|
||||
_distance = _action select 9;
|
||||
_statement = _action select 1;
|
||||
_condition = _action select 2;
|
||||
_conditionShow = _action select 7;
|
||||
_exceptions = _action select 8;//
|
||||
_distance = _action select 9;
|
||||
|
||||
if ((_distance == 0 || {[GVAR(Target), _distance] call FUNC(isInRange)}) && {[_target, _player] call _condition} && {[_target, _player] call _conditionShow}) then {
|
||||
[_target, _player] call _statement;
|
||||
};
|
||||
if ((_distance == 0 || {[GVAR(Target), _distance] call FUNC(isInRange)}) && {[_target, _player] call _condition} && {[_target, _player] call _conditionShow}) then {
|
||||
[_target, _player] call _statement;
|
||||
};
|
||||
} else {
|
||||
if (_subMenu select 1 < 1) then {
|
||||
[_subMenu select 0] call FUNC(openSubMenu);
|
||||
} else {
|
||||
[_subMenu select 0] call FUNC(openSubMenuSelf);
|
||||
};
|
||||
if (_subMenu select 1 < 1) then {
|
||||
[_subMenu select 0] call FUNC(openSubMenu);
|
||||
} else {
|
||||
[_subMenu select 0] call FUNC(openSubMenuSelf);
|
||||
};
|
||||
};
|
||||
|
@ -18,40 +18,40 @@ _animations = _animations select 0;
|
||||
if (count _animations == 0) exitWith {};
|
||||
|
||||
if (_house animationPhase (_animations select 0) <= 0 && {_house getVariable [_lockedVariable select 0, 0] == 1}) exitWith {
|
||||
_lockedVariable set [0, _house];
|
||||
_lockedVariable spawn compile preprocessFileLineNumbers "\A3\Structures_F\scripts\LockedDoor_open.sqf";
|
||||
_lockedVariable set [0, _house];
|
||||
_lockedVariable spawn compile preprocessFileLineNumbers "\A3\Structures_F\scripts\LockedDoor_open.sqf";
|
||||
};
|
||||
|
||||
GVAR(isOpeningDoor) = true;
|
||||
playSound "ACE_Sound_Click";
|
||||
|
||||
[_house, _animations] spawn {
|
||||
_house = _this select 0;
|
||||
_animations = _this select 1;
|
||||
_house = _this select 0;
|
||||
_animations = _this select 1;
|
||||
|
||||
_phase = _house animationPhase (_animations select 0);
|
||||
_position = getPosASL ACE_player;
|
||||
_phase = _house animationPhase (_animations select 0);
|
||||
_position = getPosASL ACE_player;
|
||||
|
||||
_time = time + 0.2;
|
||||
_usedMouseWheel = false;
|
||||
waitUntil {
|
||||
if (inputAction "PrevAction" > 0 || {inputAction "NextAction" > 0}) then {
|
||||
_usedMouseWheel = true;
|
||||
};
|
||||
_time = time + 0.2;
|
||||
_usedMouseWheel = false;
|
||||
waitUntil {
|
||||
if (inputAction "PrevAction" > 0 || {inputAction "NextAction" > 0}) then {
|
||||
_usedMouseWheel = true;
|
||||
};
|
||||
|
||||
_phase = _phase + (inputAction "PrevAction" / 12) min 1;
|
||||
_phase = _phase - (inputAction "NextAction" / 12) max 0;
|
||||
_phase = _phase + (inputAction "PrevAction" / 12) min 1;
|
||||
_phase = _phase - (inputAction "NextAction" / 12) max 0;
|
||||
|
||||
{_house animate [_x, _phase]} forEach _animations;
|
||||
{_house animate [_x, _phase]} forEach _animations;
|
||||
|
||||
!GVAR(isOpeningDoor) || {getPosASL ACE_player distance _position > 1}
|
||||
};
|
||||
!GVAR(isOpeningDoor) || {getPosASL ACE_player distance _position > 1}
|
||||
};
|
||||
|
||||
if (!_usedMouseWheel && {time < _time} && {[ACE_player, objNull, []] call EFUNC(common,canInteractWith)}) then {
|
||||
_phase = [0, 1] select (_house animationPhase (_animations select 0) < 0.5);
|
||||
if (!_usedMouseWheel && {time < _time} && {[ACE_player, objNull, []] call EFUNC(common,canInteractWith)}) then {
|
||||
_phase = [0, 1] select (_house animationPhase (_animations select 0) < 0.5);
|
||||
|
||||
{_house animate [_x, _phase]} forEach _animations;
|
||||
};
|
||||
{_house animate [_x, _phase]} forEach _animations;
|
||||
};
|
||||
|
||||
GVAR(isOpeningDoor) = false;
|
||||
GVAR(isOpeningDoor) = false;
|
||||
};
|
||||
|
@ -1,43 +1,43 @@
|
||||
/*
|
||||
Author: Garth de Wet (LH)
|
||||
Author: Garth de Wet (LH)
|
||||
|
||||
Description:
|
||||
Opens the select menu UI and sets up the UI
|
||||
Description:
|
||||
Opens the select menu UI and sets up the UI
|
||||
|
||||
Parameters:
|
||||
0: ARRAY - items
|
||||
ARRAY
|
||||
0 = Text
|
||||
1 = statement to execute
|
||||
2 = condition before execute
|
||||
3 = showDisabled
|
||||
4 = priority
|
||||
5 = icon
|
||||
6 = extra variables. Passed to the code.
|
||||
1: Code - select action
|
||||
2: Code - Cancel Action
|
||||
Returns:
|
||||
Nothing
|
||||
Parameters:
|
||||
0: ARRAY - items
|
||||
ARRAY
|
||||
0 = Text
|
||||
1 = statement to execute
|
||||
2 = condition before execute
|
||||
3 = showDisabled
|
||||
4 = priority
|
||||
5 = icon
|
||||
6 = extra variables. Passed to the code.
|
||||
1: Code - select action
|
||||
2: Code - Cancel Action
|
||||
Returns:
|
||||
Nothing
|
||||
|
||||
Example:
|
||||
Example:
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!(profileNamespace getVariable [QGVAR(FlowMenu), false])) then {
|
||||
GVAR(SelectAccept) = _this select 1;
|
||||
GVAR(SelectCancel) = _this select 2;
|
||||
buttonSetAction [8855, QUOTE( call GVAR(SelectCancel); )]; // cancel
|
||||
buttonSetAction [8860, QUOTE( (call compile (lbData [ARR_2(8866, lbCurSel 8866)])) call GVAR(SelectAccept); )]; // accept
|
||||
lbSetCurSel [8866, 0];
|
||||
GVAR(SelectAccept) = _this select 1;
|
||||
GVAR(SelectCancel) = _this select 2;
|
||||
buttonSetAction [8855, QUOTE( call GVAR(SelectCancel); )]; // cancel
|
||||
buttonSetAction [8860, QUOTE( (call compile (lbData [ARR_2(8866, lbCurSel 8866)])) call GVAR(SelectAccept); )]; // accept
|
||||
lbSetCurSel [8866, 0];
|
||||
}else{
|
||||
_customActions = _this select 0;
|
||||
_count = count _customActions;
|
||||
if (_count == 0) exitWith {};
|
||||
_customActions call FUNC(sortOptionsByPriority);
|
||||
for "_i" from 0 to _count -1 do {
|
||||
_action = _customActions select _i;
|
||||
_action set [1, (_this select 1)];
|
||||
};
|
||||
GVAR(Buttons) = _customActions;
|
||||
[(_this select 2), true, true, false, ACE_player] call FUNC(initialiseInteraction);
|
||||
_customActions = _this select 0;
|
||||
_count = count _customActions;
|
||||
if (_count == 0) exitWith {};
|
||||
_customActions call FUNC(sortOptionsByPriority);
|
||||
for "_i" from 0 to _count -1 do {
|
||||
_action = _customActions select _i;
|
||||
_action set [1, (_this select 1)];
|
||||
};
|
||||
GVAR(Buttons) = _customActions;
|
||||
[(_this select 2), true, true, false, ACE_player] call FUNC(initialiseInteraction);
|
||||
};
|
||||
|
@ -1,18 +1,18 @@
|
||||
/*
|
||||
Author: Garth de Wet (LH)
|
||||
Author: Garth de Wet (LH)
|
||||
|
||||
Description:
|
||||
Prepares the select menu for use.
|
||||
Description:
|
||||
Prepares the select menu for use.
|
||||
|
||||
Parameters:
|
||||
0: TEXT - Header text
|
||||
1: TEXT - Approve button text
|
||||
Parameters:
|
||||
0: TEXT - Header text
|
||||
1: TEXT - Approve button text
|
||||
|
||||
Returns:
|
||||
ARRAY/NUMBER - container object for use with AddSelectableItem.
|
||||
Returns:
|
||||
ARRAY/NUMBER - container object for use with AddSelectableItem.
|
||||
|
||||
Example:
|
||||
["Select Explosive", "Place"] call FUNC(prepareSelectMenu);
|
||||
Example:
|
||||
["Select Explosive", "Place"] call FUNC(prepareSelectMenu);
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
@ -21,7 +21,7 @@ closeDialog 0;
|
||||
_header = _this select 0;
|
||||
_buttonText = _this select 1;
|
||||
if (isNil "_buttonText" or {_buttonText == ""}) then {
|
||||
_buttonText = localize "STR_ACE_Interaction_MakeSelection";
|
||||
_buttonText = localize "STR_ACE_Interaction_MakeSelection";
|
||||
};
|
||||
createDialog "RscACE_SelectAnItem";
|
||||
ctrlSetText [8860, _buttonText];
|
||||
|
@ -2,19 +2,19 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
0 spawn {
|
||||
waitUntil {player getVariable ["ACE_Name", ""] != ""};
|
||||
waitUntil {player getVariable ["ACE_Name", ""] != ""};
|
||||
|
||||
_name = player getVariable ["ACE_Name", ""];
|
||||
_name = toArray _name;
|
||||
_name = player getVariable ["ACE_Name", ""];
|
||||
_name = toArray _name;
|
||||
|
||||
_index = _name find (toArray "]" select 0);
|
||||
_index = _name find (toArray "]" select 0);
|
||||
|
||||
if (_index != -1) then {
|
||||
for "_index" from 0 to _index do {
|
||||
_name set [_index, -1];
|
||||
};
|
||||
_name = _name - [-1];
|
||||
_name = toString _name;
|
||||
player setVariable ["ACE_Name", _name, true];
|
||||
};
|
||||
if (_index != -1) then {
|
||||
for "_index" from 0 to _index do {
|
||||
_name set [_index, -1];
|
||||
};
|
||||
_name = _name - [-1];
|
||||
_name = toString _name;
|
||||
player setVariable ["ACE_Name", _name, true];
|
||||
};
|
||||
};
|
||||
|
@ -1,20 +1,20 @@
|
||||
/*
|
||||
Author(s):
|
||||
Garth de Wet (LH)
|
||||
Author(s):
|
||||
Garth de Wet (LH)
|
||||
|
||||
Description:
|
||||
Shows the interaction helper text with the mouse buttons at the bottom middle of the screen
|
||||
Description:
|
||||
Shows the interaction helper text with the mouse buttons at the bottom middle of the screen
|
||||
|
||||
Parameters:
|
||||
0: STRING - Left click text
|
||||
1: STRING - Right click text
|
||||
3: STRING - (Optional) Scroll text
|
||||
Parameters:
|
||||
0: STRING - Left click text
|
||||
1: STRING - Right click text
|
||||
3: STRING - (Optional) Scroll text
|
||||
|
||||
Returns:
|
||||
Nothing
|
||||
Returns:
|
||||
Nothing
|
||||
|
||||
Example:
|
||||
["Place Explosive", "Cancel"] call FUNC(showMouseHint);
|
||||
Example:
|
||||
["Place Explosive", "Cancel"] call FUNC(showMouseHint);
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
@ -25,7 +25,7 @@ _leftClick = _this select 0;
|
||||
_rightClick = _this select 1;
|
||||
_scroll = "";
|
||||
if (count _this > 2) then {
|
||||
_scroll = _this select 2;
|
||||
_scroll = _this select 2;
|
||||
};
|
||||
|
||||
(QGVAR(InteractionHelper) call BIS_fnc_rscLayer) cutRsc [QGVAR(InteractionHelper), "PLAIN",0.5, false];
|
||||
@ -42,13 +42,13 @@ if (isNull _display) exitWith{};
|
||||
(_display displayCtrl 1201) ctrlShow (_rightClick != "");
|
||||
|
||||
if (_scroll == "") exitWith {
|
||||
(_display displayCtrl 1002) ctrlShow false;
|
||||
(_display displayCtrl 1202) ctrlShow false;
|
||||
(_display displayCtrl 1002) ctrlShow false;
|
||||
(_display displayCtrl 1202) ctrlShow false;
|
||||
|
||||
(_display displayCtrl 1001) ctrlSetPosition [21 * GUI_GRID_W, 18 * GUI_GRID_H, 8 * GUI_GRID_W, 1.5 * GUI_GRID_H];
|
||||
(_display displayCtrl 1201) ctrlSetPosition [20 * GUI_GRID_W, 18.5 * GUI_GRID_H, 1 * GUI_GRID_W, 1 * GUI_GRID_H];
|
||||
(_display displayCtrl 1001) ctrlCommit 0;
|
||||
(_display displayCtrl 1201) ctrlCommit 0;
|
||||
(_display displayCtrl 1001) ctrlSetPosition [21 * GUI_GRID_W, 18 * GUI_GRID_H, 8 * GUI_GRID_W, 1.5 * GUI_GRID_H];
|
||||
(_display displayCtrl 1201) ctrlSetPosition [20 * GUI_GRID_W, 18.5 * GUI_GRID_H, 1 * GUI_GRID_W, 1 * GUI_GRID_H];
|
||||
(_display displayCtrl 1001) ctrlCommit 0;
|
||||
(_display displayCtrl 1201) ctrlCommit 0;
|
||||
};
|
||||
(_display displayCtrl 1002) ctrlSetText _scroll;
|
||||
showHUD false;
|
@ -8,14 +8,14 @@ _count = count _actions;
|
||||
_index = 0;
|
||||
|
||||
while {_index < _count - 1} do {
|
||||
_actionN = + _actions select _index;
|
||||
_actionM = + _actions select (_index + 1);
|
||||
_actionN = + _actions select _index;
|
||||
_actionM = + _actions select (_index + 1);
|
||||
|
||||
if (_actionN select 3 < _actionM select 3) then {
|
||||
_actions set [_index, _actionM];
|
||||
_actions set [_index + 1, _actionN];
|
||||
_index = 0;
|
||||
} else {
|
||||
_index = _index + 1;
|
||||
};
|
||||
if (_actionN select 3 < _actionM select 3) then {
|
||||
_actions set [_index, _actionM];
|
||||
_actions set [_index + 1, _actionN];
|
||||
_index = 0;
|
||||
} else {
|
||||
_index = _index + 1;
|
||||
};
|
||||
};
|
||||
|
@ -5,9 +5,9 @@ disableSerialization;
|
||||
_ctrl = ctrlParent (_this select 0) displayCtrl 40;
|
||||
|
||||
_ctrl ctrlSetPosition [
|
||||
(_this select 1) + 0.01 * safezoneW,
|
||||
(_this select 2) + 0.01 * safezoneH,
|
||||
2.0 / 16 * safezoneW,
|
||||
0.3 / 9 * safezoneH
|
||||
(_this select 1) + 0.01 * safezoneW,
|
||||
(_this select 2) + 0.01 * safezoneH,
|
||||
2.0 / 16 * safezoneW,
|
||||
0.3 / 9 * safezoneH
|
||||
];
|
||||
_ctrl ctrlCommit 0;
|
||||
|
@ -2,11 +2,11 @@
|
||||
#include "\z\ace\Addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_INTERACTION
|
||||
#define DEBUG_MODE_FULL
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_INTERACTION
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_INTERACTION
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_INTERACTION
|
||||
#endif
|
||||
|
||||
#include "\z\ace\Addons\main\script_macros.hpp"
|
@ -1,35 +1,35 @@
|
||||
#include "script_dialog_defines.hpp"
|
||||
|
||||
class ACE_ABOUT_DLG {
|
||||
idd = 114137;
|
||||
movingEnable = 0;
|
||||
onLoad = "with uiNameSpace do { ACE_ABOUT_DLG = _this select 0; };";
|
||||
onKeyDown = "if((_this select 1) == 1) then {ACE_ABOUT_STP = true;};";
|
||||
class controlsBackground {
|
||||
class Contents : RscStructuredText {
|
||||
idc = 1141371;
|
||||
colorBackground[] = { 0, 0, 0, 0 };
|
||||
__SX(0.45);
|
||||
__SY(0.25);
|
||||
__SW(0.45);
|
||||
__SH(0.6);
|
||||
size = "0.025 * SafeZoneH";
|
||||
class Attributes {
|
||||
font = "TahomaB";
|
||||
color = "#C8C8C8";
|
||||
align = "left";
|
||||
valign = "middle";
|
||||
shadow = true;
|
||||
shadowColor = "#191970";
|
||||
size = "1";
|
||||
};
|
||||
};
|
||||
class ACE_ABOUT_NEXT : ACE_ABOUT_CTRL { //dummy visible
|
||||
idc = 1141372;
|
||||
__SX(0.065);
|
||||
__SW(0.03);
|
||||
text = "";
|
||||
action = "";
|
||||
};
|
||||
}; //controlsBackground
|
||||
idd = 114137;
|
||||
movingEnable = 0;
|
||||
onLoad = "with uiNameSpace do { ACE_ABOUT_DLG = _this select 0; };";
|
||||
onKeyDown = "if((_this select 1) == 1) then {ACE_ABOUT_STP = true;};";
|
||||
class controlsBackground {
|
||||
class Contents : RscStructuredText {
|
||||
idc = 1141371;
|
||||
colorBackground[] = { 0, 0, 0, 0 };
|
||||
__SX(0.45);
|
||||
__SY(0.25);
|
||||
__SW(0.45);
|
||||
__SH(0.6);
|
||||
size = "0.025 * SafeZoneH";
|
||||
class Attributes {
|
||||
font = "TahomaB";
|
||||
color = "#C8C8C8";
|
||||
align = "left";
|
||||
valign = "middle";
|
||||
shadow = true;
|
||||
shadowColor = "#191970";
|
||||
size = "1";
|
||||
};
|
||||
};
|
||||
class ACE_ABOUT_NEXT : ACE_ABOUT_CTRL { //dummy visible
|
||||
idc = 1141372;
|
||||
__SX(0.065);
|
||||
__SW(0.03);
|
||||
text = "";
|
||||
action = "";
|
||||
};
|
||||
}; //controlsBackground
|
||||
};
|
||||
|
@ -1,8 +1,8 @@
|
||||
class CfgFactionClasses {
|
||||
class NO_CATEGORY;
|
||||
class ACE: NO_CATEGORY {
|
||||
displayName = "ACE";
|
||||
priority = 2;
|
||||
side = 7;
|
||||
};
|
||||
class NO_CATEGORY;
|
||||
class ACE: NO_CATEGORY {
|
||||
displayName = "ACE";
|
||||
priority = 2;
|
||||
side = 7;
|
||||
};
|
||||
};
|
@ -26,184 +26,184 @@ __cr_testers,
|
||||
];
|
||||
|
||||
_pkeynam = { //local function
|
||||
_shift = if (_shift > 0) then {42} else {0};
|
||||
_ctrl = if (_ctrl > 0) then {56} else {0};
|
||||
_alt = if (_alt > 0) then {29} else {0};
|
||||
_keys = [_shift,_ctrl,_alt,_key];
|
||||
_keystrg = "^";
|
||||
{
|
||||
_mod = _x in [42,56,29];
|
||||
_knaml = call compile format["format['%2',%1]",(keyName _x),"%1"];
|
||||
_knaml = [_knaml, " "] call CBA_fnc_split;
|
||||
_knam = "^";
|
||||
{_k = _x; if (!_mod || (_k != (localize "STR_ACE_KN_LEFT") && _k != (localize "STR_ACE_KN_RIGHT"))) then {_knam = _knam + " " + _k}} forEach _knaml;
|
||||
_knam = [_knam, "^ ", ""] call CBA_fnc_replace;
|
||||
_keystrg = _keystrg + "-" + _knam;
|
||||
} forEach _keys;
|
||||
_keystrg = [_keystrg, "^ ", ""] call CBA_fnc_replace;
|
||||
_keystrg = [_keystrg, "^-", ""] call CBA_fnc_replace;
|
||||
_keystrg = [_keystrg, "^", "None"] call CBA_fnc_replace;
|
||||
_keystrg
|
||||
_shift = if (_shift > 0) then {42} else {0};
|
||||
_ctrl = if (_ctrl > 0) then {56} else {0};
|
||||
_alt = if (_alt > 0) then {29} else {0};
|
||||
_keys = [_shift,_ctrl,_alt,_key];
|
||||
_keystrg = "^";
|
||||
{
|
||||
_mod = _x in [42,56,29];
|
||||
_knaml = call compile format["format['%2',%1]",(keyName _x),"%1"];
|
||||
_knaml = [_knaml, " "] call CBA_fnc_split;
|
||||
_knam = "^";
|
||||
{_k = _x; if (!_mod || (_k != (localize "STR_ACE_KN_LEFT") && _k != (localize "STR_ACE_KN_RIGHT"))) then {_knam = _knam + " " + _k}} forEach _knaml;
|
||||
_knam = [_knam, "^ ", ""] call CBA_fnc_replace;
|
||||
_keystrg = _keystrg + "-" + _knam;
|
||||
} forEach _keys;
|
||||
_keystrg = [_keystrg, "^ ", ""] call CBA_fnc_replace;
|
||||
_keystrg = [_keystrg, "^-", ""] call CBA_fnc_replace;
|
||||
_keystrg = [_keystrg, "^", "None"] call CBA_fnc_replace;
|
||||
_keystrg
|
||||
};
|
||||
_pkeys = {
|
||||
_pary = [];
|
||||
_tpages = [];
|
||||
_cEvents = configFile/"CfgSettings"/"CBA"/"events";
|
||||
for "_i" from 0 to (count _cEvents) - 1 do {
|
||||
_cSys = _cEvents select _i;
|
||||
_tSys = configName _cSys;
|
||||
if (isNumber ((_cSys select 0)/"key")) then {
|
||||
//format system name
|
||||
_aSys = [_tSys, "_"] call CBA_fnc_split;
|
||||
_tS = "^";
|
||||
{if (_x != "ace" && _x != "sys") then {_tS = _tS + " " + _x}} forEach _aSys;
|
||||
_tS = [_tS, "^ ", ""] call CBA_fnc_replace;
|
||||
_tS = format["<t color='#99cccc'>%1:</t>",_tS];
|
||||
PUSH(_pary,_tS);
|
||||
for "_j" from 0 to (count _cSys) - 1 do {
|
||||
_c = _cSys select _j;
|
||||
_tC = configName _c;
|
||||
_tC = [_tC, "_", " "] call CBA_fnc_replace;
|
||||
//key
|
||||
_key = getNumber (_c/"key");
|
||||
_shift = getNumber (_c/"shift");
|
||||
_ctrl = getNumber (_c/"ctrl");
|
||||
_alt = getNumber (_c/"alt");
|
||||
_keyn = [_key,_shift,_ctrl,_alt] call _pkeynam;
|
||||
_tC = format[" %1: %2",_tC,_keyn];
|
||||
PUSH(_pary,_tC);
|
||||
};
|
||||
};
|
||||
if (count _pary > 20) then { //split full page
|
||||
PUSH(_tpages,_pary);
|
||||
_pary = [];
|
||||
};
|
||||
};
|
||||
if (count _pary > 0) then { //partial page
|
||||
PUSH(_tpages,_pary);
|
||||
_pary = [];
|
||||
};
|
||||
_tpages
|
||||
_pary = [];
|
||||
_tpages = [];
|
||||
_cEvents = configFile/"CfgSettings"/"CBA"/"events";
|
||||
for "_i" from 0 to (count _cEvents) - 1 do {
|
||||
_cSys = _cEvents select _i;
|
||||
_tSys = configName _cSys;
|
||||
if (isNumber ((_cSys select 0)/"key")) then {
|
||||
//format system name
|
||||
_aSys = [_tSys, "_"] call CBA_fnc_split;
|
||||
_tS = "^";
|
||||
{if (_x != "ace" && _x != "sys") then {_tS = _tS + " " + _x}} forEach _aSys;
|
||||
_tS = [_tS, "^ ", ""] call CBA_fnc_replace;
|
||||
_tS = format["<t color='#99cccc'>%1:</t>",_tS];
|
||||
PUSH(_pary,_tS);
|
||||
for "_j" from 0 to (count _cSys) - 1 do {
|
||||
_c = _cSys select _j;
|
||||
_tC = configName _c;
|
||||
_tC = [_tC, "_", " "] call CBA_fnc_replace;
|
||||
//key
|
||||
_key = getNumber (_c/"key");
|
||||
_shift = getNumber (_c/"shift");
|
||||
_ctrl = getNumber (_c/"ctrl");
|
||||
_alt = getNumber (_c/"alt");
|
||||
_keyn = [_key,_shift,_ctrl,_alt] call _pkeynam;
|
||||
_tC = format[" %1: %2",_tC,_keyn];
|
||||
PUSH(_pary,_tC);
|
||||
};
|
||||
};
|
||||
if (count _pary > 20) then { //split full page
|
||||
PUSH(_tpages,_pary);
|
||||
_pary = [];
|
||||
};
|
||||
};
|
||||
if (count _pary > 0) then { //partial page
|
||||
PUSH(_tpages,_pary);
|
||||
_pary = [];
|
||||
};
|
||||
_tpages
|
||||
};
|
||||
|
||||
//pages (make sure each will fit within 24 lines, word wrap is on)
|
||||
switch(_menu) do {
|
||||
case "MAIN": { //note: not all scripting commands available on main menu (not compiled yet?)
|
||||
_fadet = 13;
|
||||
_page1 = _pcredits;
|
||||
};
|
||||
case "SING": {
|
||||
_fadet = 20; //fade time
|
||||
_color = [1,1,1,1];
|
||||
//_bcolor = [0,0,0,0.3];
|
||||
_page1 = _pcredits;
|
||||
_newpages = [] call _pkeys;
|
||||
_pstart = 2;
|
||||
_pcount = count _newpages;
|
||||
_pnext = _pstart + _pcount;
|
||||
};
|
||||
case "MULT": {
|
||||
_fadet = 20;
|
||||
_color = [1,1,1,1];
|
||||
//_bcolor = [0,0,0,0.3];
|
||||
_page1 = _pcredits;
|
||||
_newpages = [] call _pkeys;
|
||||
_pstart = 2;
|
||||
_pcount = count _newpages;
|
||||
_pnext = _pstart + _pcount;
|
||||
};
|
||||
default {};
|
||||
case "MAIN": { //note: not all scripting commands available on main menu (not compiled yet?)
|
||||
_fadet = 13;
|
||||
_page1 = _pcredits;
|
||||
};
|
||||
case "SING": {
|
||||
_fadet = 20; //fade time
|
||||
_color = [1,1,1,1];
|
||||
//_bcolor = [0,0,0,0.3];
|
||||
_page1 = _pcredits;
|
||||
_newpages = [] call _pkeys;
|
||||
_pstart = 2;
|
||||
_pcount = count _newpages;
|
||||
_pnext = _pstart + _pcount;
|
||||
};
|
||||
case "MULT": {
|
||||
_fadet = 20;
|
||||
_color = [1,1,1,1];
|
||||
//_bcolor = [0,0,0,0.3];
|
||||
_page1 = _pcredits;
|
||||
_newpages = [] call _pkeys;
|
||||
_pstart = 2;
|
||||
_pcount = count _newpages;
|
||||
_pnext = _pstart + _pcount;
|
||||
};
|
||||
default {};
|
||||
};
|
||||
|
||||
//main menu display
|
||||
if (typeName(_data select 0) == "DISPLAY") then {
|
||||
_display = _data select 0;
|
||||
_display = _data select 0;
|
||||
};
|
||||
|
||||
if (typeName(_data select 0) == "CONTROL") then {
|
||||
_control = _data select 0;
|
||||
_display = ctrlParent _control;
|
||||
_control = _data select 0;
|
||||
_display = ctrlParent _control;
|
||||
};
|
||||
|
||||
//dynamic pages
|
||||
_pnames = [];
|
||||
for "_x" from _pstart to _pnext - 1 do {
|
||||
_pnam = format ["_page%1",_x];
|
||||
PUSH(_pnames,_pnam);
|
||||
_pnam = format ["_page%1",_x];
|
||||
PUSH(_pnames,_pnam);
|
||||
};
|
||||
private _pnames;
|
||||
for "_x" from 0 to _pcount - 1 do {
|
||||
call compile format ["%1 = %2", _pnames select _x, _newpages select _x];
|
||||
call compile format ["%1 = %2", _pnames select _x, _newpages select _x];
|
||||
};
|
||||
|
||||
//get num pages
|
||||
_pages = 0;
|
||||
_run = true;
|
||||
while {_run} do {
|
||||
INC(_pages);
|
||||
if (isNil format ["_page%1", _pages]) exitWith {_pages = _pages - 1; _run = false};
|
||||
INC(_pages);
|
||||
if (isNil format ["_page%1", _pages]) exitWith {_pages = _pages - 1; _run = false};
|
||||
};
|
||||
|
||||
if (_pages > 0) then {
|
||||
//Dialog
|
||||
createDialog "ACE_ABOUT_DLG";
|
||||
_disp = uiNamespace getVariable "ACE_ABOUT_DLG";
|
||||
_ctrl = _disp displayCtrl 1141371;
|
||||
_next = _disp displayCtrl 1141372;
|
||||
//Dialog
|
||||
createDialog "ACE_ABOUT_DLG";
|
||||
_disp = uiNamespace getVariable "ACE_ABOUT_DLG";
|
||||
_ctrl = _disp displayCtrl 1141371;
|
||||
_next = _disp displayCtrl 1141372;
|
||||
|
||||
if (_pages > 1) then {_next ctrlSetText "Next"};
|
||||
if (_pages > 1) then {_next ctrlSetText "Next"};
|
||||
|
||||
_ctrl ctrlSetFade 1;
|
||||
_ctrl ctrlCommit 0;
|
||||
_ctrl ctrlSetFade 0;
|
||||
_ctrl ctrlCommit 3;
|
||||
_ctrl ctrlSetFade 1;
|
||||
_ctrl ctrlCommit 0;
|
||||
_ctrl ctrlSetFade 0;
|
||||
_ctrl ctrlCommit 3;
|
||||
|
||||
ACE_ABOUT_INC = 0;
|
||||
_input = { //local function
|
||||
_nesc = isNil "ACE_ABOUT_STP";
|
||||
if (_pages == 1) then {ACE_ABOUT_INC = 0}; //ignore special control
|
||||
_unset = (ACE_ABOUT_INC == 0) && ACE_ABOUT_RUN;
|
||||
if (_unset && _nesc) then {false} else {_fadet = _fadet + 5; true};
|
||||
};
|
||||
ACE_ABOUT_INC = 0;
|
||||
_input = { //local function
|
||||
_nesc = isNil "ACE_ABOUT_STP";
|
||||
if (_pages == 1) then {ACE_ABOUT_INC = 0}; //ignore special control
|
||||
_unset = (ACE_ABOUT_INC == 0) && ACE_ABOUT_RUN;
|
||||
if (_unset && _nesc) then {false} else {_fadet = _fadet + 5; true};
|
||||
};
|
||||
|
||||
//by default cycle
|
||||
for "_p" from 1 to _pages do {
|
||||
_text = "";
|
||||
_page = call compile format["_page%1",_p];
|
||||
_curPage = _p;
|
||||
{
|
||||
_text = _text + _x + "<br />";
|
||||
_ctrl ctrlSetStructuredText parseText _text;
|
||||
if (call _input) exitWith {_p = _pages};
|
||||
if (_x != "") then {uisleep 0.8};
|
||||
} forEach _page;
|
||||
};
|
||||
//by default cycle
|
||||
for "_p" from 1 to _pages do {
|
||||
_text = "";
|
||||
_page = call compile format["_page%1",_p];
|
||||
_curPage = _p;
|
||||
{
|
||||
_text = _text + _x + "<br />";
|
||||
_ctrl ctrlSetStructuredText parseText _text;
|
||||
if (call _input) exitWith {_p = _pages};
|
||||
if (_x != "") then {uisleep 0.8};
|
||||
} forEach _page;
|
||||
};
|
||||
|
||||
_run = true;
|
||||
while {if (isNil "ACE_ABOUT_STP") then {_run} else {false}} do {
|
||||
_ctrl ctrlSetFade 0;
|
||||
_ctrl ctrlCommit 0;
|
||||
if (!isNil "_color") then {_ctrl ctrlSetTextColor _color};
|
||||
if (!isNil "_bcolor") then {_ctrl ctrlSetBackgroundColor _bcolor};
|
||||
_run = true;
|
||||
while {if (isNil "ACE_ABOUT_STP") then {_run} else {false}} do {
|
||||
_ctrl ctrlSetFade 0;
|
||||
_ctrl ctrlCommit 0;
|
||||
if (!isNil "_color") then {_ctrl ctrlSetTextColor _color};
|
||||
if (!isNil "_bcolor") then {_ctrl ctrlSetBackgroundColor _bcolor};
|
||||
|
||||
_curPage = _curPage + ACE_ABOUT_INC;
|
||||
if (_curPage > _pages) then {_curPage = 1};
|
||||
if (_curPage <= 0) then {_curPage = 1};
|
||||
ACE_ABOUT_INC = 0;
|
||||
_curPage = _curPage + ACE_ABOUT_INC;
|
||||
if (_curPage > _pages) then {_curPage = 1};
|
||||
if (_curPage <= 0) then {_curPage = 1};
|
||||
ACE_ABOUT_INC = 0;
|
||||
|
||||
if (!ACE_ABOUT_RUN) then {ACE_ABOUT_RUN = true};
|
||||
if (!ACE_ABOUT_RUN) then {ACE_ABOUT_RUN = true};
|
||||
|
||||
_text = "";
|
||||
_page = call compile format ["_page%1",_curPage];
|
||||
{_text = _text + _x + "<br />"} forEach _page;
|
||||
_ctrl ctrlSetStructuredText parseText _text;
|
||||
_text = "";
|
||||
_page = call compile format ["_page%1",_curPage];
|
||||
{_text = _text + _x + "<br />"} forEach _page;
|
||||
_ctrl ctrlSetStructuredText parseText _text;
|
||||
|
||||
_ctrl ctrlSetFade 1;
|
||||
_ctrl ctrlCommit _fadet;
|
||||
_ctrl ctrlSetFade 1;
|
||||
_ctrl ctrlCommit _fadet;
|
||||
|
||||
_time = time + _fadet + 2;
|
||||
waitUntil{uisleep 1; _run = call _input; _faded = time > _time; (_run || _faded)};
|
||||
}; //while RUN
|
||||
_time = time + _fadet + 2;
|
||||
waitUntil{uisleep 1; _run = call _input; _faded = time > _time; (_run || _faded)};
|
||||
}; //while RUN
|
||||
};
|
||||
ACE_ABOUT_STP = Nil;
|
||||
ACE_ABOUT_RUN = Nil;
|
||||
|
@ -16,9 +16,9 @@ Waiver
|
||||
Public Domain — Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license.
|
||||
|
||||
Other Rights — In no way are any of the following rights affected by the license:
|
||||
- Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations;
|
||||
- The author's moral rights;
|
||||
- Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights.
|
||||
- Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations;
|
||||
- The author's moral rights;
|
||||
- Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights.
|
||||
|
||||
Notice — For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page.
|
||||
|
||||
|
@ -4,11 +4,11 @@
|
||||
// #define DEBUG_MODE_FULL
|
||||
|
||||
#ifdef DEBUG_ENABLED_CORE
|
||||
#define DEBUG_MODE_FULL
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_CORE
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_CORE
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_CORE
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
@ -1,38 +1,38 @@
|
||||
#define true 1
|
||||
#define false 0
|
||||
#define true 1
|
||||
#define false 0
|
||||
|
||||
#define private 0
|
||||
#define protected 1
|
||||
#define public 2
|
||||
#define private 0
|
||||
#define protected 1
|
||||
#define public 2
|
||||
|
||||
#define TEast 0
|
||||
#define TWest 1
|
||||
#define TGuerrila 2
|
||||
#define TCivilian 3
|
||||
#define TSideUnknown 4
|
||||
#define TEnemy 5
|
||||
#define TFriendly 6
|
||||
#define TLogic 7
|
||||
#define TEast 0
|
||||
#define TWest 1
|
||||
#define TGuerrila 2
|
||||
#define TCivilian 3
|
||||
#define TSideUnknown 4
|
||||
#define TEnemy 5
|
||||
#define TFriendly 6
|
||||
#define TLogic 7
|
||||
|
||||
#define VSoft 0
|
||||
#define VArmor 1
|
||||
#define VAir 2
|
||||
#define VSoft 0
|
||||
#define VArmor 1
|
||||
#define VAir 2
|
||||
|
||||
#define LockNo 0
|
||||
#define LockCadet 1
|
||||
#define LockYes 2
|
||||
#define LockNo 0
|
||||
#define LockCadet 1
|
||||
#define LockYes 2
|
||||
|
||||
#define ReadAndWrite 0
|
||||
#define ReadAndCreate 1
|
||||
#define ReadOnly 2
|
||||
#define ReadOnlyVerified 3
|
||||
#define ReadAndWrite 0
|
||||
#define ReadAndCreate 1
|
||||
#define ReadOnly 2
|
||||
#define ReadOnlyVerified 3
|
||||
|
||||
#define WeaponNoSlot 0 // dummy weapons
|
||||
#define WeaponSlotPrimary 1 // primary weapons
|
||||
#define WeaponSlotSecondary 16 // secondary weapons
|
||||
#define WeaponSlotItem 256 // items
|
||||
#define WeaponSlotBinocular 4096 // binocular
|
||||
#define WeaponHardMounted 65536
|
||||
#define WeaponNoSlot 0 // dummy weapons
|
||||
#define WeaponSlotPrimary 1 // primary weapons
|
||||
#define WeaponSlotSecondary 16 // secondary weapons
|
||||
#define WeaponSlotItem 256 // items
|
||||
#define WeaponSlotBinocular 4096 // binocular
|
||||
#define WeaponHardMounted 65536
|
||||
|
||||
#define CanSeeRadar 1
|
||||
#define CanSeeRye 2
|
||||
|
@ -33,14 +33,14 @@ PERFORMANCE COUNTERS SECTION
|
||||
#ifdef ENABLE_PERFORMANCE_COUNTERS
|
||||
#define CBA_fnc_addPerFrameHandler { _ret = [(_this select 0), (_this select 1), (_this select 2), #function] call CBA_fnc_addPerFrameHandler; if(isNil "ACE_PFH_COUNTER" ) then { ACE_PFH_COUNTER=[]; }; ACE_PFH_COUNTER pushBack [[_ret, __FILE__, __LINE__], [(_this select 0), (_this select 1), (_this select 2)]]; _ret }
|
||||
|
||||
#define CREATE_COUNTER(x) if(isNil "ACE_COUNTERS" ) then { ACE_COUNTERS=[]; }; GVAR(DOUBLES(x,counter))=[]; GVAR(DOUBLES(x,counter)) set[0, QUOTE(GVAR(DOUBLES(x,counter)))]; GVAR(DOUBLES(x,counter)) set[1, diag_tickTime]; ACE_COUNTERS pushBack GVAR(DOUBLES(x,counter));
|
||||
#define BEGIN_COUNTER(x) if(isNil QUOTE(GVAR(DOUBLES(x,counter)))) then { CREATE_COUNTER(x) }; GVAR(DOUBLES(x,counter)) set[2, diag_tickTime];
|
||||
#define END_COUNTER(x) GVAR(DOUBLES(x,counter)) pushBack [(GVAR(DOUBLES(x,counter)) select 2), diag_tickTime];
|
||||
#define CREATE_COUNTER(x) if(isNil "ACE_COUNTERS" ) then { ACE_COUNTERS=[]; }; GVAR(DOUBLES(x,counter))=[]; GVAR(DOUBLES(x,counter)) set[0, QUOTE(GVAR(DOUBLES(x,counter)))]; GVAR(DOUBLES(x,counter)) set[1, diag_tickTime]; ACE_COUNTERS pushBack GVAR(DOUBLES(x,counter));
|
||||
#define BEGIN_COUNTER(x) if(isNil QUOTE(GVAR(DOUBLES(x,counter)))) then { CREATE_COUNTER(x) }; GVAR(DOUBLES(x,counter)) set[2, diag_tickTime];
|
||||
#define END_COUNTER(x) GVAR(DOUBLES(x,counter)) pushBack [(GVAR(DOUBLES(x,counter)) select 2), diag_tickTime];
|
||||
|
||||
#define DUMP_COUNTERS ([__FILE__, __LINE__] call ACE_DUMPCOUNTERS_FNC)
|
||||
#define DUMP_COUNTERS ([__FILE__, __LINE__] call ACE_DUMPCOUNTERS_FNC)
|
||||
#else
|
||||
#define CREATE_COUNTER(x) /* disabled */
|
||||
#define BEGIN_COUNTER(x) /* disabled */
|
||||
#define END_COUNTER(x) /* disabled */
|
||||
#define DUMP_COUNTERS /* disabled */
|
||||
#define CREATE_COUNTER(x) /* disabled */
|
||||
#define BEGIN_COUNTER(x) /* disabled */
|
||||
#define END_COUNTER(x) /* disabled */
|
||||
#define DUMP_COUNTERS /* disabled */
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user