Merge remote-tracking branch 'origin/master' into allTheMissiles

This commit is contained in:
jaynus 2015-04-07 12:12:05 -07:00
commit 0c3b51c28b
175 changed files with 3440 additions and 3168 deletions

View File

@ -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"

View File

@ -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))];
};

View File

@ -73,6 +73,7 @@ PREP(getStringFromMissionSQM);
PREP(getTargetAzimuthAndInclination);
PREP(getTargetDistance);
PREP(getTargetObject);
PREP(getTurnedOnLights);
PREP(getTurretCommander);
PREP(getTurretConfigPath);
PREP(getTurretCopilot);
@ -111,6 +112,7 @@ PREP(isModLoaded);
PREP(isPlayer);
PREP(isTurnedOut);
PREP(letterToCode);
PREP(lightIntensityFromObject);
PREP(loadPerson);
PREP(loadPersonLocal);
PREP(loadSettingsFromProfile);
@ -189,6 +191,9 @@ PREP(getConfigGunner);
PREP(getConfigCommander);
PREP(getHitPoints);
PREP(getHitPointsWithSelections);
PREP(getReflectorsWithSelections);
PREP(getLightProperties);
PREP(getLightPropertiesWeapon);
PREP(getVehicleCrew);
// turrets

View File

@ -29,7 +29,7 @@ private "_index";
_index = _conditionNames find _conditionName;
if (_index == -1) then {
_index = count _conditionNames;
_index = count _conditionNames;
};
_conditionNames set [_index, _conditionName];

View File

@ -11,4 +11,4 @@
*/
#include "script_component.hpp"
sunOrMoon * sunOrMoon * (1 - overcast * 0.25) + (moonIntensity/5 min 1) * (1 - overcast)
(sunOrMoon * sunOrMoon * (1 - overcast * 0.25) + (moonIntensity/5) * (1 - overcast)) min 1

View File

@ -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;
};
};
};

View File

@ -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;
};
};

View File

@ -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)];
};

View File

@ -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);
_total = _total + _delta;
};
_iter = _iter + 1;
} forEach _counterEntry;
// 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) ];
};
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;
// 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) ];
};
} 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; };
diag_log text format["%1: %2s, delay=%3, handle=%4",(_x select 0), _delay, (_x select 3), (_x select 4)];
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)];
} 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;
//{

View File

@ -0,0 +1,63 @@
/*
* Author: commy2
* Read properties of given vehicles light.
*
* Arguments:
* 0: Object with lights (Object)
* 1: Light classname (String)
*
* Return Value:
* Stuff from config (Array)
*
*/
#include "script_component.hpp"
private ["_vehicle", "_light"];
_vehicle = _this select 0;
_light = _this select 1;
private "_config";
_config = configFile >> "CfgVehicles" >> typeOf _vehicle >> "Reflectors" >> _light;
private ["_intensity", "_position", "_direction", "_innerAngle", "_outerAngle"];
_intensity = getNumber (_config >> "intensity");
_position = getText (_config >> "position");
_direction = getText (_config >> "direction");
_innerAngle = getNumber (_config >> "innerAngle");
_outerAngle = getNumber (_config >> "outerAngle");
[_intensity, _position, _direction, _innerAngle, _outerAngle]
/*
class Reflectors
{
class Light_1
{
color[] = {1000,1000,1100};
ambient[] = {10,10,11};
intensity = 5;
size = 1;
innerAngle = 90;
outerAngle = 130;
coneFadeCoef = 2;
position = "Light_1_pos";
direction = "Light_1_dir";
hitpoint = "Light_1_hitpoint";
selection = "Light_1_hide";
useFlare = 1;
flareSize = 0.9;
flareMaxDistance = 85;
class Attenuation
{
start = 0;
constant = 0;
linear = 0;
quadratic = 0.9;
hardLimitStart = 40;
hardLimitEnd = 60;
};
};
};
*/

View File

@ -0,0 +1,58 @@
/*
* Author: commy2
* Read properties of given flashlight. @todo, Can weapons themselves still have flashlights (no attachment)?
*
* Arguments:
* 0: A flashlight (String)
*
* Return Value:
* Stuff from config (Array)
*
*/
#include "script_component.hpp"
private "_weapon";
_weapon = _this select 0;
private "_config";
_config = configFile >> "CfgWeapons" >> _weapon >> "ItemInfo" >> "FlashLight";
private ["_intensity", "_position", "_direction", "_innerAngle", "_outerAngle"];
_intensity = getNumber (_config >> "intensity");
_position = getText (_config >> "position");
_direction = getText (_config >> "direction");
_innerAngle = getNumber (_config >> "innerAngle");
_outerAngle = getNumber (_config >> "outerAngle");
[_intensity, _position, _direction, _innerAngle, _outerAngle]
/*
class FlashLight
{
color[] = {180,156,120};
ambient[] = {0.9,0.78,0.6};
intensity = 20;
size = 1;
innerAngle = 20;
outerAngle = 80;
coneFadeCoef = 5;
position = "flash dir";
direction = "flash";
useFlare = 1;
flareSize = 1.4;
flareMaxDistance = "100.0f";
dayLight = 0;
class Attenuation
{
start = 0.5;
constant = 0;
linear = 0;
quadratic = 1.1;
hardLimitStart = 20;
hardLimitEnd = 30;
};
scale[] = {0};
};
*/

View File

@ -0,0 +1,45 @@
/*
* Author: commy2
*
* Returns all lighting hitpoints of any vehicle.
* Note: These are actual selections that are affected by setHit and getHit, not getHitPointDamage or setHitpointDamage.
* They behave like having an armor value of 0.
*
* Arguments:
* 0: A vehicle, not the classname (Object)
*
* Return Value:
* The light names and selections (Array)
*/
#include "script_component.hpp"
private ["_vehicle", "_config", "_hitpoints", "_selections"];
_vehicle = _this select 0;
_config = configFile >> "CfgVehicles" >> typeOf _vehicle;
_hitpoints = [];
_selections = [];
// iterate through all parents
while {isClass _config} do {
private "_class";
_class = _config >> "Reflectors";
for "_i" from 0 to (count _class - 1) do {
private ["_entry", "_selection"];
_entry = _class select _i;
_selection = getText (_entry >> "hitpoint");
if (!(_selection in _selections) && {!isNil {_vehicle getHit _selection}}) then {
_hitpoints pushBack configName _entry;
_selections pushBack _selection;
};
};
_config = inheritsFrom _config;
};
[_hitPoints, _selections]

View File

@ -0,0 +1,36 @@
/*
* Author: commy2
*
* Returns all turned on lights of any vehicle or streetlamp.
*
* Arguments:
* 0: A vehicle, not the classname (Object)
*
* Return Value:
* All burning lights (Array)
*/
#include "script_component.hpp"
private "_vehicle";
_vehicle = _this select 0;
if (!isLightOn _vehicle) exitWith {[]};
private ["_reflectorsWithSelections", "_lights", "_hitpoints"];
_reflectorsWithSelections = [_vehicle] call FUNC(getReflectorsWithSelections);
_lights = _reflectorsWithSelections select 0;
_hitpoints = _reflectorsWithSelections select 1;
private "_turnedOnLights";
_turnedOnLights = [];
{
if (_vehicle getHit _x <= 0.9) then {
_turnedOnLights pushBack (_lights select _forEachIndex);
};
} forEach _hitpoints;
_turnedOnLights

View File

@ -0,0 +1,99 @@
/*
* Author: commy2
* Calculate light intensity object 1 recieves from object 2
*
* Arguments:
* 0: Object that recieves light (Object)
* 1: Object that emits light (Object)
*
* Return Value:
* Brightest light level
*
*/
#include "script_component.hpp"
private ["_unit", "_lightSource"];
_unit = _this select 0;
_lightSource = _this select 1;
private "_unitPos";
_unitPos = _unit modelToWorld (_unit selectionPosition "spine3");
private "_lightLevel";
_lightLevel = 0;
if (_lightSource isKindOf "CAManBase") then {
// handle persons with flashlights
private "_weapon";
_weapon = currentWeapon _lightSource;
if !(_lightSource isFlashlightOn _weapon) exitWith {};
private ["_flashlight", "_properties", "_intensity", "_innerAngle", "_outerAngle", "_position", "_direction", "_directionToUnit", "_distance", "_angle"];
_flashlight = switch (_weapon) do {
case (primaryWeapon _lightSource): {
primaryWeaponItems _lightSource select 1
};
case (secondaryWeapon _lightSource): {
secondaryWeaponItems _lightSource select 1
};
case (handgunWeapon _lightSource): {
handgunItems _lightSource select 1
};
default {""};
};
_properties = [_flashlight] call FUNC(getLightPropertiesWeapon);
_innerAngle = (_properties select 3) / 2;
_outerAngle = (_properties select 4) / 2;
_position = _lightSource modelToWorld (_lightSource selectionPosition "rightHand");
_direction = _lightSource weaponDirection _weapon;
_directionToUnit = _position vectorFromTo _unitPos;
_distance = _unitPos distance _position;
_angle = acos (_direction vectorDotProduct _directionToUnit);
_lightLevel = (linearConversion [0, 30, _distance, 1, 0, true]) * (linearConversion [_innerAngle, _outerAngle, _angle, 1, 0, true]);
} else {
// handle any object, strcutures, cars, tanks, etc.
private "_lights";
_lights = [_lightSource] call FUNC(getTurnedOnLights);
{
private ["_properties", "_intensity", "_innerAngle", "_outerAngle", "_position", "_direction", "_directionToUnit", "_distance", "_angle"];
_properties = [_lightSource, _x] call FUNC(getLightProperties);
// @todo intensity affects range?
//_intensity = _properties select 0;
_innerAngle = (_properties select 3) / 2;
_outerAngle = (_properties select 4) / 2;
// get world position and direction
_position = _lightSource modelToWorld (_lightSource selectionPosition (_properties select 1));
_direction = _lightSource modelToWorld (_lightSource selectionPosition (_properties select 2));
_direction = _position vectorFromTo _direction;
_directionToUnit = _position vectorFromTo _unitPos;
_distance = _unitPos distance _position;
_angle = acos (_direction vectorDotProduct _directionToUnit);
_lightLevel = _lightLevel max ((linearConversion [0, 30, _distance, 1, 0, true]) * (linearConversion [_innerAngle, _outerAngle, _angle, 1, 0, true]));
//systemChat format ["%1 %2", (linearConversion [0, 30, _distance, 1, 0, true]), (linearConversion [_innerAngle, _outerAngle, _angle, 1, 0, true])];
} forEach _lights;
};
_lightLevel

View File

@ -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;

View File

@ -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);
};
};

View File

@ -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);
};
};

View File

@ -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;\
};

View File

@ -296,25 +296,21 @@
<Hungarian>Nincs hang</Hungarian>
</Key>
<Key ID="STR_ACE_ACTION_ACCEPT_REQUEST_KEY_TITLE">
<Original>Accept Requests</Original>
<Polish>Akceptuj prośby</Polish>
<Spanish>Aceptar Peticiones</Spanish>
<English>Accept Requests</English>
</Key>
<Key ID="STR_ACE_ACTION_DECLINE_REQUEST_KEY_TITLE">
<Original>Decline Requests</Original>
<Polish>Ignoruj prośby</Polish>
<Spanish>Rechazar Peticiones</Spanish>
<English>Decline Requests</English>
</Key>
<Key ID="STR_ACE_ACTION_ACCEPT_REQUEST_KEY_TOOLTIP">
<Original>Accept Requests send by other players. These can be requests to use / share equipment, perform certain actions.</Original>
<Polish>Akceptuj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności.</Polish>
<Spanish>Acepta Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones.</Spanish>
<English>Accept Requests send by other players. These can be requests to use / share equipment, perform certain actions.</English>
</Key>
<Key ID="STR_ACE_ACTION_DECLINE_REQUEST_KEY_TOOLTIP">
<Original>Decline Requests send by other players. These can be requests to use / share equipment, perform certain actions.</Original>
<Polish>Ignoruj prośby wysłane przez innych graczy. Akceptacji wymagają między innymi akcje używania / współdzielenia wyposażenia, wykonywania określonych czynności.</Polish>
<Spanish>Rechazar Peticiones de otros jugadores. Pueden ser solicitudes para usar / compartir equipamiento, realizar ciertas acciones.</Spanish>
<English>Decline Requests send by other players. These can be requests to use / share equipment, perform certain actions.</English>

View File

@ -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"

View File

@ -1,20 +1,20 @@
/*
Name: AGM_Drag_fnc_GetWeight
Author(s):
L-H, edited by commy2
Name: AGM_Drag_fnc_GetWeight
Author(s):
L-H, edited by commy2
Description:
Returns the weight of a crate.
Parameters:
0: OBJECT - Crate to get weight of
Returns:
NUMBER - Weight
Example:
_weight = Crate1 call AGM_Drag_fnc_GetWeight;
Description:
Returns the weight of a crate.
Parameters:
0: OBJECT - Crate to get weight of
Returns:
NUMBER - Weight
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);
_weight
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
};
_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);
_weight
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
};
_totalWeight = ([getMagazineCargo _object, "CfgMagazines"] call _fnc);
_totalWeight = _totalWeight + ([getItemCargo _object, "CfgWeapons", "ItemInfo"] call _fnc_Extra);

View File

@ -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

View File

@ -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 {};

View File

@ -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 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 R_57mm_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 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 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 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_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_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_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_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_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_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_medium: ACE_frag_medium {
timeToLive = 0.15;
};
class ACE_frag_spall_large: ACE_frag_large {
timeToLive = 0.25;
};
class ACE_frag_spall_huge: ACE_frag_huge {
timeToLive = 0.3;
};
//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 RocketBase;
//class R_Hydra_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_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 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 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 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 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_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_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_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_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_spall_small: ACE_frag_small {
timeToLive = 0.1;
};
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_huge: ACE_frag_huge {
timeToLive = 0.3;
};
};

View File

@ -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));
};
};

View File

@ -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)
};
};
*/

View File

@ -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;

View File

@ -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);
};

View File

@ -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;
};

View File

@ -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;

View File

@ -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);
};

View File

@ -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;
_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];
// _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(_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;};
// 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;
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];
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(_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];
};
_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"
_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"
];
// 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,0,1]] call FUNC(addTrack);
};
};
};
};
];
// 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,0,1]] call FUNC(addTrack);
};
};
};
};
};

View File

@ -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);
};
_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"];
_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;
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);

View File

@ -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";
};

View File

@ -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;
};

View File

@ -10,43 +10,43 @@ 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;
_lastPos = _this select 1;
_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;
_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];
{
//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);
_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;
_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
];
_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)));
_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;
};
};
_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)];
_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))];
_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];
_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;

View File

@ -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

View File

@ -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 {
{
_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);
};
};
_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);
};
};
};

View File

@ -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;
};

View File

@ -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;
};

View File

@ -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;
};

View File

@ -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];
};
};
_params set[1, (getPosASL _round)];
_params set[2, (velocity _round)];
if(_doSpall) then {
[_round, 1, _spallTrack, _foundObjectHPIds] call FUNC(spallTrack);
};
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);
};
};

View File

@ -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;
};

View File

@ -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

View File

@ -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"

View File

@ -1,42 +1,42 @@
class RscTitles{
#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: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;
};
};
};
#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: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;
};
};
};
};

View File

@ -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;
};
};

View File

@ -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

View File

@ -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);

View File

@ -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);
};

View File

@ -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);
};
};
};

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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;
};
};

View File

@ -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;
};
};
};

View File

@ -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 "";
};

View File

@ -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 "";
};

View File

@ -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);

View File

@ -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;

View File

@ -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"

View File

@ -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]

View File

@ -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];

View File

@ -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 != "");

View File

@ -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 "";
};
};

View File

@ -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]

View File

@ -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"

View File

@ -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"

View File

@ -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
}

View File

@ -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);
};

View File

@ -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;
};

View File

@ -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);
};
};

View File

@ -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;
};

View File

@ -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);
};

View File

@ -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];

View File

@ -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];
};
};

View File

@ -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;

View File

@ -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;
};
};

View File

@ -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;

View File

@ -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"

View File

@ -1,6 +1,9 @@
// by commy2
#include "script_component.hpp"
// fixes laser when being captured. Needed, because the selectionpsoition of the right hand is used
["SetHandcuffed", {if (_this select 1) then {(_this select 0) action ["GunLightOff", _this select 0]};}] call EFUNC(common,addEventHandler);
if !(hasInterface) exitWith {};
GVAR(nearUnits) = [];

View File

@ -17,7 +17,6 @@
</Key>
<Key ID="STR_ACE_Laserpointer_useLaser">
<Original>&lt;t color='#9cf953'&gt;Use: &lt;/t&gt;Turn Laser ON/OFF</Original>
<English>&lt;t color='#9cf953'&gt;Use: &lt;/t&gt;Turn Laser ON/OFF</English>
<Czech>&lt;t color='#9cf953'&gt;Použití: &lt;/t&gt;Zapnout/vypnout laser</Czech>
<French>&lt;t color='#9cf953'&gt;Utiliser : &lt;/t&gt;laser on/off</French>

View File

@ -1,13 +0,0 @@
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_FILE(XEH_preInit));
};
};
class Extended_FiredBIS_EventHandlers {
class AllVehicles {
class ADDON {
firedBIS = QUOTE(_this call FUNC(forceMagazineMuzzleVelocity));
};
};
};

View File

@ -22,7 +22,6 @@ class CfgMagazines {
descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_mag_SDDescription";
picture = "\A3\weapons_f\data\ui\m_30stanag_caseless_green_CA.paa";
initSpeed = 320;
GVAR(forceMagazineMuzzleVelocity) = 1;
};
class ACE_30Rnd_65x39_caseless_mag_AP: 30Rnd_65x39_caseless_mag {
@ -58,7 +57,6 @@ class CfgMagazines {
displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_SDNameShort";
descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_SDDescription";
initSpeed = 320;
GVAR(forceMagazineMuzzleVelocity) = 1;
};
class ACE_30Rnd_65x39_caseless_green_mag_AP: 30Rnd_65x39_caseless_green {
@ -90,7 +88,6 @@ class CfgMagazines {
displayNameShort = "$STR_ACE_30Rnd_556x45_mag_SDNameShort";
descriptionShort = "$STR_ACE_30Rnd_556x45_mag_SDDescription";
initSpeed = 320;
GVAR(forceMagazineMuzzleVelocity) = 1;
picture = "\A3\weapons_f\data\ui\m_30stanag_green_ca.paa";
};
@ -130,7 +127,6 @@ class CfgMagazines {
displayNameShort = "$STR_ACE_20Rnd_762x51_mag_SDNameShort";
descriptionShort = "$STR_ACE_20Rnd_762x51_mag_SDDescription";
initSpeed = 320;
GVAR(forceMagazineMuzzleVelocity) = 1;
};
class ACE_20Rnd_762x51_Mag_AP: 20Rnd_762x51_Mag {

View File

@ -1,7 +0,0 @@
#include "script_component.hpp"
ADDON = false;
PREP(forceMagazineMuzzleVelocity);
ADDON = true;

View File

@ -12,8 +12,6 @@ class CfgPatches {
};
};
#include "CfgEventHandlers.hpp"
#include "CfgAmmo.hpp"
#include "CfgMagazines.hpp"
#include "CfgVehicles.hpp"

View File

@ -1,41 +0,0 @@
/*
* Author: commy2
*
* DESCRIPTION.
*
* Arguments:
* firedBIS
*
* Return Value:
* None
*/
#include "script_component.hpp"
private ["_weapon", "_magazine", "_projectile"];
_weapon = _this select 1;
_magazine = _this select 5;
_projectile = _this select 6;
if (getNumber (configFile >> "CfgMagazines" >> _magazine >> QGVAR(forceMagazineMuzzleVelocity)) != 1) exitWith {
//hint str (speed _projectile / 3.6);
};
private ["_initSpeedWeapon", "_initSpeedMagazine"];
_initSpeedWeapon = getNumber (configFile >> "CfgWeapons" >> _weapon >> "initSpeed");
_initSpeedMagazine = getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed");
//systemChat format ["W: %1m/s, M: %2m/s", _initSpeedWeapon, _initSpeedMagazine];
// force magazine initSpeed
private ["_credit", "_debit"];
_credit = vectorMagnitude velocity _projectile;
_debit = _credit + (_initSpeedMagazine - _initSpeedWeapon);
_projectile setVelocity ((velocity _projectile) vectorMultiply (_debit / _credit));
//hint str (speed _projectile / 3.6);

View File

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

View File

@ -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
};

View File

@ -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;
};
};

View File

@ -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;

View File

@ -16,10 +16,10 @@ 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.

View File

@ -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"

View File

@ -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

View File

@ -32,15 +32,15 @@ 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

View File

@ -43,7 +43,7 @@
#define ACE_ITEMS_CIVILIAN "ItemWatch"
#define ACE_DEFAULT_SLOTS "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072"
#define ACE_DEFAULT_SLOTS "1 + 4 + 12* 256 + 2* 4096 + 2 + 8* 16 + 12*131072"
#define ACE_NOGRIP handAnim[] = {}
#define ACE_DISTANCE_DEFAULT distanceZoomMin = 300; distanceZoomMax = 300
@ -51,30 +51,30 @@
// #include "script_macros_optics.hpp" //ToDo
#define ACE_NOZEROING discreteDistance[] = {}; \
discreteDistanceInitIndex = 0; \
weaponInfoType = "RscWeaponEmpty"
discreteDistanceInitIndex = 0; \
weaponInfoType = "RscWeaponEmpty"
#define ACE_NOTURRETZEROING discreteDistance[] = {}; \
discreteDistanceInitIndex = 0; \
turretInfoType = "RscWeaponEmpty"
discreteDistanceInitIndex = 0; \
turretInfoType = "RscWeaponEmpty"
#define ACE_LASER irLaserPos = "laser pos"; \
irLaserEnd = "laser dir"; \
irDistance = 300
irLaserEnd = "laser dir"; \
irDistance = 300
#define ACE_LASER_DISTANCE_VANILLA irDistance = 300
#define ACE_NOLASER irLaserPos = "laser pos"; \
irLaserEnd = "laser dir"; \
irDistance = 0
#define ACE_NOLASER irLaserPos = "laser pos"; \
irLaserEnd = "laser dir"; \
irDistance = 0
#define ACE_SUPPRESSED ace_suppressed = 1; \
fireLightDuration = 0; \
fireLightIntensity = 0
fireLightDuration = 0; \
fireLightIntensity = 0
// TODO: Cleanup in all the configs around
#define ACE_M_MAG(x,y) class _xx_##x {magazine = ##x; count = ##y;}
#define ACE_M_WEP(x,y) class _xx_##x {weapon = ##x; count = ##y;}
#define ACE_M_MAG(x,y) class _xx_##x {magazine = ##x; count = ##y;}
#define ACE_M_WEP(x,y) class _xx_##x {weapon = ##x; count = ##y;}
#define ACE_M_ITEM(x,y) class _xx_##x {name = ##x; count = ##y;}
#define ACE_M_BAG(x,y) class _xx_##x {backpack = ##x; count = ##y;}
@ -82,11 +82,11 @@
// Vehicle defines
// ACE_canBeLoad = This vehicle acts as transporter, i.e you can load stuff into it
// ACE_canBeCargo = This vehicle acts as cargo, i.e you can load this item into other vehicles
#define ACE_CARGO_FRONT ACE_canBeLoad = false; ACE_canBeCargo = true; ACE_canGear = false; ACE_canLoadFront = true
#define ACE_CARGO_ONLY ACE_canBeLoad = false; ACE_canBeCargo = true; ACE_canGear = false; ACE_canLoadFront = false
#define ACE_LOAD_ONLY ACE_canBeLoad = true; ACE_canBeCargo = false; ACE_canGear = false; ACE_canLoadFront = false
#define ACE_GEAR_ONLY ACE_canBeLoad = true; ACE_canBeCargo = false; ACE_canGear = true; ACE_canLoadFront = false
#define ACE_NOCARGOLOAD ACE_canBeLoad = false; ACE_canBeCargo = false; ACE_canGear = false; ACE_canLoadFront = false
#define ACE_CARGO_FRONT ACE_canBeLoad = false; ACE_canBeCargo = true; ACE_canGear = false; ACE_canLoadFront = true
#define ACE_CARGO_ONLY ACE_canBeLoad = false; ACE_canBeCargo = true; ACE_canGear = false; ACE_canLoadFront = false
#define ACE_LOAD_ONLY ACE_canBeLoad = true; ACE_canBeCargo = false; ACE_canGear = false; ACE_canLoadFront = false
#define ACE_GEAR_ONLY ACE_canBeLoad = true; ACE_canBeCargo = false; ACE_canGear = true; ACE_canLoadFront = false
#define ACE_NOCARGOLOAD ACE_canBeLoad = false; ACE_canBeCargo = false; ACE_canGear = false; ACE_canLoadFront = false
// Increased FOV for tank driver
// Increased Default US Tank driver optic
@ -134,32 +134,32 @@
#undef BWC_CONFIG
#define BWC_CONFIG(NAME) class NAME { \
units[] = {}; \
weapons[] = {}; \
requiredVersion = REQUIRED_VERSION; \
requiredAddons[] = {}; \
version = VERSION; \
ACE_BWC; \
units[] = {}; \
weapons[] = {}; \
requiredVersion = REQUIRED_VERSION; \
requiredAddons[] = {}; \
version = VERSION; \
ACE_BWC; \
}
#define ACE_FLASHLIGHT class FlashLight { \
color[] = {0.9, 0.9, 0.7, 0.9}; \
ambient[] = {0.1, 0.1, 0.1, 1.0}; \
position = "flash dir"; \
direction = "flash"; \
angle = 30; \
scale[] = {1, 1, 0.5}; \
brightness = 0.1; \
}
color[] = {0.9, 0.9, 0.7, 0.9}; \
ambient[] = {0.1, 0.1, 0.1, 1.0}; \
position = "flash dir"; \
direction = "flash"; \
angle = 30; \
scale[] = {1, 1, 0.5}; \
brightness = 0.1; \
}
#define ACE_SMALL_FLASHLIGHT class FlashLight { \
color[] = {0.9, 0.9, 0.7, 0.9}; \
ambient[] = {0.1, 0.1, 0.1, 1.0}; \
position = "flash dir"; \
direction = "flash"; \
angle = 20; \
scale[] = {0.9, 0.9, 0.4}; \
brightness = 0.09; \
}
color[] = {0.9, 0.9, 0.7, 0.9}; \
ambient[] = {0.1, 0.1, 0.1, 1.0}; \
position = "flash dir"; \
direction = "flash"; \
angle = 20; \
scale[] = {0.9, 0.9, 0.4}; \
brightness = 0.09; \
}
// Addaction defines for colored text
#define ACE_TEXT_ORANGE(Text) ("<t color='#ffa500'>" + ##Text + "</t>")
@ -172,8 +172,8 @@
#define EGVAR(module,var) TRIPLES(PREFIX,module,var)
#define QEGVAR(module,var) QUOTE(EGVAR(module,var))
#define DGVAR(varName) if(isNil "ACE_DEBUG_NAMESPACE") then { ACE_DEBUG_NAMESPACE = []; }; if(!(QUOTE(GVAR(varName)) in ACE_DEBUG_NAMESPACE)) then { PUSH(ACE_DEBUG_NAMESPACE, QUOTE(GVAR(varName))); }; GVAR(varName)
#define DVAR(varName) if(isNil "ACE_DEBUG_NAMESPACE") then { ACE_DEBUG_NAMESPACE = []; }; if(!(QUOTE(varName) in ACE_DEBUG_NAMESPACE)) then { PUSH(ACE_DEBUG_NAMESPACE, QUOTE(varName)); }; varName
#define DGVAR(varName) if(isNil "ACE_DEBUG_NAMESPACE") then { ACE_DEBUG_NAMESPACE = []; }; if(!(QUOTE(GVAR(varName)) in ACE_DEBUG_NAMESPACE)) then { PUSH(ACE_DEBUG_NAMESPACE, QUOTE(GVAR(varName))); }; GVAR(varName)
#define DVAR(varName) if(isNil "ACE_DEBUG_NAMESPACE") then { ACE_DEBUG_NAMESPACE = []; }; if(!(QUOTE(varName) in ACE_DEBUG_NAMESPACE)) then { PUSH(ACE_DEBUG_NAMESPACE, QUOTE(varName)); }; varName
#define DFUNC(var1) TRIPLES(ADDON,fnc,var1)
#define DEFUNC(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)
@ -223,23 +223,23 @@
#ifdef DISABLE_COMPILE_CACHE
#define PREP(fncName) DFUNC(fncName) = compile preprocessFileLineNumbers QUOTE(PATHTOF(functions\DOUBLES(fnc,fncName).sqf))
#define PREP(fncName) DFUNC(fncName) = compile preprocessFileLineNumbers QUOTE(PATHTOF(functions\DOUBLES(fnc,fncName).sqf))
#else
#define PREP(fncName) DFUNC(fncName) = QUOTE(PATHTOF(functions\DOUBLES(fnc,fncName).sqf)) call SLX_XEH_COMPILE
#define PREP(fncName) DFUNC(fncName) = QUOTE(PATHTOF(functions\DOUBLES(fnc,fncName).sqf)) call SLX_XEH_COMPILE
#endif
#define PREP_MODULE(folder) [] call compile preprocessFileLineNumbers QUOTE(PATHTOF(folder\__PREP__.sqf))
#define HASH_CREATE ([] call EFUNC(common,hashCreate))
#define HASH_SET(hash, key, val) ([hash, key, val, __FILE__, __LINE__] call EFUNC(common,hashSet))
#define HASH_GET(hash, key) ([hash, key, __FILE__, __LINE__] call EFUNC(common,hashGet))
#define HASH_REM(hash, key) ([hash, key, __FILE__, __LINE__] call EFUNC(common,hashRem))
#define HASH_HASKEY(hash, key) ([hash, key, __FILE__, __LINE__] call EFUNC(common,hashHasKey))
#define HASH_CREATE ([] call EFUNC(common,hashCreate))
#define HASH_SET(hash, key, val) ([hash, key, val, __FILE__, __LINE__] call EFUNC(common,hashSet))
#define HASH_GET(hash, key) ([hash, key, __FILE__, __LINE__] call EFUNC(common,hashGet))
#define HASH_REM(hash, key) ([hash, key, __FILE__, __LINE__] call EFUNC(common,hashRem))
#define HASH_HASKEY(hash, key) ([hash, key, __FILE__, __LINE__] call EFUNC(common,hashHasKey))
#define HASHLIST_CREATELIST(keys) ([keys] call EFUNC(common,hashListCreateList))
#define HASHLIST_CREATEHASH(hashList) ([hashList] call EFUNC(common,hashListCreateHash))
#define HASHLIST_SELECT(hashList, index) ([hashList, index, __FILE__, __LINE__] call EFUNC(common,hashListSelect))
#define HASHLIST_SET(hashList, index, value) ([hashList, index, value, __FILE__, __LINE__] call EFUNC(common,hashListSet))
#define HASHLIST_PUSH(hashList, value) ([hashList, value, __FILE__, __LINE__] call EFUNC(common,hashListPush))
#define HASHLIST_CREATELIST(keys) ([keys] call EFUNC(common,hashListCreateList))
#define HASHLIST_CREATEHASH(hashList) ([hashList] call EFUNC(common,hashListCreateHash))
#define HASHLIST_SELECT(hashList, index) ([hashList, index, __FILE__, __LINE__] call EFUNC(common,hashListSelect))
#define HASHLIST_SET(hashList, index, value) ([hashList, index, value, __FILE__, __LINE__] call EFUNC(common,hashListSet))
#define HASHLIST_PUSH(hashList, value) ([hashList, value, __FILE__, __LINE__] call EFUNC(common,hashListPush))
#include "script_debug.hpp"

View File

@ -17,39 +17,39 @@
#define REQUIRED_VERSION 0.5
/*
#define DEBUG_ENABLED_ADDONS
#define DEBUG_ENABLED_ATTACHMENTS
#define DEBUG_ENABLED_weapons_backblast
#define DEBUG_ENABLED_BLOOD
#define DEBUG_ENABLED_CARTRIDGES
#define DEBUG_ENABLED_CRATERS
#define DEBUG_ENABLED_CREWPROTECTION
#define DEBUG_ENABLED_DUMMIES
#define DEBUG_ENABLED_EJECT
#define DEBUG_ENABLED_EXPLOSIVES
#define DEBUG_ENABLED_FLARES
#define DEBUG_ENABLED_FLASHBANG
#define DEBUG_ENABLED_GRENADETHROW
#define DEBUG_ENABLED_HUNTIR
#define DEBUG_ENABLED_INTERACTION
#define DEBUG_ENABLED_IRSTROBE
#define DEBUG_ENABLED_MULTI_BARREL
#define DEBUG_ENABLED_MUZZLEBLAST
#define DEBUG_ENABLED_NVG
#define DEBUG_ENABLED_weapons_overheating
#define DEBUG_ENABLED_RECOILDUST
#define DEBUG_ENABLED_ROCKET_BALLISTICS
#define DEBUG_ENABLED_SANDBAG
#define DEBUG_ENABLED_SHOTGUN
#define DEBUG_ENABLED_SIGHT_ADJUSTMENT_AT
#define DEBUG_ENABLED_SIGHT_ADJUSTMENT_GL
#define DEBUG_ENABLED_SIGHT_ADJUSTMENT_RIFLE
#define DEBUG_ENABLED_SMAW_SPOTTINGRIFLE
#define DEBUG_ENABLED_TRACERS
#define DEBUG_ENABLED_TRACKING
#define DEBUG_ENABLED_VIEWBLOCK
#define DEBUG_ENABLED_VEHICLE
#define DEBUG_ENABLED_vehicle_damage
#define DEBUG_ENABLED_WEAPONREST
#define DEBUG_ENABLED_WOUNDS
#define DEBUG_ENABLED_ADDONS
#define DEBUG_ENABLED_ATTACHMENTS
#define DEBUG_ENABLED_weapons_backblast
#define DEBUG_ENABLED_BLOOD
#define DEBUG_ENABLED_CARTRIDGES
#define DEBUG_ENABLED_CRATERS
#define DEBUG_ENABLED_CREWPROTECTION
#define DEBUG_ENABLED_DUMMIES
#define DEBUG_ENABLED_EJECT
#define DEBUG_ENABLED_EXPLOSIVES
#define DEBUG_ENABLED_FLARES
#define DEBUG_ENABLED_FLASHBANG
#define DEBUG_ENABLED_GRENADETHROW
#define DEBUG_ENABLED_HUNTIR
#define DEBUG_ENABLED_INTERACTION
#define DEBUG_ENABLED_IRSTROBE
#define DEBUG_ENABLED_MULTI_BARREL
#define DEBUG_ENABLED_MUZZLEBLAST
#define DEBUG_ENABLED_NVG
#define DEBUG_ENABLED_weapons_overheating
#define DEBUG_ENABLED_RECOILDUST
#define DEBUG_ENABLED_ROCKET_BALLISTICS
#define DEBUG_ENABLED_SANDBAG
#define DEBUG_ENABLED_SHOTGUN
#define DEBUG_ENABLED_SIGHT_ADJUSTMENT_AT
#define DEBUG_ENABLED_SIGHT_ADJUSTMENT_GL
#define DEBUG_ENABLED_SIGHT_ADJUSTMENT_RIFLE
#define DEBUG_ENABLED_SMAW_SPOTTINGRIFLE
#define DEBUG_ENABLED_TRACERS
#define DEBUG_ENABLED_TRACKING
#define DEBUG_ENABLED_VIEWBLOCK
#define DEBUG_ENABLED_VEHICLE
#define DEBUG_ENABLED_vehicle_damage
#define DEBUG_ENABLED_WEAPONREST
#define DEBUG_ENABLED_WOUNDS
*/

View File

@ -2,11 +2,11 @@
#include "\z\ace\Addons\main\script_mod.hpp"
#ifdef DEBUG_ENABLED_MAP
#define DEBUG_MODE_FULL
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_MAP
#define DEBUG_SETTINGS DEBUG_SETTINGS_MAP
#define DEBUG_SETTINGS DEBUG_SETTINGS_MAP
#endif
#include "\z\ace\Addons\main\script_macros.hpp"

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