mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into fix-c4996
Conflicts: extensions/clipboard/ace_clipboard.cpp
This commit is contained in:
commit
b52c1c8ce3
@ -1,7 +1,7 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = crlf
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
|
4
.gitattributes
vendored
Normal file
4
.gitattributes
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
* text=auto
|
||||
*.png binary
|
||||
*.jpg binary
|
||||
*.paa binary
|
18
.gitignore
vendored
18
.gitignore
vendored
@ -1,9 +1,9 @@
|
||||
release/*
|
||||
tools/temp
|
||||
*.cache
|
||||
*.pbo
|
||||
texHeaders.bin
|
||||
*.swp
|
||||
*.swo
|
||||
*.biprivatekey
|
||||
Thumbs.db
|
||||
release/*
|
||||
tools/temp
|
||||
*.cache
|
||||
*.pbo
|
||||
texHeaders.bin
|
||||
*.swp
|
||||
*.swo
|
||||
*.biprivatekey
|
||||
Thumbs.db
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@ -6,8 +6,8 @@ class CfgPatches {
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_main"};
|
||||
author = "Bohemia Interactive";
|
||||
url = ECSTRING(main,URL);
|
||||
author = "Bohemia Interactive";
|
||||
url = ECSTRING(main,URL);
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
uiNamespace setVariable ['ATragMX_Display', nil];
|
||||
GVAR(active) = false;
|
||||
#include "script_component.hpp"
|
||||
|
||||
uiNamespace setVariable ['ATragMX_Display', nil];
|
||||
GVAR(active) = false;
|
||||
[GVAR(DialogPFH)] call CBA_fnc_removePerFrameHandler;
|
File diff suppressed because it is too large
Load Diff
@ -60,6 +60,7 @@ PREP(getFirstTerrainIntersection);
|
||||
PREP(getForceWalkStatus);
|
||||
PREP(getGunner);
|
||||
PREP(getInPosition);
|
||||
PREP(getMapData);
|
||||
PREP(getMapGridData);
|
||||
PREP(getMapGridFromPos);
|
||||
PREP(getMapPosFromGrid);
|
||||
|
@ -1,25 +1,25 @@
|
||||
/*
|
||||
* Author: jaynus
|
||||
* Handles a server-side request for synchronization ALL events on JIP to a client.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: client <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Event is successed <BOOL>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_client"];
|
||||
|
||||
{
|
||||
private _eventEntry = HASH_GET(GVAR(syncedEvents),_x);
|
||||
_eventEntry params ["", "_eventLog"];
|
||||
|
||||
["ACEs", [_x, _eventLog], _client] call CBA_fnc_targetEvent;
|
||||
false
|
||||
} count (GVAR(syncedEvents) select 0);
|
||||
|
||||
true
|
||||
/*
|
||||
* Author: jaynus
|
||||
* Handles a server-side request for synchronization ALL events on JIP to a client.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: client <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Event is successed <BOOL>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_client"];
|
||||
|
||||
{
|
||||
private _eventEntry = HASH_GET(GVAR(syncedEvents),_x);
|
||||
_eventEntry params ["", "_eventLog"];
|
||||
|
||||
["ACEs", [_x, _eventLog], _client] call CBA_fnc_targetEvent;
|
||||
false
|
||||
} count (GVAR(syncedEvents) select 0);
|
||||
|
||||
true
|
||||
|
@ -1,48 +1,48 @@
|
||||
/*
|
||||
* Author: jaynus
|
||||
* Receives either requests for synchronization from clients, or the synchronization data from the server.
|
||||
*
|
||||
* Arguments [Client] :
|
||||
* 0: eventName <STRING>
|
||||
* 1: eventLog <ARRAY>
|
||||
*
|
||||
* Arguments [Server] :
|
||||
* 0: eventName <STRING>
|
||||
* 1: client <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Event is successed <BOOL>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
//SEH_s
|
||||
if (isServer) then {
|
||||
// Find the event name, and shovel out the events to the client
|
||||
params ["_eventName", "_client"];
|
||||
|
||||
if (!HASH_HASKEY(GVAR(syncedEvents),_eventName)) exitWith {
|
||||
ACE_LOGERROR_1("Request for synced event - key [%1] not found.", _eventName);
|
||||
false
|
||||
};
|
||||
|
||||
private _eventEntry = HASH_GET(GVAR(syncedEvents),_eventName);
|
||||
_eventEntry params ["", "_eventLog"];
|
||||
|
||||
["ACEs", [_eventName, _eventLog], _client] call CBA_fnc_targetEvent;
|
||||
} else {
|
||||
params ["_eventName", "_eventLog"];
|
||||
|
||||
// This is the client handling the response from the server
|
||||
// Start running the events
|
||||
{
|
||||
_x params ["", "_eventArgs","_ttl"];
|
||||
[_eventName, _eventArgs, _ttl] call FUNC(_handleSyncedEvent);
|
||||
false
|
||||
} count _eventLog;
|
||||
|
||||
ACE_LOGINFO_1("[%1] synchronized",_eventName);
|
||||
};
|
||||
|
||||
true
|
||||
/*
|
||||
* Author: jaynus
|
||||
* Receives either requests for synchronization from clients, or the synchronization data from the server.
|
||||
*
|
||||
* Arguments [Client] :
|
||||
* 0: eventName <STRING>
|
||||
* 1: eventLog <ARRAY>
|
||||
*
|
||||
* Arguments [Server] :
|
||||
* 0: eventName <STRING>
|
||||
* 1: client <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Event is successed <BOOL>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
//SEH_s
|
||||
if (isServer) then {
|
||||
// Find the event name, and shovel out the events to the client
|
||||
params ["_eventName", "_client"];
|
||||
|
||||
if (!HASH_HASKEY(GVAR(syncedEvents),_eventName)) exitWith {
|
||||
ACE_LOGERROR_1("Request for synced event - key [%1] not found.", _eventName);
|
||||
false
|
||||
};
|
||||
|
||||
private _eventEntry = HASH_GET(GVAR(syncedEvents),_eventName);
|
||||
_eventEntry params ["", "_eventLog"];
|
||||
|
||||
["ACEs", [_eventName, _eventLog], _client] call CBA_fnc_targetEvent;
|
||||
} else {
|
||||
params ["_eventName", "_eventLog"];
|
||||
|
||||
// This is the client handling the response from the server
|
||||
// Start running the events
|
||||
{
|
||||
_x params ["", "_eventArgs","_ttl"];
|
||||
[_eventName, _eventArgs, _ttl] call FUNC(_handleSyncedEvent);
|
||||
false
|
||||
} count _eventLog;
|
||||
|
||||
ACE_LOGINFO_1("[%1] synchronized",_eventName);
|
||||
};
|
||||
|
||||
true
|
||||
|
@ -1,37 +1,37 @@
|
||||
/*
|
||||
* Author: jaynus
|
||||
* Handles synced events being received. Server will log them, and server/client will execute them.
|
||||
*
|
||||
* Arguments [Client] :
|
||||
* 0: eventName <STRING>
|
||||
* 1: arguments <ARRAY>
|
||||
* 2: ttl <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean of success <BOOL>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_name", "_args", "_ttl"];
|
||||
|
||||
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||
ACE_LOGERROR_1("Synced event key [%1] not found (_handleSyncedEvent).", _name);
|
||||
false
|
||||
};
|
||||
|
||||
private _internalData = HASH_GET(GVAR(syncedEvents),_name);
|
||||
|
||||
if (isServer) then {
|
||||
// Server needs to internally log it for synchronization
|
||||
if (_ttl > -1) then {
|
||||
_internalData = HASH_GET(GVAR(syncedEvents),_name);
|
||||
|
||||
_internalData params ["", "_eventLog"];
|
||||
_eventLog pushBack [diag_tickTime, _args, _ttl];
|
||||
};
|
||||
};
|
||||
|
||||
_internalData params ["_eventCode"];
|
||||
_args call _eventCode;
|
||||
/*
|
||||
* Author: jaynus
|
||||
* Handles synced events being received. Server will log them, and server/client will execute them.
|
||||
*
|
||||
* Arguments [Client] :
|
||||
* 0: eventName <STRING>
|
||||
* 1: arguments <ARRAY>
|
||||
* 2: ttl <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean of success <BOOL>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_name", "_args", "_ttl"];
|
||||
|
||||
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||
ACE_LOGERROR_1("Synced event key [%1] not found (_handleSyncedEvent).", _name);
|
||||
false
|
||||
};
|
||||
|
||||
private _internalData = HASH_GET(GVAR(syncedEvents),_name);
|
||||
|
||||
if (isServer) then {
|
||||
// Server needs to internally log it for synchronization
|
||||
if (_ttl > -1) then {
|
||||
_internalData = HASH_GET(GVAR(syncedEvents),_name);
|
||||
|
||||
_internalData params ["", "_eventLog"];
|
||||
_eventLog pushBack [diag_tickTime, _args, _ttl];
|
||||
};
|
||||
};
|
||||
|
||||
_internalData params ["_eventCode"];
|
||||
_args call _eventCode;
|
||||
|
@ -1,14 +1,14 @@
|
||||
#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_eventName", "_eventCode"];
|
||||
|
||||
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||
if (_newName != "") then {
|
||||
TRACE_2("Switching Names",_eventName,_newName);
|
||||
_eventName = _newName;
|
||||
};
|
||||
|
||||
[_eventName, _eventCode] call CBA_fnc_addEventHandler;
|
||||
|
||||
ACE_DEPRECATED("ace_common_fnc_addEventHandler","3.8.0","CBA_fnc_addEventHandler");
|
||||
#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_eventName", "_eventCode"];
|
||||
|
||||
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||
if (_newName != "") then {
|
||||
TRACE_2("Switching Names",_eventName,_newName);
|
||||
_eventName = _newName;
|
||||
};
|
||||
|
||||
[_eventName, _eventCode] call CBA_fnc_addEventHandler;
|
||||
|
||||
ACE_DEPRECATED("ace_common_fnc_addEventHandler","3.8.0","CBA_fnc_addEventHandler");
|
||||
|
@ -1,30 +1,30 @@
|
||||
/*
|
||||
* Author: jaynus
|
||||
* Register an event handler for an ACE synced event
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Name <STRING>
|
||||
* 1: Handler <CODE>
|
||||
* 2: TTL (optional: 0) <NUMBER, CODE>
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean of success <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* ["myEvent", {_this call x}, 0] call ace_common_fnc_addSyncedEventHandler
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_name", "_handler", ["_ttl", 0]];
|
||||
|
||||
if (HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||
ACE_LOGERROR_1("Duplicate synced event [%1] creation.",_name);
|
||||
false
|
||||
};
|
||||
|
||||
private _eventId = [_name, FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler;
|
||||
private _data = [_handler, [], _ttl, _eventId];
|
||||
|
||||
HASH_SET(GVAR(syncedEvents),_name,_data);
|
||||
/*
|
||||
* Author: jaynus
|
||||
* Register an event handler for an ACE synced event
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Name <STRING>
|
||||
* 1: Handler <CODE>
|
||||
* 2: TTL (optional: 0) <NUMBER, CODE>
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean of success <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* ["myEvent", {_this call x}, 0] call ace_common_fnc_addSyncedEventHandler
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_name", "_handler", ["_ttl", 0]];
|
||||
|
||||
if (HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||
ACE_LOGERROR_1("Duplicate synced event [%1] creation.",_name);
|
||||
false
|
||||
};
|
||||
|
||||
private _eventId = [_name, FUNC(_handleSyncedEvent)] call CBA_fnc_addEventHandler;
|
||||
private _data = [_handler, [], _ttl, _eventId];
|
||||
|
||||
HASH_SET(GVAR(syncedEvents),_name,_data);
|
||||
|
@ -44,6 +44,6 @@ if (typeName _text != "TEXT") then {
|
||||
_text = parseText format ["<t align='center'>%1</t>", _text];
|
||||
};
|
||||
|
||||
_text = composeText [parseText format ["<img size='2' align='center' color='%2' image='%1'/>", _image, _imageColor call BIS_fnc_colorRGBtoHTML], lineBreak, _text];
|
||||
_text = composeText [parseText format ["<img size='2' align='center' color='%2' image='%1'/>", _image, _imageColor call BIS_fnc_colorRGBtoHTML], lineBreak, _text];
|
||||
|
||||
[_text, _size] call FUNC(displayTextStructured);
|
||||
|
@ -1,44 +1,44 @@
|
||||
/*
|
||||
* Author: ?
|
||||
* Dumps an array to the RPT, showing the depth of each element.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Array to be dumped <ARRAY>
|
||||
* 1: Depth <NUMBER><OPTIONAL>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [[0, [1,2], [[3]]]] call ace_common_fnc_dumpArray
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_var", ["_depth", 0, [0]]];
|
||||
|
||||
private _pad = "";
|
||||
|
||||
for "_i" from 0 to _depth do {
|
||||
_pad = _pad + toString [9];
|
||||
};
|
||||
|
||||
_depth = _depth + 1;
|
||||
|
||||
if (IS_ARRAY(_var)) then {
|
||||
if (_var isEqualTo []) then {
|
||||
diag_log text format ["%1[],", _pad];
|
||||
} else {
|
||||
diag_log text format ["%1[", _pad];
|
||||
|
||||
{
|
||||
[_x, _depth] call FUNC(dumpArray);
|
||||
false
|
||||
} count _var;
|
||||
|
||||
diag_log text format ["%1],", _pad];
|
||||
};
|
||||
} else {
|
||||
diag_log text format ["%1%2", _pad, _var];
|
||||
};
|
||||
/*
|
||||
* Author: ?
|
||||
* Dumps an array to the RPT, showing the depth of each element.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Array to be dumped <ARRAY>
|
||||
* 1: Depth <NUMBER><OPTIONAL>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [[0, [1,2], [[3]]]] call ace_common_fnc_dumpArray
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_var", ["_depth", 0, [0]]];
|
||||
|
||||
private _pad = "";
|
||||
|
||||
for "_i" from 0 to _depth do {
|
||||
_pad = _pad + toString [9];
|
||||
};
|
||||
|
||||
_depth = _depth + 1;
|
||||
|
||||
if (IS_ARRAY(_var)) then {
|
||||
if (_var isEqualTo []) then {
|
||||
diag_log text format ["%1[],", _pad];
|
||||
} else {
|
||||
diag_log text format ["%1[", _pad];
|
||||
|
||||
{
|
||||
[_x, _depth] call FUNC(dumpArray);
|
||||
false
|
||||
} count _var;
|
||||
|
||||
diag_log text format ["%1],", _pad];
|
||||
};
|
||||
} else {
|
||||
diag_log text format ["%1%2", _pad, _var];
|
||||
};
|
||||
|
@ -1,88 +1,88 @@
|
||||
/*
|
||||
* Author: ?
|
||||
* Dumps performance counter statistics into Logs.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
diag_log text format ["REGISTERED ACE PFH HANDLERS"];
|
||||
diag_log text format ["-------------------------------------------"];
|
||||
|
||||
if (!isNil "ACE_PFH_COUNTER") then {
|
||||
{
|
||||
_x params ["_pfh", "_parameters"];
|
||||
|
||||
private _isActive = ["ACTIVE", "REMOVED"] select isNil {CBA_common_PFHhandles select (_pfh select 0)};
|
||||
|
||||
diag_log text format ["Registered PFH: id=%1 [%2, delay %3], %4:%5", _pfh select 0, _isActive, _parameters select 1, _pfh select 1, _pfh select 2];
|
||||
false
|
||||
} count ACE_PFH_COUNTER;
|
||||
};
|
||||
|
||||
diag_log text format ["ACE COUNTER RESULTS"];
|
||||
diag_log text format ["-------------------------------------------"];
|
||||
|
||||
{
|
||||
private _counterEntry = _x;
|
||||
private _iter = 0;
|
||||
private _total = 0;
|
||||
private _count = 0;
|
||||
private _averageResult = 0;
|
||||
|
||||
if (count _counterEntry > 3) then {
|
||||
// calc
|
||||
{
|
||||
if (_iter > 2) then {
|
||||
_count = _count + 1;
|
||||
private _delta = (_x select 1) - (_x select 0);
|
||||
|
||||
_total = _total + _delta;
|
||||
};
|
||||
|
||||
_iter = _iter + 1;
|
||||
false
|
||||
} count _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];
|
||||
};
|
||||
false
|
||||
} count ACE_COUNTERS;
|
||||
|
||||
/*
|
||||
// Dump PFH Trackers
|
||||
diag_log text format["ACE_PERFORMANCE_EXCESSIVE_STEP_TRACKER"];
|
||||
diag_log text format["-------------------------------------------"];
|
||||
{
|
||||
private _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 = _x select 1;
|
||||
//if(_delta > 0) then { _delta = _delta / 1000; };
|
||||
diag_log text format[" DELTA: %1s", _delta];
|
||||
} forEach ACE_PERFORMANCE_EXCESSIVE_FRAME_TRACKER;
|
||||
|
||||
//{
|
||||
//
|
||||
//} forEach ACRE_EXCESSIVE_FRAME_TRACKER;
|
||||
|
||||
*/
|
||||
/*
|
||||
* Author: ?
|
||||
* Dumps performance counter statistics into Logs.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
diag_log text format ["REGISTERED ACE PFH HANDLERS"];
|
||||
diag_log text format ["-------------------------------------------"];
|
||||
|
||||
if (!isNil "ACE_PFH_COUNTER") then {
|
||||
{
|
||||
_x params ["_pfh", "_parameters"];
|
||||
|
||||
private _isActive = ["ACTIVE", "REMOVED"] select isNil {CBA_common_PFHhandles select (_pfh select 0)};
|
||||
|
||||
diag_log text format ["Registered PFH: id=%1 [%2, delay %3], %4:%5", _pfh select 0, _isActive, _parameters select 1, _pfh select 1, _pfh select 2];
|
||||
false
|
||||
} count ACE_PFH_COUNTER;
|
||||
};
|
||||
|
||||
diag_log text format ["ACE COUNTER RESULTS"];
|
||||
diag_log text format ["-------------------------------------------"];
|
||||
|
||||
{
|
||||
private _counterEntry = _x;
|
||||
private _iter = 0;
|
||||
private _total = 0;
|
||||
private _count = 0;
|
||||
private _averageResult = 0;
|
||||
|
||||
if (count _counterEntry > 3) then {
|
||||
// calc
|
||||
{
|
||||
if (_iter > 2) then {
|
||||
_count = _count + 1;
|
||||
private _delta = (_x select 1) - (_x select 0);
|
||||
|
||||
_total = _total + _delta;
|
||||
};
|
||||
|
||||
_iter = _iter + 1;
|
||||
false
|
||||
} count _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];
|
||||
};
|
||||
false
|
||||
} count ACE_COUNTERS;
|
||||
|
||||
/*
|
||||
// Dump PFH Trackers
|
||||
diag_log text format["ACE_PERFORMANCE_EXCESSIVE_STEP_TRACKER"];
|
||||
diag_log text format["-------------------------------------------"];
|
||||
{
|
||||
private _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 = _x select 1;
|
||||
//if(_delta > 0) then { _delta = _delta / 1000; };
|
||||
diag_log text format[" DELTA: %1s", _delta];
|
||||
} forEach ACE_PERFORMANCE_EXCESSIVE_FRAME_TRACKER;
|
||||
|
||||
//{
|
||||
//
|
||||
//} forEach ACRE_EXCESSIVE_FRAME_TRACKER;
|
||||
|
||||
*/
|
||||
|
@ -22,83 +22,14 @@ private _long = getNumber (configFile >> "CfgWorlds" >> _map >> "longitude");
|
||||
private _lat = getNumber (configFile >> "CfgWorlds" >> _map >> "latitude");
|
||||
private _altitude = getNumber (configFile >> "CfgWorlds" >> _map >> "elevationOffset");
|
||||
|
||||
_map = toLower _map;
|
||||
if (_map in ["abbottabad"]) then { _lat = 34; _altitude = 1256; }; //Abbottabad elevation 1256m (Wikipedia)
|
||||
if (_map in ["abramia"]) then { _lat = 60; _altitude = 0; };
|
||||
if (_map in ["af_kandahar_province"]) then { _lat = 42; _altitude = 0; };
|
||||
if (_map in ["altis"]) then { _lat = 40; _altitude = 0; };
|
||||
if (_map in ["angel"]) then { _lat = 38; _altitude = 0; };
|
||||
if (_map in ["anim_helvantis_v2"]) then { _lat = 50; _altitude = 0; };
|
||||
if (_map in ["australia"]) then { _lat = -25; _altitude = 0; };
|
||||
if (_map in ["bootcamp_acr"]) then { _lat = 50; _altitude = 0; };
|
||||
if (_map in ["bornholm"]) then { _lat = 55; _altitude = 0; };
|
||||
if (_map in ["bozcaada"]) then { _lat = 40; _altitude = 0; };
|
||||
if (_map in ["caribou"]) then { _lat = 68; _altitude = 0; };
|
||||
if (_map in ["catalina"]) then { _lat = 33; _altitude = 0; };
|
||||
if (_map in ["chernarus", "chernarus_summer", "chernarus_winter"]) then { _lat = 50; _altitude = 0; };
|
||||
if (_map in ["chernobylzone", "chernobylzonea2"]) then { _lat = 51; _altitude = 0; };
|
||||
if (_map in ["clafghan"]) then { _lat = 34; _altitude = 640; };
|
||||
if (_map in ["dakrong"]) then { _lat = 17; _altitude = 0; }; //Unsung Mod
|
||||
if (_map in ["desert_e"]) then { _lat = 40; _altitude = 800; };
|
||||
if (_map in ["dya"]) then { _lat = 34; _altitude = 110; }; //Diyala Iraq - default elevationOffset
|
||||
if (_map in ["esseker"]) then { _lat = 43; _altitude = 2000; };
|
||||
if (_map in ["evergreen"]) then { _lat = 41; _altitude = 0; }; //Burgazada, Turkey - default elevationOffset
|
||||
if (_map in ["fallujah"]) then { _lat = 33; _altitude = 0; };
|
||||
if (_map in ["fata"]) then { _lat = 33; _altitude = 1347; };
|
||||
if (_map in ["gorgona"]) then { _lat = 43; _altitude = 0; };
|
||||
if (_map in ["hellskitchen", "hellskitchens"]) then { _lat = 32; _altitude = 900; }; //Sangin summer, Sangin winter - Sangin elevation 888m (Wikipedia)
|
||||
if (_map in ["hindukush"]) then { _lat = 36; _altitude = 0; };
|
||||
if (_map in ["imrali", "imralispring"]) then { _lat = 40; _altitude = 0; };
|
||||
if (_map in ["intro"]) then { _lat = 40; _altitude = 0; };
|
||||
if (_map in ["isladuala3"]) then { _lat = -19; _altitude = 0; };
|
||||
if (_map in ["jacobi"]) then { _lat = 34; _altitude = 2000; }; //default elevationOffset
|
||||
if (_map in ["kapaulio"]) then { _lat = 0; _altitude = 0; };
|
||||
if (_map in ["kerama"]) then { _lat = 26; _altitude = 0; }; //Kerama Islands, Japan - default elevationOffset
|
||||
if (_map in ["kholm"]) then { _lat = 36; _altitude = 0; };
|
||||
if (_map in ["koplic"]) then { _lat = 42; _altitude = 0; };
|
||||
if (_map in ["kunduz"]) then { _lat = 37; _altitude = 0; };
|
||||
if (_map in ["lingor", "lingor3"]) then { _lat = -4; _altitude = 0; };
|
||||
if (_map in ["lost", "lostw"]) then { _lat = 60; _altitude = 0; };
|
||||
if (_map in ["mcn_aliabad"]) then { _lat = 36; _altitude = 0; };
|
||||
if (_map in ["malvinas"]) then { _lat = -52; _altitude = 0; };
|
||||
if (_map in ["namalsk"]) then { _lat = 65; _altitude = 0; };
|
||||
if (_map in ["mef_alaska"]) then { _lat = 60; _altitude = 5; };
|
||||
if (_map in ["mountains_acr"]) then { _lat = 35; _altitude = 2000; };
|
||||
if (_map in ["napf", "napfwinter"]) then { _lat = 47; _altitude = 0; };
|
||||
if (_map in ["panthera3"]) then { _lat = 46; _altitude = 0; };
|
||||
if (_map in ["pianosa_aut"]) then { _lat = 43; _altitude = 0; }; //Pianosa, Italy - default elevationOffset
|
||||
if (_map in ["pja305"]) then { _lat = 0; _altitude = 0; }; //G.O.S N'Ziwasogo
|
||||
if (_map in ["pja306"]) then { _lat = 35; _altitude = 0; }; //G.O.S Kalu Khan
|
||||
if (_map in ["pja307"]) then { _lat = 17; _altitude = 0; }; //F.S.F Daryah
|
||||
if (_map in ["pja308"]) then { _lat = 36; _altitude = 0; }; //G.O.S Gunkizli
|
||||
if (_map in ["pja310"]) then { _lat = 36; _altitude = 0; }; //G.O.S Al Rayak
|
||||
if (_map in ["pja312"]) then { _lat = 16; _altitude = 0; }; //G.O.S Song Bin Tanh
|
||||
if (_map in ["porquerolles"]) then { _lat = 43; _altitude = 0; };
|
||||
if (_map in ["porto"]) then { _lat = 40; _altitude = 0; };
|
||||
if (_map in ["provinggrounds_pmc"]) then { _lat = 35; _altitude = 100; };
|
||||
if (_map in ["reshmaan"]) then { _lat = 35; _altitude = 2000; };
|
||||
if (_map in ["sara", "sara_dbe1"]) then { _lat = 40; _altitude = 0; };
|
||||
if (_map in ["saralite"]) then { _lat = 40; _altitude = 0; };
|
||||
if (_map in ["sb3"]) then { _lat = 53; _altitude = 25; }; //TrpUebPl Einfelde Nord (Munster North Training Area, Germany) - default elevationOffset
|
||||
if (_map in ["shapur_baf"]) then { _lat = 35; _altitude = 100; };
|
||||
if (_map in ["sfp_sturko"]) then { _lat = 56; _altitude = 0; };
|
||||
if (_map in ["sfp_wamako"]) then { _lat = 14; _altitude = 0; };
|
||||
if (_map in ["stratis"]) then { _lat = 40; _altitude = 0; };
|
||||
if (_map in ["sugarlake"]) then { _lat = 29; _altitude = 0; };
|
||||
if (_map in ["takistan"]) then { _lat = 35; _altitude = 2000; };
|
||||
if (_map in ["thirsk"]) then { _lat = 65; _altitude = 0; };
|
||||
if (_map in ["tilos"]) then { _lat = 36; _altitude = 0; };
|
||||
if (_map in ["utes"]) then { _lat = 50; _altitude = 0; };
|
||||
if (_map in ["vt5"]) then { _lat = 61; _altitude = 100; }; //Vt5, Suomi Finland - default elevationOffset
|
||||
if (_map in ["wake"]) then { _lat = 19; _altitude = 0; };
|
||||
if (_map in ["waziristan"]) then { _lat = 33; _altitude = 0; };
|
||||
if (_map in ["wintermap"]) then { _lat = 61; _altitude = 0; }; //Nordkvingo - default elevationOffset
|
||||
if (_map in ["wintertown", "wintertowna3"]) then { _lat = 39; _altitude = 600; }; //U.S. state Kansas mean elevation 610m (Wikipedia)
|
||||
if (_map in ["woodland_acr"]) then { _lat = 50; _altitude = 0; };
|
||||
if (_map in ["xcam_prototype"]) then { _lat = 35; _altitude = 0; };
|
||||
if (_map in ["zargabad"]) then { _lat = 35; _altitude = 2000; };
|
||||
private _mapData = _map call FUNC(getMapData);
|
||||
if (!(_mapData isEqualTo [])) then {
|
||||
_lat = _mapData select 0;
|
||||
_alt = _mapData select 1;
|
||||
};
|
||||
TRACE_2("Latitude and Altitude",_lat,_alt);
|
||||
|
||||
private _UTM = [_long,_lat] call BIS_fnc_posDegToUTM;
|
||||
private _UTM = [_long, _lat] call BIS_fnc_posDegToUTM;
|
||||
private _easting = _UTM select 0;
|
||||
private _northing = _UTM select 1;
|
||||
//private _zone = _UTM select 2;
|
||||
|
98
addons/common/functions/fnc_getMapData.sqf
Normal file
98
addons/common/functions/fnc_getMapData.sqf
Normal file
@ -0,0 +1,98 @@
|
||||
/*
|
||||
* Author: VKing, bux
|
||||
* Gets the current latitude and altitude offset for the map.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Map name (default: worldName) <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* 0: Latitude <NUMBER>
|
||||
* 1: Altitude <NUMBER>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
params ["_map"];
|
||||
_map = toLower _map;
|
||||
|
||||
// [latitude, altitude]
|
||||
|
||||
// the more important ones
|
||||
if (_map in ["tanoa"]) exitWith { [-18, 0] };
|
||||
if (_map in ["altis"]) exitWith { [40, 0] };
|
||||
if (_map in ["stratis"]) exitWith { [40, 0] };
|
||||
|
||||
if (_map in ["abbottabad"]) exitWith { [34, 1256] }; //Abbottabad elevation 1256m (Wikipedia)
|
||||
if (_map in ["abramia"]) exitWith { [60, 0] };
|
||||
if (_map in ["af_kandahar_province"]) exitWith { [42, 0] };
|
||||
if (_map in ["angel"]) exitWith { [38, 0] };
|
||||
if (_map in ["anim_helvantis_v2"]) exitWith { [50, 0] };
|
||||
if (_map in ["australia"]) exitWith { [-25, 0] };
|
||||
if (_map in ["bootcamp_acr"]) exitWith { [50, 0] };
|
||||
if (_map in ["bornholm"]) exitWith { [55, 0] };
|
||||
if (_map in ["bozcaada"]) exitWith { [40, 0] };
|
||||
if (_map in ["caribou"]) exitWith { [68, 0] };
|
||||
if (_map in ["catalina"]) exitWith { [33, 0] };
|
||||
if (_map in ["chernarus", "chernarus_summer", "chernarus_winter"]) exitWith { [50, 0] };
|
||||
if (_map in ["chernobylzone", "chernobylzonea2"]) exitWith { [51, 0] };
|
||||
if (_map in ["clafghan"]) exitWith { [34, 640] };
|
||||
if (_map in ["dakrong"]) exitWith { [17, 0] }; //Unsung Mod
|
||||
if (_map in ["desert_e"]) exitWith { [40, 800] };
|
||||
if (_map in ["dya"]) exitWith { [34, 110] }; //Diyala Iraq - default elevationOffset
|
||||
if (_map in ["esseker"]) exitWith { [43, 2000] };
|
||||
if (_map in ["evergreen"]) exitWith { [41, 0] }; //Burgazada, Turkey - default elevationOffset
|
||||
if (_map in ["fallujah"]) exitWith { [33, 0] };
|
||||
if (_map in ["fata"]) exitWith { [33, 1347] };
|
||||
if (_map in ["gorgona"]) exitWith { [43, 0] };
|
||||
if (_map in ["hellskitchen", "hellskitchens"]) exitWith { [32, 900] }; //Sangin summer, Sangin winter - Sangin elevation 888m (Wikipedia)
|
||||
if (_map in ["hindukush"]) exitWith { [36, 0] };
|
||||
if (_map in ["imrali", "imralispring"]) exitWith { [40, 0] };
|
||||
if (_map in ["intro"]) exitWith { [40, 0] };
|
||||
if (_map in ["isladuala3"]) exitWith { [-19, 0] };
|
||||
if (_map in ["jacobi"]) exitWith { [34, 2000] }; //default elevationOffset
|
||||
if (_map in ["kapaulio"]) exitWith { [0, 0] };
|
||||
if (_map in ["kerama"]) exitWith { [26, 0] }; //Kerama Islands, Japan - default elevationOffset
|
||||
if (_map in ["kholm"]) exitWith { [36, 0] };
|
||||
if (_map in ["koplic"]) exitWith { [42, 0] };
|
||||
if (_map in ["kunduz"]) exitWith { [37, 0] };
|
||||
if (_map in ["lingor", "lingor3"]) exitWith { [-4, 0] };
|
||||
if (_map in ["lost", "lostw"]) exitWith { [60, 0] };
|
||||
if (_map in ["mcn_aliabad"]) exitWith { [36, 0] };
|
||||
if (_map in ["malvinas"]) exitWith { [-52, 0] };
|
||||
if (_map in ["namalsk"]) exitWith { [65, 0] };
|
||||
if (_map in ["mef_alaska"]) exitWith { [60, 5] };
|
||||
if (_map in ["mountains_acr"]) exitWith { [35, 2000] };
|
||||
if (_map in ["napf", "napfwinter"]) exitWith { [47, 0] };
|
||||
if (_map in ["panthera3"]) exitWith { [46, 0] };
|
||||
if (_map in ["pianosa_aut"]) exitWith { [43, 0] }; //Pianosa, Italy - default elevationOffset
|
||||
if (_map in ["pja305"]) exitWith { [0, 0] }; //G.O.S N'Ziwasogo
|
||||
if (_map in ["pja306"]) exitWith { [35, 0] }; //G.O.S Kalu Khan
|
||||
if (_map in ["pja307"]) exitWith { [17, 0] }; //F.S.F Daryah
|
||||
if (_map in ["pja308"]) exitWith { [36, 0] }; //G.O.S Gunkizli
|
||||
if (_map in ["pja310"]) exitWith { [36, 0] }; //G.O.S Al Rayak
|
||||
if (_map in ["pja312"]) exitWith { [16, 0] }; //G.O.S Song Bin Tanh
|
||||
if (_map in ["porquerolles"]) exitWith { [43, 0] };
|
||||
if (_map in ["porto"]) exitWith { [40, 0] };
|
||||
if (_map in ["provinggrounds_pmc"]) exitWith { [35, 100] };
|
||||
if (_map in ["reshmaan"]) exitWith { [35, 2000] };
|
||||
if (_map in ["sara", "sara_dbe1"]) exitWith { [40, 0] };
|
||||
if (_map in ["saralite"]) exitWith { [40, 0] };
|
||||
if (_map in ["sb3"]) exitWith { [53, 25] }; //TrpUebPl Einfelde Nord (Munster North Training Area, Germany) - default elevationOffset
|
||||
if (_map in ["shapur_baf"]) exitWith { [35, 100] };
|
||||
if (_map in ["sfp_sturko"]) exitWith { [56, 0] };
|
||||
if (_map in ["sfp_wamako"]) exitWith { [14, 0] };
|
||||
if (_map in ["sugarlake"]) exitWith { [29, 0] };
|
||||
if (_map in ["takistan"]) exitWith { [35, 2000] };
|
||||
if (_map in ["thirsk"]) exitWith { [65, 0] };
|
||||
if (_map in ["tilos"]) exitWith { [36, 0] };
|
||||
if (_map in ["utes"]) exitWith { [50, 0] };
|
||||
if (_map in ["vt5"]) exitWith { [61, 100] }; //Vt5, Suomi Finland - default elevationOffset
|
||||
if (_map in ["wake"]) exitWith { [19, 0] };
|
||||
if (_map in ["waziristan"]) exitWith { [33, 0] };
|
||||
if (_map in ["wintermap"]) exitWith { [61, 0] }; //Nordkvingo - default elevationOffset
|
||||
if (_map in ["wintertown", "wintertowna3"]) exitWith { [39, 600] }; //U.S. state Kansas mean elevation 610m (Wikipedia)
|
||||
if (_map in ["woodland_acr"]) exitWith { [50, 0] };
|
||||
if (_map in ["xcam_prototype"]) exitWith { [35, 0] };
|
||||
if (_map in ["zargabad"]) exitWith { [35, 2000] };
|
||||
|
||||
[] //Return empty array if we have no specific data for the map
|
@ -1,42 +1,42 @@
|
||||
/*
|
||||
* Author: jaynus
|
||||
* Get the absolute turret direction for FOV/PIP turret.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Vehicle <OBJECT>
|
||||
* 1: Turret Position <ARRAY>
|
||||
*
|
||||
* Return Value:
|
||||
* 0: Position ASL <ARRAY>
|
||||
* 1: Direction <ARRAY>
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_vehicle", "_position"];
|
||||
|
||||
private _turret = [_vehicle, _position] call CBA_fnc_getTurret;
|
||||
|
||||
private _pov = getText (_turret >> "memoryPointGunnerOptics");
|
||||
private _gunBeg = getText (_turret >> "gunBeg");
|
||||
private _gunEnd = getText (_turret >> "gunEnd");
|
||||
|
||||
TRACE_3("", _pov, _gunBeg, _gunEnd);
|
||||
|
||||
// Pull the PIP pov or barrel direction, depending on how the model is set up
|
||||
private _povPos = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _pov)); //@todo AGLToASL ?
|
||||
private _povDir = [0,0,0];
|
||||
|
||||
if (_pov == "pip0_pos") then {
|
||||
private _pipDir = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition "pip0_dir"));
|
||||
|
||||
_povDir = _pipDir vectorDiff _povPos;
|
||||
} else {
|
||||
private _gunBeginPos = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _gunBeg));
|
||||
private _gunEndPos = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _gunEnd));
|
||||
|
||||
_povDir = _gunBeginPos vectorDiff _gunEndPos;
|
||||
};
|
||||
|
||||
[_povPos, _povDir]
|
||||
/*
|
||||
* Author: jaynus
|
||||
* Get the absolute turret direction for FOV/PIP turret.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Vehicle <OBJECT>
|
||||
* 1: Turret Position <ARRAY>
|
||||
*
|
||||
* Return Value:
|
||||
* 0: Position ASL <ARRAY>
|
||||
* 1: Direction <ARRAY>
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_vehicle", "_position"];
|
||||
|
||||
private _turret = [_vehicle, _position] call CBA_fnc_getTurret;
|
||||
|
||||
private _pov = getText (_turret >> "memoryPointGunnerOptics");
|
||||
private _gunBeg = getText (_turret >> "gunBeg");
|
||||
private _gunEnd = getText (_turret >> "gunEnd");
|
||||
|
||||
TRACE_3("", _pov, _gunBeg, _gunEnd);
|
||||
|
||||
// Pull the PIP pov or barrel direction, depending on how the model is set up
|
||||
private _povPos = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _pov)); //@todo AGLToASL ?
|
||||
private _povDir = [0,0,0];
|
||||
|
||||
if (_pov == "pip0_pos") then {
|
||||
private _pipDir = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition "pip0_dir"));
|
||||
|
||||
_povDir = _pipDir vectorDiff _povPos;
|
||||
} else {
|
||||
private _gunBeginPos = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _gunBeg));
|
||||
private _gunEndPos = ATLtoASL (_vehicle modelToWorldVisual (_vehicle selectionPosition _gunEnd));
|
||||
|
||||
_povDir = _gunBeginPos vectorDiff _gunEndPos;
|
||||
};
|
||||
|
||||
[_povPos, _povDir]
|
||||
|
@ -1,14 +1,14 @@
|
||||
#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_eventName", "_eventArgs"];
|
||||
|
||||
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||
if (_newName != "") then {
|
||||
TRACE_2("Switching Names",_eventName,_newName);
|
||||
_eventName = _newName;
|
||||
};
|
||||
|
||||
[_eventName, _eventArgs] call CBA_fnc_globalEvent;
|
||||
|
||||
ACE_DEPRECATED("ace_common_fnc_globalEvent","3.8.0","CBA_fnc_globalEvent");
|
||||
#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_eventName", "_eventArgs"];
|
||||
|
||||
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||
if (_newName != "") then {
|
||||
TRACE_2("Switching Names",_eventName,_newName);
|
||||
_eventName = _newName;
|
||||
};
|
||||
|
||||
[_eventName, _eventArgs] call CBA_fnc_globalEvent;
|
||||
|
||||
ACE_DEPRECATED("ace_common_fnc_globalEvent","3.8.0","CBA_fnc_globalEvent");
|
||||
|
@ -1,13 +1,13 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_eventName", "_eventArgs"];
|
||||
|
||||
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||
if (_newName != "") then {
|
||||
TRACE_2("Switching Names",_eventName,_newName);
|
||||
_eventName = _newName;
|
||||
};
|
||||
|
||||
[_eventName, _eventArgs] call CBA_fnc_localEvent;
|
||||
|
||||
ACE_DEPRECATED("ace_common_fnc_localEvent","3.8.0","CBA_fnc_localEvent");
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_eventName", "_eventArgs"];
|
||||
|
||||
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||
if (_newName != "") then {
|
||||
TRACE_2("Switching Names",_eventName,_newName);
|
||||
_eventName = _newName;
|
||||
};
|
||||
|
||||
[_eventName, _eventArgs] call CBA_fnc_localEvent;
|
||||
|
||||
ACE_DEPRECATED("ace_common_fnc_localEvent","3.8.0","CBA_fnc_localEvent");
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_eventName"];
|
||||
|
||||
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||
if (_newName != "") then {
|
||||
TRACE_2("Switching Names",_eventName,_newName);
|
||||
_eventName = _newName;
|
||||
};
|
||||
|
||||
CBA_events_eventNamespace setVariable [_eventName,nil];
|
||||
CBA_events_eventHashes setVariable [_eventName,nil];
|
||||
|
||||
ACE_DEPRECATED("ace_common_fnc_removeAllEventHandlers","3.8.0","N/A (remove events individually w/ CBA_fnc_removeEventHandler)");
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_eventName"];
|
||||
|
||||
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||
if (_newName != "") then {
|
||||
TRACE_2("Switching Names",_eventName,_newName);
|
||||
_eventName = _newName;
|
||||
};
|
||||
|
||||
CBA_events_eventNamespace setVariable [_eventName,nil];
|
||||
CBA_events_eventHashes setVariable [_eventName,nil];
|
||||
|
||||
ACE_DEPRECATED("ace_common_fnc_removeAllEventHandlers","3.8.0","N/A (remove events individually w/ CBA_fnc_removeEventHandler)");
|
||||
|
@ -1,13 +1,13 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_eventName", "_eventCode"];
|
||||
|
||||
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||
if (_newName != "") then {
|
||||
TRACE_2("Switching Names",_eventName,_newName);
|
||||
_eventName = _newName;
|
||||
};
|
||||
|
||||
[_eventName, _eventCode] call CBA_fnc_removeEventHandler;
|
||||
|
||||
ACE_DEPRECATED("ace_common_fnc_removeEventHandler","3.8.0","CBA_fnc_removeEventHandler");
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_eventName", "_eventCode"];
|
||||
|
||||
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||
if (_newName != "") then {
|
||||
TRACE_2("Switching Names",_eventName,_newName);
|
||||
_eventName = _newName;
|
||||
};
|
||||
|
||||
[_eventName, _eventCode] call CBA_fnc_removeEventHandler;
|
||||
|
||||
ACE_DEPRECATED("ace_common_fnc_removeEventHandler","3.8.0","CBA_fnc_removeEventHandler");
|
||||
|
@ -1,26 +1,26 @@
|
||||
/*
|
||||
* Author: jaynus
|
||||
* Remove a synced event handler
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Name <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean of success
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_name"];
|
||||
|
||||
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||
ACE_LOGERROR_1("Synced event key [%1] not found (removeSyncedEventHandler).", _name);
|
||||
false
|
||||
};
|
||||
|
||||
private _data = HASH_GET(GVAR(syncedEvents),_name);
|
||||
_data params ["", "", "", "_eventId"];
|
||||
|
||||
[_eventId] call CBA_fnc_removeEventHandler;
|
||||
HASH_REM(GVAR(syncedEvents),_name);
|
||||
/*
|
||||
* Author: jaynus
|
||||
* Remove a synced event handler
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Name <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean of success
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_name"];
|
||||
|
||||
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||
ACE_LOGERROR_1("Synced event key [%1] not found (removeSyncedEventHandler).", _name);
|
||||
false
|
||||
};
|
||||
|
||||
private _data = HASH_GET(GVAR(syncedEvents),_name);
|
||||
_data params ["", "", "", "_eventId"];
|
||||
|
||||
[_eventId] call CBA_fnc_removeEventHandler;
|
||||
HASH_REM(GVAR(syncedEvents),_name);
|
||||
|
@ -1,20 +1,20 @@
|
||||
/*
|
||||
* Author: jaynus
|
||||
* Send a request to synchronize an event name from the client->server. Execute on client only.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: eventName <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean of success
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_eventName"];
|
||||
|
||||
// Only JIP machines on initialization send this off, requesting sync on events with the serverCommand
|
||||
if (isServer) exitWith {false};
|
||||
|
||||
["ACEs", [_eventName, ACE_player]] call CBA_fnc_serverEvent;
|
||||
/*
|
||||
* Author: jaynus
|
||||
* Send a request to synchronize an event name from the client->server. Execute on client only.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: eventName <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean of success
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_eventName"];
|
||||
|
||||
// Only JIP machines on initialization send this off, requesting sync on events with the serverCommand
|
||||
if (isServer) exitWith {false};
|
||||
|
||||
["ACEs", [_eventName, ACE_player]] call CBA_fnc_serverEvent;
|
||||
|
@ -1,13 +1,13 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_eventName", "_eventArgs"];
|
||||
|
||||
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||
if (_newName != "") then {
|
||||
TRACE_2("Switching Names",_eventName,_newName);
|
||||
_eventName = _newName;
|
||||
};
|
||||
|
||||
[_eventName, _eventArgs] call CBA_fnc_serverEvent;
|
||||
|
||||
ACE_DEPRECATED("ace_common_fnc_serverEvent","3.8.0","CBA_fnc_serverEvent");
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_eventName", "_eventArgs"];
|
||||
|
||||
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||
if (_newName != "") then {
|
||||
TRACE_2("Switching Names",_eventName,_newName);
|
||||
_eventName = _newName;
|
||||
};
|
||||
|
||||
[_eventName, _eventArgs] call CBA_fnc_serverEvent;
|
||||
|
||||
ACE_DEPRECATED("ace_common_fnc_serverEvent","3.8.0","CBA_fnc_serverEvent");
|
||||
|
@ -1,26 +1,26 @@
|
||||
/*
|
||||
* Author: jaynus
|
||||
* Call and propegate a synced event
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Name <STRING>
|
||||
* 1: Arguments <ARRAY>
|
||||
* 2: TTL <NUMBER, CODE> [Optional] for this specific event call
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean of success <BOOL>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_name", "_args", ["_ttl", 0]];
|
||||
|
||||
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||
ACE_LOGERROR_1("Synced event key [%1] not found (syncedEvent).", _name);
|
||||
false
|
||||
};
|
||||
|
||||
private _eventData = [_name, _args, _ttl];
|
||||
|
||||
["ACEe", _eventData] call CBA_fnc_globalEvent;
|
||||
/*
|
||||
* Author: jaynus
|
||||
* Call and propegate a synced event
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Name <STRING>
|
||||
* 1: Arguments <ARRAY>
|
||||
* 2: TTL <NUMBER, CODE> [Optional] for this specific event call
|
||||
*
|
||||
* Return Value:
|
||||
* Boolean of success <BOOL>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_name", "_args", ["_ttl", 0]];
|
||||
|
||||
if (!HASH_HASKEY(GVAR(syncedEvents),_name)) exitWith {
|
||||
ACE_LOGERROR_1("Synced event key [%1] not found (syncedEvent).", _name);
|
||||
false
|
||||
};
|
||||
|
||||
private _eventData = [_name, _args, _ttl];
|
||||
|
||||
["ACEe", _eventData] call CBA_fnc_globalEvent;
|
||||
|
@ -1,62 +1,62 @@
|
||||
/*
|
||||
* Author: ?
|
||||
*
|
||||
* ?
|
||||
*
|
||||
* Arguments:
|
||||
* ?
|
||||
*
|
||||
* Return Value:
|
||||
* ?
|
||||
*
|
||||
* Public: ?
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!isServer) exitWith {false};
|
||||
|
||||
// Walk through the local synced events and clean up anything thats already EOL
|
||||
// @TODO: This should be iteration limited to prevent FPS lag
|
||||
|
||||
{
|
||||
private _name = _x;
|
||||
|
||||
private _data = HASH_GET(GVAR(syncedEvents),_name);
|
||||
_data params ["_eventTime", "_eventLog", "_globalEventTTL"];
|
||||
|
||||
private _newEventLog = [];
|
||||
|
||||
// @TODO: This should be iteration limited to prevent FPS lag
|
||||
{
|
||||
private _eventEntry = _x;
|
||||
private _ttlReturn = true;
|
||||
|
||||
if (_globalEventTTL isEqualType {}) then {
|
||||
_ttlReturn = [_eventTime, _eventEntry] call _globalEventTTL;
|
||||
} else {
|
||||
_ttlReturn = call {_globalEventTTL < 1 || {diag_tickTime < (_eventEntry select 0) + _globalEventTTL}};
|
||||
};
|
||||
|
||||
if (_ttlReturn) then {
|
||||
// Do event based TTL check
|
||||
_eventEntry params ["_time", "", "_eventTTL"];
|
||||
|
||||
if (_eventTTL isEqualType {}) then {
|
||||
_ttlReturn = [_eventTime, _eventEntry] call _eventTTL;
|
||||
} else {
|
||||
_ttlReturn = call {_eventTTL < 1 || {diag_tickTime < _time + _eventTTL}};
|
||||
};
|
||||
};
|
||||
|
||||
// Finally drop it if the TTL check fails
|
||||
if (_ttlReturn) then {
|
||||
_newEventLog pushBack _x;
|
||||
};
|
||||
false
|
||||
} count _eventLog;
|
||||
|
||||
_data set [1, _newEventLog];
|
||||
false
|
||||
} count (GVAR(syncedEvents) select 0);
|
||||
|
||||
// @TODO: Next, detect if we had a new request from a JIP player, and we need to continue syncing events
|
||||
/*
|
||||
* Author: ?
|
||||
*
|
||||
* ?
|
||||
*
|
||||
* Arguments:
|
||||
* ?
|
||||
*
|
||||
* Return Value:
|
||||
* ?
|
||||
*
|
||||
* Public: ?
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!isServer) exitWith {false};
|
||||
|
||||
// Walk through the local synced events and clean up anything thats already EOL
|
||||
// @TODO: This should be iteration limited to prevent FPS lag
|
||||
|
||||
{
|
||||
private _name = _x;
|
||||
|
||||
private _data = HASH_GET(GVAR(syncedEvents),_name);
|
||||
_data params ["_eventTime", "_eventLog", "_globalEventTTL"];
|
||||
|
||||
private _newEventLog = [];
|
||||
|
||||
// @TODO: This should be iteration limited to prevent FPS lag
|
||||
{
|
||||
private _eventEntry = _x;
|
||||
private _ttlReturn = true;
|
||||
|
||||
if (_globalEventTTL isEqualType {}) then {
|
||||
_ttlReturn = [_eventTime, _eventEntry] call _globalEventTTL;
|
||||
} else {
|
||||
_ttlReturn = call {_globalEventTTL < 1 || {diag_tickTime < (_eventEntry select 0) + _globalEventTTL}};
|
||||
};
|
||||
|
||||
if (_ttlReturn) then {
|
||||
// Do event based TTL check
|
||||
_eventEntry params ["_time", "", "_eventTTL"];
|
||||
|
||||
if (_eventTTL isEqualType {}) then {
|
||||
_ttlReturn = [_eventTime, _eventEntry] call _eventTTL;
|
||||
} else {
|
||||
_ttlReturn = call {_eventTTL < 1 || {diag_tickTime < _time + _eventTTL}};
|
||||
};
|
||||
};
|
||||
|
||||
// Finally drop it if the TTL check fails
|
||||
if (_ttlReturn) then {
|
||||
_newEventLog pushBack _x;
|
||||
};
|
||||
false
|
||||
} count _eventLog;
|
||||
|
||||
_data set [1, _newEventLog];
|
||||
false
|
||||
} count (GVAR(syncedEvents) select 0);
|
||||
|
||||
// @TODO: Next, detect if we had a new request from a JIP player, and we need to continue syncing events
|
||||
|
@ -1,13 +1,13 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_eventName", "_eventTargets", "_eventArgs"];
|
||||
|
||||
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||
if (_newName != "") then {
|
||||
TRACE_2("Switching Names",_eventName,_newName);
|
||||
_eventName = _newName;
|
||||
};
|
||||
|
||||
[_eventName,_eventArgs,_eventTargets] call CBA_fnc_targetEvent;
|
||||
|
||||
ACE_DEPRECATED("ace_common_fnc_targetEvent","3.8.0","CBA_fnc_targetEvent");
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_eventName", "_eventTargets", "_eventArgs"];
|
||||
|
||||
private _newName = getText (configFile >> "ACE_newEvents" >> _eventName);
|
||||
if (_newName != "") then {
|
||||
TRACE_2("Switching Names",_eventName,_newName);
|
||||
_eventName = _newName;
|
||||
};
|
||||
|
||||
[_eventName,_eventArgs,_eventTargets] call CBA_fnc_targetEvent;
|
||||
|
||||
ACE_DEPRECATED("ace_common_fnc_targetEvent","3.8.0","CBA_fnc_targetEvent");
|
||||
|
@ -1,23 +1,23 @@
|
||||
/*
|
||||
* Author: ?
|
||||
* ?
|
||||
*
|
||||
* Arguments:
|
||||
* ?
|
||||
*
|
||||
* Return Value:
|
||||
* ?
|
||||
*
|
||||
* Public: ?
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_object", "_matrix", "_offset"];
|
||||
|
||||
private _origin = getPosASL _object;
|
||||
|
||||
_matrix params ["_xVec", "_yVec", "_zVec"];
|
||||
|
||||
_offset params ["_x", "_y", "_z"];
|
||||
|
||||
(_xVec vectorMultiply _x) vectorAdd (_yVec vectorMultiply _y) vectorAdd (_zVec vectorMultiply _z) vectorAdd _origin // return
|
||||
/*
|
||||
* Author: ?
|
||||
* ?
|
||||
*
|
||||
* Arguments:
|
||||
* ?
|
||||
*
|
||||
* Return Value:
|
||||
* ?
|
||||
*
|
||||
* Public: ?
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_object", "_matrix", "_offset"];
|
||||
|
||||
private _origin = getPosASL _object;
|
||||
|
||||
_matrix params ["_xVec", "_yVec", "_zVec"];
|
||||
|
||||
_offset params ["_x", "_y", "_z"];
|
||||
|
||||
(_xVec vectorMultiply _x) vectorAdd (_yVec vectorMultiply _y) vectorAdd (_zVec vectorMultiply _z) vectorAdd _origin // return
|
||||
|
@ -1,29 +1,29 @@
|
||||
/*
|
||||
* Author: ?
|
||||
* ?
|
||||
*
|
||||
* Arguments:
|
||||
* ?
|
||||
*
|
||||
* Return Value:
|
||||
* ?
|
||||
*
|
||||
* Public: ?
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_object", "_matrix", "_offset"];
|
||||
|
||||
private _origin = getPosASL _object;
|
||||
|
||||
_matrix params ["_xVec", "_yVec", "_zVec"];
|
||||
|
||||
_offset = _offset vectorDiff _origin;
|
||||
|
||||
_offset params ["_x", "_y", "_z"];
|
||||
|
||||
[
|
||||
((_xVec select 0) * _x) + ((_xVec select 1) * _y) + ((_xVec select 2) * _z),
|
||||
((_yVec select 0) * _x) + ((_yVec select 1) * _y) + ((_yVec select 2) * _z),
|
||||
((_zVec select 0) * _x) + ((_zVec select 1) * _y) + ((_zVec select 2) * _z)
|
||||
] // return
|
||||
/*
|
||||
* Author: ?
|
||||
* ?
|
||||
*
|
||||
* Arguments:
|
||||
* ?
|
||||
*
|
||||
* Return Value:
|
||||
* ?
|
||||
*
|
||||
* Public: ?
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_object", "_matrix", "_offset"];
|
||||
|
||||
private _origin = getPosASL _object;
|
||||
|
||||
_matrix params ["_xVec", "_yVec", "_zVec"];
|
||||
|
||||
_offset = _offset vectorDiff _origin;
|
||||
|
||||
_offset params ["_x", "_y", "_z"];
|
||||
|
||||
[
|
||||
((_xVec select 0) * _x) + ((_xVec select 1) * _y) + ((_xVec select 2) * _z),
|
||||
((_yVec select 0) * _x) + ((_yVec select 1) * _y) + ((_yVec select 2) * _z),
|
||||
((_zVec select 0) * _x) + ((_zVec select 1) * _y) + ((_zVec select 2) * _z)
|
||||
] // return
|
||||
|
@ -1,24 +1,24 @@
|
||||
/*
|
||||
* Author: jaynus
|
||||
* Gets the wave height at a specific location. Uses a logic, so may be performance iffy
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Position ASL to get height at
|
||||
*
|
||||
* Return Value:
|
||||
* Wave height in meters
|
||||
*
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_position"];
|
||||
|
||||
if (isNil QGVAR(waveHeightLogic)) then {
|
||||
GVAR(waveHeightLogic) = "Logic" createVehicleLocal [0,0,0];
|
||||
};
|
||||
|
||||
GVAR(waveHeightLogic) setPosASL _position;
|
||||
|
||||
(getPosASLW GVAR(waveHeightLogic) select 2) - (getPosASL GVAR(waveHeightLogic) select 2)
|
||||
/*
|
||||
* Author: jaynus
|
||||
* Gets the wave height at a specific location. Uses a logic, so may be performance iffy
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Position ASL to get height at
|
||||
*
|
||||
* Return Value:
|
||||
* Wave height in meters
|
||||
*
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_position"];
|
||||
|
||||
if (isNil QGVAR(waveHeightLogic)) then {
|
||||
GVAR(waveHeightLogic) = "Logic" createVehicleLocal [0,0,0];
|
||||
};
|
||||
|
||||
GVAR(waveHeightLogic) setPosASL _position;
|
||||
|
||||
(getPosASLW GVAR(waveHeightLogic) select 2) - (getPosASL GVAR(waveHeightLogic) select 2)
|
||||
|
@ -1,74 +1,74 @@
|
||||
/*
|
||||
* Author: zGuba 2011
|
||||
* Function helper for framing objects on screen.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: object <OBJECT>
|
||||
* 1: margins 3D <ARRAY>
|
||||
* 0: X <NUMBER>
|
||||
* 1: Y <NUMBER>
|
||||
* 2: Z <NUMBER>
|
||||
* 2: offset 3D <ARRAY>
|
||||
* 0: X <NUMBER>
|
||||
* 1: Y <NUMBER>
|
||||
* 2: Z <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* 0: Minimal X <NUMMBER>
|
||||
* 1: Minimal Y <NUMMBER>
|
||||
* 2: Maximal X <NUMMBER>
|
||||
* 3: Maximal Y <NUMMBER>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_object", "_margins", "_offsets"];
|
||||
|
||||
private _minX = 10;
|
||||
private _minY = 10;
|
||||
private _maxX = -10;
|
||||
private _maxY = -10;
|
||||
|
||||
private _bounds = boundingBox _object;
|
||||
_margins params ["_marginsX", "_marginsY", "_marginsZ"];
|
||||
_offsets params ["_offsetsX", "_offsetsY", "_offsetsZ"];
|
||||
|
||||
_bounds params ["_boundsMin", "_boundsMax"];
|
||||
_boundsMin params ["_boundsMinX", "_boundsMinY", "_boundsMinZ"];
|
||||
_boundsMax params ["_boundsMaxX", "_boundsMaxY", "_boundsMaxZ"];
|
||||
|
||||
_boundsMinX = _boundsMinX - _marginsX + _offsetsX;
|
||||
_boundsMinY = _boundsMinY - _marginsY + _offsetsY;
|
||||
_boundsMinZ = _boundsMinZ - _marginsZ + _offsetsZ;
|
||||
|
||||
_boundsMaxX = _boundsMaxX + _marginsX + _offsetsX;
|
||||
_boundsMaxY = _boundsMaxY + _marginsY + _offsetsY;
|
||||
_boundsMaxZ = _boundsMaxZ + _marginsZ + _offsetsZ;
|
||||
|
||||
private _boundsCorners = [
|
||||
[_boundsMinX, _boundsMinY, _boundsMinZ],
|
||||
[_boundsMinX, _boundsMinY, _boundsMaxZ],
|
||||
[_boundsMinX, _boundsMaxY, _boundsMinZ],
|
||||
[_boundsMinX, _boundsMaxY, _boundsMaxZ],
|
||||
[_boundsMaxX, _boundsMinY, _boundsMinZ],
|
||||
[_boundsMaxX, _boundsMinY, _boundsMaxZ],
|
||||
[_boundsMaxX, _boundsMaxY, _boundsMinZ],
|
||||
[_boundsMaxX, _boundsMaxY, _boundsMaxZ]
|
||||
];
|
||||
|
||||
{
|
||||
private _ppos = worldToScreen (_object modelToWorld _x);
|
||||
|
||||
if (count _ppos >= 2) then {
|
||||
_ppos params ["_pposX", "_pposY"];
|
||||
|
||||
if (_pposX < _minX) then {_minX = _pposX};
|
||||
if (_pposX > _maxX) then {_maxX = _pposX};
|
||||
if (_pposY < _minY) then {_minY = _pposY};
|
||||
if (_pposY > _maxY) then {_maxY = _pposY};
|
||||
}; //else - what to do if it is offscreen?
|
||||
false
|
||||
} count _boundsCorners;
|
||||
|
||||
[_minX, _minY, _maxX, _maxY]
|
||||
/*
|
||||
* Author: zGuba 2011
|
||||
* Function helper for framing objects on screen.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: object <OBJECT>
|
||||
* 1: margins 3D <ARRAY>
|
||||
* 0: X <NUMBER>
|
||||
* 1: Y <NUMBER>
|
||||
* 2: Z <NUMBER>
|
||||
* 2: offset 3D <ARRAY>
|
||||
* 0: X <NUMBER>
|
||||
* 1: Y <NUMBER>
|
||||
* 2: Z <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* 0: Minimal X <NUMMBER>
|
||||
* 1: Minimal Y <NUMMBER>
|
||||
* 2: Maximal X <NUMMBER>
|
||||
* 3: Maximal Y <NUMMBER>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_object", "_margins", "_offsets"];
|
||||
|
||||
private _minX = 10;
|
||||
private _minY = 10;
|
||||
private _maxX = -10;
|
||||
private _maxY = -10;
|
||||
|
||||
private _bounds = boundingBox _object;
|
||||
_margins params ["_marginsX", "_marginsY", "_marginsZ"];
|
||||
_offsets params ["_offsetsX", "_offsetsY", "_offsetsZ"];
|
||||
|
||||
_bounds params ["_boundsMin", "_boundsMax"];
|
||||
_boundsMin params ["_boundsMinX", "_boundsMinY", "_boundsMinZ"];
|
||||
_boundsMax params ["_boundsMaxX", "_boundsMaxY", "_boundsMaxZ"];
|
||||
|
||||
_boundsMinX = _boundsMinX - _marginsX + _offsetsX;
|
||||
_boundsMinY = _boundsMinY - _marginsY + _offsetsY;
|
||||
_boundsMinZ = _boundsMinZ - _marginsZ + _offsetsZ;
|
||||
|
||||
_boundsMaxX = _boundsMaxX + _marginsX + _offsetsX;
|
||||
_boundsMaxY = _boundsMaxY + _marginsY + _offsetsY;
|
||||
_boundsMaxZ = _boundsMaxZ + _marginsZ + _offsetsZ;
|
||||
|
||||
private _boundsCorners = [
|
||||
[_boundsMinX, _boundsMinY, _boundsMinZ],
|
||||
[_boundsMinX, _boundsMinY, _boundsMaxZ],
|
||||
[_boundsMinX, _boundsMaxY, _boundsMinZ],
|
||||
[_boundsMinX, _boundsMaxY, _boundsMaxZ],
|
||||
[_boundsMaxX, _boundsMinY, _boundsMinZ],
|
||||
[_boundsMaxX, _boundsMinY, _boundsMaxZ],
|
||||
[_boundsMaxX, _boundsMaxY, _boundsMinZ],
|
||||
[_boundsMaxX, _boundsMaxY, _boundsMaxZ]
|
||||
];
|
||||
|
||||
{
|
||||
private _ppos = worldToScreen (_object modelToWorld _x);
|
||||
|
||||
if (count _ppos >= 2) then {
|
||||
_ppos params ["_pposX", "_pposY"];
|
||||
|
||||
if (_pposX < _minX) then {_minX = _pposX};
|
||||
if (_pposX > _maxX) then {_maxX = _pposX};
|
||||
if (_pposY < _minY) then {_minY = _pposY};
|
||||
if (_pposY > _maxY) then {_maxY = _pposY};
|
||||
}; //else - what to do if it is offscreen?
|
||||
false
|
||||
} count _boundsCorners;
|
||||
|
||||
[_minX, _minY, _maxX, _maxY]
|
||||
|
@ -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 ERRORDATA(c) private ["_callFrom", "_lineNo"];\
|
||||
_callFrom = "";\
|
||||
_lineNo = -1;\
|
||||
if((count _this) > c) then {\
|
||||
_callFrom = _this select c;\
|
||||
_lineNo = _this select c+1;\
|
||||
};
|
||||
#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 ERRORDATA(c) private ["_callFrom", "_lineNo"];\
|
||||
_callFrom = "";\
|
||||
_lineNo = -1;\
|
||||
if((count _this) > c) then {\
|
||||
_callFrom = _this select c;\
|
||||
_lineNo = _this select c+1;\
|
||||
};
|
||||
|
@ -155,6 +155,7 @@ class CfgVehicles {
|
||||
model = QPATHTOF(data\helper.p3d);
|
||||
class ACE_Actions {};
|
||||
class Turrets {};
|
||||
class TransportItems {};
|
||||
};
|
||||
|
||||
class Helicopter_Base_H;
|
||||
|
@ -38,12 +38,14 @@ if (isNull attachedTo _unit) exitWith {
|
||||
[_unit, "", 2] call EFUNC(common,doAnimation);
|
||||
_unit setVectorUp [0, 0, 1];
|
||||
|
||||
playSound QGVAR(Thud);
|
||||
if (_unit == ACE_player) then {
|
||||
playSound QGVAR(Thud);
|
||||
};
|
||||
|
||||
[_pfhHandle] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
||||
if (diag_tickTime > _timeToPlayRopeSound) then {
|
||||
if (_unit == ACE_player && {diag_tickTime > _timeToPlayRopeSound}) then {
|
||||
_arguments set [4, (_timeToPlayRopeSound + 1)];
|
||||
playSound QGVAR(Rope);
|
||||
};
|
||||
|
@ -1,13 +1,13 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
private _vehicle = vehicle _unit;
|
||||
|
||||
if !([_unit, _vehicle, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !((!GVAR(enabled) && FUNC(canUseFCS)) || FUNC(canUseRangefinder)) exitWith {false};
|
||||
|
||||
private _turret = [_unit] call EFUNC(common,getTurretIndex);
|
||||
|
||||
[_vehicle, _turret] call FUNC(keyDown);
|
||||
[_vehicle, _turret] call FUNC(keyUp);
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
private _vehicle = vehicle _unit;
|
||||
|
||||
if !([_unit, _vehicle, []] call EFUNC(common,canInteractWith)) exitWith {false};
|
||||
if !((!GVAR(enabled) && FUNC(canUseFCS)) || FUNC(canUseRangefinder)) exitWith {false};
|
||||
|
||||
private _turret = [_unit] call EFUNC(common,getTurretIndex);
|
||||
|
||||
[_vehicle, _turret] call FUNC(keyDown);
|
||||
[_vehicle, _turret] call FUNC(keyUp);
|
||||
|
@ -1,27 +1,27 @@
|
||||
class ACE_Settings {
|
||||
class GVAR(enabled) {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
displayName = CSTRING(enabled_displayName);
|
||||
};
|
||||
class GVAR(maxRange) {
|
||||
value = 4;
|
||||
typeName = "SCALAR";
|
||||
displayName = CSTRING(maxRange_displayName);
|
||||
description = CSTRING(maxRange_description);
|
||||
};
|
||||
class GVAR(indicatorForSelf) {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
isClientSettable = 1;
|
||||
displayName = CSTRING(indicatorForSelf_name);
|
||||
description = CSTRING(indicatorForSelf_description);
|
||||
};
|
||||
class GVAR(indicatorColor) {
|
||||
value[] = {0.83, 0.68, 0.21, 0.75};
|
||||
typeName = "COLOR";
|
||||
isClientSettable = 1;
|
||||
displayName = CSTRING(indicatorColor_name);
|
||||
description = CSTRING(indicatorColor_description);
|
||||
};
|
||||
};
|
||||
class ACE_Settings {
|
||||
class GVAR(enabled) {
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
displayName = CSTRING(enabled_displayName);
|
||||
};
|
||||
class GVAR(maxRange) {
|
||||
value = 4;
|
||||
typeName = "SCALAR";
|
||||
displayName = CSTRING(maxRange_displayName);
|
||||
description = CSTRING(maxRange_description);
|
||||
};
|
||||
class GVAR(indicatorForSelf) {
|
||||
value = 1;
|
||||
typeName = "BOOL";
|
||||
isClientSettable = 1;
|
||||
displayName = CSTRING(indicatorForSelf_name);
|
||||
description = CSTRING(indicatorForSelf_description);
|
||||
};
|
||||
class GVAR(indicatorColor) {
|
||||
value[] = {0.83, 0.68, 0.21, 0.75};
|
||||
typeName = "COLOR";
|
||||
isClientSettable = 1;
|
||||
displayName = CSTRING(indicatorColor_name);
|
||||
description = CSTRING(indicatorColor_description);
|
||||
};
|
||||
};
|
||||
|
@ -1,19 +1,19 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {QGVAR(moduleSettings)};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author = ECSTRING(common,ACETeam);
|
||||
authors[] = {"Drill"};
|
||||
url = ECSTRING(main,URL);
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {QGVAR(moduleSettings)};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author = ECSTRING(common,ACETeam);
|
||||
authors[] = {"Drill"};
|
||||
url = ECSTRING(main,URL);
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
@ -1,26 +1,26 @@
|
||||
#define COMPONENT finger
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
// #define DEBUG_MODE_FULL
|
||||
// #define DISABLE_COMPILE_CACHE
|
||||
// #define CBA_DEBUG_SYNCHRONOUS
|
||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
||||
#ifdef DEBUG_ENABLED_FINGER
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_FINGER
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_FINGER
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
||||
#define BASE_SIZE 44
|
||||
|
||||
#define FP_TIMEOUT 2
|
||||
#define FP_ACTION_TIMEOUT 1
|
||||
|
||||
#define FP_DISTANCE 10000
|
||||
#define FP_RANDOMIZATION_X 350
|
||||
#define FP_RANDOMIZATION_Y 100
|
||||
#define COMPONENT finger
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
// #define DEBUG_MODE_FULL
|
||||
// #define DISABLE_COMPILE_CACHE
|
||||
// #define CBA_DEBUG_SYNCHRONOUS
|
||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
||||
#ifdef DEBUG_ENABLED_FINGER
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_FINGER
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_FINGER
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
||||
#define BASE_SIZE 44
|
||||
|
||||
#define FP_TIMEOUT 2
|
||||
#define FP_ACTION_TIMEOUT 1
|
||||
|
||||
#define FP_DISTANCE 10000
|
||||
#define FP_RANDOMIZATION_X 350
|
||||
#define FP_RANDOMIZATION_Y 100
|
||||
|
@ -1,478 +1,478 @@
|
||||
#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 {
|
||||
// GVAR(skip) = 1;
|
||||
//};
|
||||
|
||||
class Bo_GBU12_LGB;
|
||||
class ACE_GBU12 : Bo_GBU12_LGB {
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
|
||||
GVAR(metal) = 140000;
|
||||
GVAR(charge) = 87000;
|
||||
GVAR(gurney_c) = 2320;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
sideAirFriction = 0.04;
|
||||
airFriction = 0.04;
|
||||
laserLock = 0;
|
||||
};
|
||||
|
||||
class GrenadeBase;
|
||||
class Grenade;
|
||||
class GrenadeHand: Grenade {
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(skip) = 0;
|
||||
GVAR(force) = 1;
|
||||
// This is a good high-drag frag type for grenades.
|
||||
GVAR(classes)[] = {"ACE_frag_tiny_HD"};
|
||||
/*
|
||||
These values are based on the M67 Grenade, should be tweaked for
|
||||
individual grenades.
|
||||
*/
|
||||
GVAR(metal) = 210; // metal in grams
|
||||
GVAR(charge) = 185; // explosive in grams
|
||||
GVAR(gurney_c) = 2843; // Gurney velocity constant for explosive type. See: http://en.wikipedia.org/wiki/Gurney_equations
|
||||
GVAR(gurney_k) = 3/5; // Gurney shape factor, in this case a sphere. See: http://en.wikipedia.org/wiki/Gurney_equations
|
||||
};
|
||||
class GrenadeHand_stone: GrenadeHand {
|
||||
GVAR(skip) = 1;
|
||||
};
|
||||
class SmokeShell: GrenadeHand {
|
||||
GVAR(skip) = 1;
|
||||
};
|
||||
|
||||
class RocketBase;
|
||||
class R_Hydra_HE: RocketBase {
|
||||
// Source: http://fas.org/man/dod-101/sys/missile/hydra-70.htm
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
|
||||
GVAR(metal) = 3850;
|
||||
GVAR(charge) = 1040;
|
||||
GVAR(gurney_c) = 2700;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
//class R_57mm_HE: RocketBase {
|
||||
// GVAR(skip) = 1;
|
||||
//};
|
||||
|
||||
class R_80mm_HE: RocketBase {
|
||||
GVAR(skip) = 1;
|
||||
};
|
||||
|
||||
//class R_S8T_AT: RocketBase {
|
||||
// GVAR(skip) = 1;
|
||||
//};
|
||||
|
||||
class BombCore;
|
||||
class Bo_Mk82: BombCore {
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
|
||||
GVAR(metal) = 140000;
|
||||
GVAR(charge) = 87000;
|
||||
GVAR(gurney_c) = 2320;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
|
||||
class G_40mm_HE: GrenadeBase {
|
||||
// Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M441
|
||||
GVAR(enabled) = 1;
|
||||
GVAR(force) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_tiny_HD"};
|
||||
GVAR(metal) = 200;
|
||||
GVAR(charge) = 32;
|
||||
GVAR(gurney_c) = 2700;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
class G_40mm_HEDP: G_40mm_HE {
|
||||
// Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M433
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_tiny_HD"};
|
||||
GVAR(metal) = 200;
|
||||
GVAR(charge) = 45;
|
||||
GVAR(gurney_c) = 2830;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
|
||||
class ACE_G_40mm_HEDP: G_40mm_HEDP {
|
||||
};
|
||||
class ACE_G_40mm_HE: G_40mm_HE {
|
||||
};
|
||||
class ACE_G_40mm_Practice: ACE_G_40mm_HE {
|
||||
GVAR(skip) = 1;
|
||||
GVAR(force) = 0;
|
||||
};
|
||||
class ACE_G40mm_HE_VOG25P: G_40mm_HE {
|
||||
GVAR(skip) = 0;
|
||||
GVAR(force) = 1;
|
||||
};
|
||||
|
||||
// curator ammo entries
|
||||
class ShellBase;
|
||||
class Sh_125mm_HEAT;
|
||||
class Sh_155mm_AMOS: ShellBase {
|
||||
// Source: http://www.globalsecurity.org/military/systems/munitions/m795.htm
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
|
||||
GVAR(metal) = 36000;
|
||||
GVAR(charge) = 9979;
|
||||
GVAR(gurney_c) = 2440;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
class Sh_82mm_AMOS : Sh_155mm_AMOS {
|
||||
// Source: http://www.arsenal-bg.com/defense_police/mortar_bombs_82mm.htm
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
|
||||
GVAR(metal) = 3200;
|
||||
GVAR(charge) = 420;
|
||||
GVAR(gurney_c) = 2440;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
class ModuleOrdnanceMortar_F_Ammo: Sh_82mm_AMOS {
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
|
||||
GVAR(metal) = 800;
|
||||
GVAR(charge) = 4200;
|
||||
GVAR(gurney_c) = 2320;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
class Sh_105mm_HEAT_MP : Sh_125mm_HEAT {
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
|
||||
GVAR(metal) = 11400;
|
||||
GVAR(charge) = 7100;
|
||||
GVAR(gurney_c) = 2800;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
class Sh_120mm_HE : ShellBase {
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
|
||||
GVAR(metal) = 23000;
|
||||
GVAR(charge) = 3148;
|
||||
GVAR(gurney_c) = 2830;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
class Sh_125mm_HE: Sh_120mm_HE {
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
|
||||
GVAR(metal) = 16000;
|
||||
GVAR(charge) = 3200;
|
||||
GVAR(gurney_c) = 2440;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
class ModuleOrdnanceHowitzer_F_ammo: Sh_155mm_AMOS {
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
|
||||
GVAR(metal) = 1950;
|
||||
GVAR(charge) = 15800;
|
||||
GVAR(gurney_c) = 2320;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
|
||||
//class R_230mm_HE;
|
||||
//class ModuleOrdnanceRocket_F_ammo: R_230mm_HE {
|
||||
//};
|
||||
|
||||
//class R_230mm_fly;
|
||||
//class ModuleOrdnanceRocket_F_subammo: R_230mm_fly {
|
||||
//};
|
||||
// end of curator ammo entries
|
||||
|
||||
//class R_SMAW_HEDP;
|
||||
//class R_MEEWS_HEDP : R_SMAW_HEDP {
|
||||
// GVAR(force) = 1;
|
||||
// GVAR(multiplier) = 1.2;
|
||||
//};
|
||||
|
||||
class MissileBase;
|
||||
class Missile_AGM_02_F : MissileBase {
|
||||
// Source: http://fas.org/man/dod-101/sys/smart/agm-65.htm
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
|
||||
GVAR(metal) = 56250;
|
||||
GVAR(charge) = 39000;
|
||||
GVAR(gurney_c) = 2700;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
class M_Hellfire_AT: MissileBase {
|
||||
// Source: http://www.designation-systems.net/dusrm/m-114.html
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
|
||||
GVAR(metal) = 8000;
|
||||
GVAR(charge) = 2400;
|
||||
GVAR(gurney_c) = 2700;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
|
||||
/*
|
||||
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;
|
||||
};
|
||||
|
||||
#include "CfgAmmoReflections.hpp"
|
||||
};
|
||||
#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 {
|
||||
// GVAR(skip) = 1;
|
||||
//};
|
||||
|
||||
class Bo_GBU12_LGB;
|
||||
class ACE_GBU12 : Bo_GBU12_LGB {
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
|
||||
GVAR(metal) = 140000;
|
||||
GVAR(charge) = 87000;
|
||||
GVAR(gurney_c) = 2320;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
sideAirFriction = 0.04;
|
||||
airFriction = 0.04;
|
||||
laserLock = 0;
|
||||
};
|
||||
|
||||
class GrenadeBase;
|
||||
class Grenade;
|
||||
class GrenadeHand: Grenade {
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(skip) = 0;
|
||||
GVAR(force) = 1;
|
||||
// This is a good high-drag frag type for grenades.
|
||||
GVAR(classes)[] = {"ACE_frag_tiny_HD"};
|
||||
/*
|
||||
These values are based on the M67 Grenade, should be tweaked for
|
||||
individual grenades.
|
||||
*/
|
||||
GVAR(metal) = 210; // metal in grams
|
||||
GVAR(charge) = 185; // explosive in grams
|
||||
GVAR(gurney_c) = 2843; // Gurney velocity constant for explosive type. See: http://en.wikipedia.org/wiki/Gurney_equations
|
||||
GVAR(gurney_k) = 3/5; // Gurney shape factor, in this case a sphere. See: http://en.wikipedia.org/wiki/Gurney_equations
|
||||
};
|
||||
class GrenadeHand_stone: GrenadeHand {
|
||||
GVAR(skip) = 1;
|
||||
};
|
||||
class SmokeShell: GrenadeHand {
|
||||
GVAR(skip) = 1;
|
||||
};
|
||||
|
||||
class RocketBase;
|
||||
class R_Hydra_HE: RocketBase {
|
||||
// Source: http://fas.org/man/dod-101/sys/missile/hydra-70.htm
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
|
||||
GVAR(metal) = 3850;
|
||||
GVAR(charge) = 1040;
|
||||
GVAR(gurney_c) = 2700;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
//class R_57mm_HE: RocketBase {
|
||||
// GVAR(skip) = 1;
|
||||
//};
|
||||
|
||||
class R_80mm_HE: RocketBase {
|
||||
GVAR(skip) = 1;
|
||||
};
|
||||
|
||||
//class R_S8T_AT: RocketBase {
|
||||
// GVAR(skip) = 1;
|
||||
//};
|
||||
|
||||
class BombCore;
|
||||
class Bo_Mk82: BombCore {
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
|
||||
GVAR(metal) = 140000;
|
||||
GVAR(charge) = 87000;
|
||||
GVAR(gurney_c) = 2320;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
|
||||
class G_40mm_HE: GrenadeBase {
|
||||
// Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M441
|
||||
GVAR(enabled) = 1;
|
||||
GVAR(force) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_tiny_HD"};
|
||||
GVAR(metal) = 200;
|
||||
GVAR(charge) = 32;
|
||||
GVAR(gurney_c) = 2700;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
class G_40mm_HEDP: G_40mm_HE {
|
||||
// Source: http://www.inetres.com/gp/military/infantry/grenade/40mm_ammo.html#M433
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_tiny_HD"};
|
||||
GVAR(metal) = 200;
|
||||
GVAR(charge) = 45;
|
||||
GVAR(gurney_c) = 2830;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
|
||||
class ACE_G_40mm_HEDP: G_40mm_HEDP {
|
||||
};
|
||||
class ACE_G_40mm_HE: G_40mm_HE {
|
||||
};
|
||||
class ACE_G_40mm_Practice: ACE_G_40mm_HE {
|
||||
GVAR(skip) = 1;
|
||||
GVAR(force) = 0;
|
||||
};
|
||||
class ACE_G40mm_HE_VOG25P: G_40mm_HE {
|
||||
GVAR(skip) = 0;
|
||||
GVAR(force) = 1;
|
||||
};
|
||||
|
||||
// curator ammo entries
|
||||
class ShellBase;
|
||||
class Sh_125mm_HEAT;
|
||||
class Sh_155mm_AMOS: ShellBase {
|
||||
// Source: http://www.globalsecurity.org/military/systems/munitions/m795.htm
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
|
||||
GVAR(metal) = 36000;
|
||||
GVAR(charge) = 9979;
|
||||
GVAR(gurney_c) = 2440;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
class Sh_82mm_AMOS : Sh_155mm_AMOS {
|
||||
// Source: http://www.arsenal-bg.com/defense_police/mortar_bombs_82mm.htm
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
|
||||
GVAR(metal) = 3200;
|
||||
GVAR(charge) = 420;
|
||||
GVAR(gurney_c) = 2440;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
class ModuleOrdnanceMortar_F_Ammo: Sh_82mm_AMOS {
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
|
||||
GVAR(metal) = 800;
|
||||
GVAR(charge) = 4200;
|
||||
GVAR(gurney_c) = 2320;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
class Sh_105mm_HEAT_MP : Sh_125mm_HEAT {
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
|
||||
GVAR(metal) = 11400;
|
||||
GVAR(charge) = 7100;
|
||||
GVAR(gurney_c) = 2800;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
class Sh_120mm_HE : ShellBase {
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
|
||||
GVAR(metal) = 23000;
|
||||
GVAR(charge) = 3148;
|
||||
GVAR(gurney_c) = 2830;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
class Sh_125mm_HE: Sh_120mm_HE {
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
|
||||
GVAR(metal) = 16000;
|
||||
GVAR(charge) = 3200;
|
||||
GVAR(gurney_c) = 2440;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
class ModuleOrdnanceHowitzer_F_ammo: Sh_155mm_AMOS {
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_large", "ACE_frag_large", "ACE_frag_large_HD", "ACE_frag_large", "ACE_frag_huge", "ACE_frag_huge_HD", "ACE_frag_huge"};
|
||||
GVAR(metal) = 1950;
|
||||
GVAR(charge) = 15800;
|
||||
GVAR(gurney_c) = 2320;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
|
||||
//class R_230mm_HE;
|
||||
//class ModuleOrdnanceRocket_F_ammo: R_230mm_HE {
|
||||
//};
|
||||
|
||||
//class R_230mm_fly;
|
||||
//class ModuleOrdnanceRocket_F_subammo: R_230mm_fly {
|
||||
//};
|
||||
// end of curator ammo entries
|
||||
|
||||
//class R_SMAW_HEDP;
|
||||
//class R_MEEWS_HEDP : R_SMAW_HEDP {
|
||||
// GVAR(force) = 1;
|
||||
// GVAR(multiplier) = 1.2;
|
||||
//};
|
||||
|
||||
class MissileBase;
|
||||
class Missile_AGM_02_F : MissileBase {
|
||||
// Source: http://fas.org/man/dod-101/sys/smart/agm-65.htm
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
|
||||
GVAR(metal) = 56250;
|
||||
GVAR(charge) = 39000;
|
||||
GVAR(gurney_c) = 2700;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
class M_Hellfire_AT: MissileBase {
|
||||
// Source: http://www.designation-systems.net/dusrm/m-114.html
|
||||
GVAR(enabled) = 1;
|
||||
|
||||
GVAR(classes)[] = {"ACE_frag_medium", "ACE_frag_medium_HD"};
|
||||
GVAR(metal) = 8000;
|
||||
GVAR(charge) = 2400;
|
||||
GVAR(gurney_c) = 2700;
|
||||
GVAR(gurney_k) = 1/2;
|
||||
};
|
||||
|
||||
/*
|
||||
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;
|
||||
};
|
||||
|
||||
#include "CfgAmmoReflections.hpp"
|
||||
};
|
||||
|
@ -1,130 +1,130 @@
|
||||
//CfgAmmoReflections.hpp
|
||||
|
||||
#define ACE_EXPLOSION_REFLECTION(range, hit)\
|
||||
class ace_explosion_reflection_##range##_##hit : ace_explosion_reflection_base {\
|
||||
indirectHitRange = range;\
|
||||
indirectHit = hit;\
|
||||
dangerRadiusHit = range*3;\
|
||||
suppressionRadiusHit = range*2;\
|
||||
}
|
||||
|
||||
#define ACE_EXPLOSION_RANGE(range)\
|
||||
ACE_EXPLOSION_REFLECTION(range,10);\
|
||||
ACE_EXPLOSION_REFLECTION(range,20);\
|
||||
ACE_EXPLOSION_REFLECTION(range,30);\
|
||||
ACE_EXPLOSION_REFLECTION(range,40);\
|
||||
ACE_EXPLOSION_REFLECTION(range,50);\
|
||||
ACE_EXPLOSION_REFLECTION(range,60);\
|
||||
ACE_EXPLOSION_REFLECTION(range,70);\
|
||||
ACE_EXPLOSION_REFLECTION(range,80);\
|
||||
ACE_EXPLOSION_REFLECTION(range,90);\
|
||||
ACE_EXPLOSION_REFLECTION(range,100);\
|
||||
ACE_EXPLOSION_REFLECTION(range,110);\
|
||||
ACE_EXPLOSION_REFLECTION(range,120);\
|
||||
ACE_EXPLOSION_REFLECTION(range,130);\
|
||||
ACE_EXPLOSION_REFLECTION(range,140);\
|
||||
ACE_EXPLOSION_REFLECTION(range,150);\
|
||||
ACE_EXPLOSION_REFLECTION(range,160);\
|
||||
ACE_EXPLOSION_REFLECTION(range,170);\
|
||||
ACE_EXPLOSION_REFLECTION(range,180);\
|
||||
ACE_EXPLOSION_REFLECTION(range,190);\
|
||||
ACE_EXPLOSION_REFLECTION(range,200);\
|
||||
ACE_EXPLOSION_REFLECTION(range,210);\
|
||||
ACE_EXPLOSION_REFLECTION(range,220);\
|
||||
ACE_EXPLOSION_REFLECTION(range,230);\
|
||||
ACE_EXPLOSION_REFLECTION(range,240);\
|
||||
ACE_EXPLOSION_REFLECTION(range,250);\
|
||||
ACE_EXPLOSION_REFLECTION(range,260);\
|
||||
ACE_EXPLOSION_REFLECTION(range,270);\
|
||||
ACE_EXPLOSION_REFLECTION(range,280);\
|
||||
ACE_EXPLOSION_REFLECTION(range,290);\
|
||||
ACE_EXPLOSION_REFLECTION(range,300);\
|
||||
ACE_EXPLOSION_REFLECTION(range,310);\
|
||||
ACE_EXPLOSION_REFLECTION(range,320);\
|
||||
ACE_EXPLOSION_REFLECTION(range,330);\
|
||||
ACE_EXPLOSION_REFLECTION(range,340);\
|
||||
ACE_EXPLOSION_REFLECTION(range,350);\
|
||||
ACE_EXPLOSION_REFLECTION(range,360);\
|
||||
ACE_EXPLOSION_REFLECTION(range,370);\
|
||||
ACE_EXPLOSION_REFLECTION(range,380);\
|
||||
ACE_EXPLOSION_REFLECTION(range,390);\
|
||||
ACE_EXPLOSION_REFLECTION(range,400);\
|
||||
ACE_EXPLOSION_REFLECTION(range,410);\
|
||||
ACE_EXPLOSION_REFLECTION(range,420);\
|
||||
ACE_EXPLOSION_REFLECTION(range,430);\
|
||||
ACE_EXPLOSION_REFLECTION(range,440);\
|
||||
ACE_EXPLOSION_REFLECTION(range,450);\
|
||||
ACE_EXPLOSION_REFLECTION(range,460);\
|
||||
ACE_EXPLOSION_REFLECTION(range,470);\
|
||||
ACE_EXPLOSION_REFLECTION(range,480);\
|
||||
ACE_EXPLOSION_REFLECTION(range,490);\
|
||||
ACE_EXPLOSION_REFLECTION(range,500)
|
||||
|
||||
class ace_explosion_reflection_base : Sh_120mm_HE {
|
||||
CraterWaterEffects = "";
|
||||
CraterEffects = "";
|
||||
effectsMissile = "";
|
||||
ExplosionEffects = "";
|
||||
effectFlare = "";
|
||||
class HitEffects {
|
||||
hitWater = "";
|
||||
};
|
||||
multiSoundHit[] = {};
|
||||
explosionTime = 0.0001;
|
||||
explosive = 1;
|
||||
soundFakeFall[] = {};
|
||||
typicalSpeed = 0;
|
||||
model = "\A3\Weapons_F\empty.p3d";
|
||||
craterShape = "\A3\weapons_f\empty.p3d";
|
||||
};
|
||||
|
||||
ACE_EXPLOSION_RANGE(2);
|
||||
ACE_EXPLOSION_RANGE(4);
|
||||
ACE_EXPLOSION_RANGE(6);
|
||||
ACE_EXPLOSION_RANGE(8);
|
||||
ACE_EXPLOSION_RANGE(10);
|
||||
ACE_EXPLOSION_RANGE(12);
|
||||
ACE_EXPLOSION_RANGE(14);
|
||||
ACE_EXPLOSION_RANGE(16);
|
||||
ACE_EXPLOSION_RANGE(18);
|
||||
ACE_EXPLOSION_RANGE(20);
|
||||
ACE_EXPLOSION_RANGE(22);
|
||||
ACE_EXPLOSION_RANGE(24);
|
||||
ACE_EXPLOSION_RANGE(26);
|
||||
ACE_EXPLOSION_RANGE(28);
|
||||
ACE_EXPLOSION_RANGE(30);
|
||||
ACE_EXPLOSION_RANGE(32);
|
||||
ACE_EXPLOSION_RANGE(34);
|
||||
ACE_EXPLOSION_RANGE(36);
|
||||
ACE_EXPLOSION_RANGE(38);
|
||||
ACE_EXPLOSION_RANGE(40);
|
||||
ACE_EXPLOSION_RANGE(42);
|
||||
ACE_EXPLOSION_RANGE(44);
|
||||
ACE_EXPLOSION_RANGE(46);
|
||||
ACE_EXPLOSION_RANGE(48);
|
||||
ACE_EXPLOSION_RANGE(50);
|
||||
ACE_EXPLOSION_RANGE(52);
|
||||
ACE_EXPLOSION_RANGE(54);
|
||||
ACE_EXPLOSION_RANGE(56);
|
||||
ACE_EXPLOSION_RANGE(58);
|
||||
ACE_EXPLOSION_RANGE(60);
|
||||
ACE_EXPLOSION_RANGE(62);
|
||||
ACE_EXPLOSION_RANGE(64);
|
||||
ACE_EXPLOSION_RANGE(66);
|
||||
ACE_EXPLOSION_RANGE(68);
|
||||
ACE_EXPLOSION_RANGE(70);
|
||||
ACE_EXPLOSION_RANGE(72);
|
||||
ACE_EXPLOSION_RANGE(74);
|
||||
ACE_EXPLOSION_RANGE(76);
|
||||
ACE_EXPLOSION_RANGE(78);
|
||||
ACE_EXPLOSION_RANGE(80);
|
||||
ACE_EXPLOSION_RANGE(82);
|
||||
ACE_EXPLOSION_RANGE(84);
|
||||
ACE_EXPLOSION_RANGE(86);
|
||||
ACE_EXPLOSION_RANGE(88);
|
||||
ACE_EXPLOSION_RANGE(90);
|
||||
ACE_EXPLOSION_RANGE(92);
|
||||
ACE_EXPLOSION_RANGE(94);
|
||||
ACE_EXPLOSION_RANGE(96);
|
||||
ACE_EXPLOSION_RANGE(98);
|
||||
ACE_EXPLOSION_RANGE(100);
|
||||
//CfgAmmoReflections.hpp
|
||||
|
||||
#define ACE_EXPLOSION_REFLECTION(range, hit)\
|
||||
class ace_explosion_reflection_##range##_##hit : ace_explosion_reflection_base {\
|
||||
indirectHitRange = range;\
|
||||
indirectHit = hit;\
|
||||
dangerRadiusHit = range*3;\
|
||||
suppressionRadiusHit = range*2;\
|
||||
}
|
||||
|
||||
#define ACE_EXPLOSION_RANGE(range)\
|
||||
ACE_EXPLOSION_REFLECTION(range,10);\
|
||||
ACE_EXPLOSION_REFLECTION(range,20);\
|
||||
ACE_EXPLOSION_REFLECTION(range,30);\
|
||||
ACE_EXPLOSION_REFLECTION(range,40);\
|
||||
ACE_EXPLOSION_REFLECTION(range,50);\
|
||||
ACE_EXPLOSION_REFLECTION(range,60);\
|
||||
ACE_EXPLOSION_REFLECTION(range,70);\
|
||||
ACE_EXPLOSION_REFLECTION(range,80);\
|
||||
ACE_EXPLOSION_REFLECTION(range,90);\
|
||||
ACE_EXPLOSION_REFLECTION(range,100);\
|
||||
ACE_EXPLOSION_REFLECTION(range,110);\
|
||||
ACE_EXPLOSION_REFLECTION(range,120);\
|
||||
ACE_EXPLOSION_REFLECTION(range,130);\
|
||||
ACE_EXPLOSION_REFLECTION(range,140);\
|
||||
ACE_EXPLOSION_REFLECTION(range,150);\
|
||||
ACE_EXPLOSION_REFLECTION(range,160);\
|
||||
ACE_EXPLOSION_REFLECTION(range,170);\
|
||||
ACE_EXPLOSION_REFLECTION(range,180);\
|
||||
ACE_EXPLOSION_REFLECTION(range,190);\
|
||||
ACE_EXPLOSION_REFLECTION(range,200);\
|
||||
ACE_EXPLOSION_REFLECTION(range,210);\
|
||||
ACE_EXPLOSION_REFLECTION(range,220);\
|
||||
ACE_EXPLOSION_REFLECTION(range,230);\
|
||||
ACE_EXPLOSION_REFLECTION(range,240);\
|
||||
ACE_EXPLOSION_REFLECTION(range,250);\
|
||||
ACE_EXPLOSION_REFLECTION(range,260);\
|
||||
ACE_EXPLOSION_REFLECTION(range,270);\
|
||||
ACE_EXPLOSION_REFLECTION(range,280);\
|
||||
ACE_EXPLOSION_REFLECTION(range,290);\
|
||||
ACE_EXPLOSION_REFLECTION(range,300);\
|
||||
ACE_EXPLOSION_REFLECTION(range,310);\
|
||||
ACE_EXPLOSION_REFLECTION(range,320);\
|
||||
ACE_EXPLOSION_REFLECTION(range,330);\
|
||||
ACE_EXPLOSION_REFLECTION(range,340);\
|
||||
ACE_EXPLOSION_REFLECTION(range,350);\
|
||||
ACE_EXPLOSION_REFLECTION(range,360);\
|
||||
ACE_EXPLOSION_REFLECTION(range,370);\
|
||||
ACE_EXPLOSION_REFLECTION(range,380);\
|
||||
ACE_EXPLOSION_REFLECTION(range,390);\
|
||||
ACE_EXPLOSION_REFLECTION(range,400);\
|
||||
ACE_EXPLOSION_REFLECTION(range,410);\
|
||||
ACE_EXPLOSION_REFLECTION(range,420);\
|
||||
ACE_EXPLOSION_REFLECTION(range,430);\
|
||||
ACE_EXPLOSION_REFLECTION(range,440);\
|
||||
ACE_EXPLOSION_REFLECTION(range,450);\
|
||||
ACE_EXPLOSION_REFLECTION(range,460);\
|
||||
ACE_EXPLOSION_REFLECTION(range,470);\
|
||||
ACE_EXPLOSION_REFLECTION(range,480);\
|
||||
ACE_EXPLOSION_REFLECTION(range,490);\
|
||||
ACE_EXPLOSION_REFLECTION(range,500)
|
||||
|
||||
class ace_explosion_reflection_base : Sh_120mm_HE {
|
||||
CraterWaterEffects = "";
|
||||
CraterEffects = "";
|
||||
effectsMissile = "";
|
||||
ExplosionEffects = "";
|
||||
effectFlare = "";
|
||||
class HitEffects {
|
||||
hitWater = "";
|
||||
};
|
||||
multiSoundHit[] = {};
|
||||
explosionTime = 0.0001;
|
||||
explosive = 1;
|
||||
soundFakeFall[] = {};
|
||||
typicalSpeed = 0;
|
||||
model = "\A3\Weapons_F\empty.p3d";
|
||||
craterShape = "\A3\weapons_f\empty.p3d";
|
||||
};
|
||||
|
||||
ACE_EXPLOSION_RANGE(2);
|
||||
ACE_EXPLOSION_RANGE(4);
|
||||
ACE_EXPLOSION_RANGE(6);
|
||||
ACE_EXPLOSION_RANGE(8);
|
||||
ACE_EXPLOSION_RANGE(10);
|
||||
ACE_EXPLOSION_RANGE(12);
|
||||
ACE_EXPLOSION_RANGE(14);
|
||||
ACE_EXPLOSION_RANGE(16);
|
||||
ACE_EXPLOSION_RANGE(18);
|
||||
ACE_EXPLOSION_RANGE(20);
|
||||
ACE_EXPLOSION_RANGE(22);
|
||||
ACE_EXPLOSION_RANGE(24);
|
||||
ACE_EXPLOSION_RANGE(26);
|
||||
ACE_EXPLOSION_RANGE(28);
|
||||
ACE_EXPLOSION_RANGE(30);
|
||||
ACE_EXPLOSION_RANGE(32);
|
||||
ACE_EXPLOSION_RANGE(34);
|
||||
ACE_EXPLOSION_RANGE(36);
|
||||
ACE_EXPLOSION_RANGE(38);
|
||||
ACE_EXPLOSION_RANGE(40);
|
||||
ACE_EXPLOSION_RANGE(42);
|
||||
ACE_EXPLOSION_RANGE(44);
|
||||
ACE_EXPLOSION_RANGE(46);
|
||||
ACE_EXPLOSION_RANGE(48);
|
||||
ACE_EXPLOSION_RANGE(50);
|
||||
ACE_EXPLOSION_RANGE(52);
|
||||
ACE_EXPLOSION_RANGE(54);
|
||||
ACE_EXPLOSION_RANGE(56);
|
||||
ACE_EXPLOSION_RANGE(58);
|
||||
ACE_EXPLOSION_RANGE(60);
|
||||
ACE_EXPLOSION_RANGE(62);
|
||||
ACE_EXPLOSION_RANGE(64);
|
||||
ACE_EXPLOSION_RANGE(66);
|
||||
ACE_EXPLOSION_RANGE(68);
|
||||
ACE_EXPLOSION_RANGE(70);
|
||||
ACE_EXPLOSION_RANGE(72);
|
||||
ACE_EXPLOSION_RANGE(74);
|
||||
ACE_EXPLOSION_RANGE(76);
|
||||
ACE_EXPLOSION_RANGE(78);
|
||||
ACE_EXPLOSION_RANGE(80);
|
||||
ACE_EXPLOSION_RANGE(82);
|
||||
ACE_EXPLOSION_RANGE(84);
|
||||
ACE_EXPLOSION_RANGE(86);
|
||||
ACE_EXPLOSION_RANGE(88);
|
||||
ACE_EXPLOSION_RANGE(90);
|
||||
ACE_EXPLOSION_RANGE(92);
|
||||
ACE_EXPLOSION_RANGE(94);
|
||||
ACE_EXPLOSION_RANGE(96);
|
||||
ACE_EXPLOSION_RANGE(98);
|
||||
ACE_EXPLOSION_RANGE(100);
|
||||
|
@ -1,18 +1,18 @@
|
||||
|
||||
class Extended_PreStart_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preStart));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PreStart_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preStart));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
};
|
||||
|
@ -1,30 +1,30 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
if(GVAR(EnableDebugTrace) && !isMultiplayer) then {
|
||||
GVAR(traceFrags) = true;
|
||||
GVAR(autoTrace) = true;
|
||||
};
|
||||
|
||||
if(isServer) then {
|
||||
[QGVAR(frag_eh), { _this call FUNC(frago); }] call CBA_fnc_addEventHandler;
|
||||
};
|
||||
|
||||
["ace_settingsInitialized", {
|
||||
//If not enabled, exit
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
|
||||
// Register fire event handler
|
||||
["ace_firedPlayer", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayerNonLocal", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedNonPlayer", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayerVehicle", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayerVehicleNonLocal", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedNonPlayerVehicle", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
|
||||
[FUNC(masterPFH), 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
//Cache for ammo type configs
|
||||
GVAR(cacheRoundsTypesToTrack) = createLocation ["ACE_HashLocation", [-10000,-10000,-10000], 0, 0];
|
||||
GVAR(cacheRoundsTypesToTrack) setText QGVAR(cacheRoundsTypesToTrack);
|
||||
#include "script_component.hpp"
|
||||
|
||||
if(GVAR(EnableDebugTrace) && !isMultiplayer) then {
|
||||
GVAR(traceFrags) = true;
|
||||
GVAR(autoTrace) = true;
|
||||
};
|
||||
|
||||
if(isServer) then {
|
||||
[QGVAR(frag_eh), { _this call FUNC(frago); }] call CBA_fnc_addEventHandler;
|
||||
};
|
||||
|
||||
["ace_settingsInitialized", {
|
||||
//If not enabled, exit
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
|
||||
// Register fire event handler
|
||||
["ace_firedPlayer", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayerNonLocal", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedNonPlayer", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayerVehicle", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedPlayerVehicleNonLocal", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
["ace_firedNonPlayerVehicle", DFUNC(fired)] call CBA_fnc_addEventHandler;
|
||||
|
||||
[FUNC(masterPFH), 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
//Cache for ammo type configs
|
||||
GVAR(cacheRoundsTypesToTrack) = createLocation ["ACE_HashLocation", [-10000,-10000,-10000], 0, 0];
|
||||
GVAR(cacheRoundsTypesToTrack) setText QGVAR(cacheRoundsTypesToTrack);
|
||||
|
@ -1,25 +1,25 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
#include "XEH_PREP.hpp"
|
||||
|
||||
GVAR(blackList) = [];
|
||||
GVAR(traceFrags) = false;
|
||||
|
||||
GVAR(TOTALFRAGS) = 0;
|
||||
|
||||
GVAR(spallHPData) = [];
|
||||
GVAR(spallIsTrackingCount) = 0;
|
||||
|
||||
GVAR(autoTrace) = false;
|
||||
GVAR(traceID) = -1;
|
||||
GVAR(traces) = [];
|
||||
GVAR(tracesStarted) = false;
|
||||
|
||||
GVAR(lastIterationIndex) = 0;
|
||||
GVAR(objects) = [];
|
||||
GVAR(objectTypes) = [];
|
||||
GVAR(arguments) = [];
|
||||
|
||||
ADDON = true;
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
#include "XEH_PREP.hpp"
|
||||
|
||||
GVAR(blackList) = [];
|
||||
GVAR(traceFrags) = false;
|
||||
|
||||
GVAR(TOTALFRAGS) = 0;
|
||||
|
||||
GVAR(spallHPData) = [];
|
||||
GVAR(spallIsTrackingCount) = 0;
|
||||
|
||||
GVAR(autoTrace) = false;
|
||||
GVAR(traceID) = -1;
|
||||
GVAR(traces) = [];
|
||||
GVAR(tracesStarted) = false;
|
||||
|
||||
GVAR(lastIterationIndex) = 0;
|
||||
GVAR(objects) = [];
|
||||
GVAR(objectTypes) = [];
|
||||
GVAR(arguments) = [];
|
||||
|
||||
ADDON = true;
|
||||
|
@ -1,17 +1,17 @@
|
||||
#include "script_component.hpp"
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author = ECSTRING(common,ACETeam);
|
||||
authors[] = {"Nou"};
|
||||
url = ECSTRING(main,URL);
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventhandlers.hpp"
|
||||
#include "CfgAmmo.hpp"
|
||||
#include "ACE_Settings.hpp"
|
||||
#include "script_component.hpp"
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author = ECSTRING(common,ACETeam);
|
||||
authors[] = {"Nou"};
|
||||
url = ECSTRING(main,URL);
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventhandlers.hpp"
|
||||
#include "CfgAmmo.hpp"
|
||||
#include "ACE_Settings.hpp"
|
||||
|
@ -1,74 +1,74 @@
|
||||
//#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_enabled", "_doSpall", "_spallTrack", "_spallTrackID"];
|
||||
PARAMS_3(_gun,_type,_round);
|
||||
DEFAULT_PARAM(3,_doFragTrack,false);
|
||||
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
|
||||
//_enabled = getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(enabled));
|
||||
//if(_enabled < 1) exitWith {};
|
||||
|
||||
if(_round in GVAR(blackList)) exitWith {
|
||||
GVAR(blackList) = GVAR(blackList) - [_round];
|
||||
};
|
||||
|
||||
// Exit on max track
|
||||
if( (count GVAR(objects)) > GVAR(MaxTrack)) exitWith { };
|
||||
|
||||
if(_gun == ACE_player) then {
|
||||
_doFragTrack = true;
|
||||
} else {
|
||||
if((gunner _gun) == ACE_player) then {
|
||||
_doFragTrack = true;
|
||||
} else {
|
||||
if(local _gun && {!(isPlayer (gunner _gun))} && {!(isPlayer _gun)}) then {
|
||||
_doFragTrack = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_doSpall = false;
|
||||
if(GVAR(SpallEnabled)) then {
|
||||
if(GVAR(spallIsTrackingCount) <= 0) then {
|
||||
GVAR(spallHPData) = [];
|
||||
};
|
||||
if(GVAR(spallIsTrackingCount) > 5) then {
|
||||
// ACE_player sideChat "LIMT!";
|
||||
} else {
|
||||
_doSpall = true;
|
||||
GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) + 1;
|
||||
};
|
||||
};
|
||||
// ACE_player sideChat format["c: %1", GVAR(spallIsTrackingCount)];
|
||||
|
||||
if(GVAR(autoTrace)) then {
|
||||
[ACE_player, _round, [1,0,0,1]] call FUNC(addTrack);
|
||||
};
|
||||
|
||||
// We only do the single track object check here.
|
||||
// We should do an {!(_round in GVAR(objects))}
|
||||
// But we leave that out here for optimization. So this cannot be a framework function
|
||||
// Otherwise, it should only be added once and from the FiredEH
|
||||
if(_doFragTrack && alive _round) then {
|
||||
_spallTrack = [];
|
||||
_spallTrackID = [];
|
||||
|
||||
private["_args"];
|
||||
_args = [_round, (getPosASL _round), (velocity _round), _type, diag_frameno, _gun, _doSpall, _spallTrack, _spallTrackID,
|
||||
(getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(skip))),
|
||||
(getNumber (configFile >> "CfgAmmo" >> _type >> "explosive")),
|
||||
(getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange")),
|
||||
(getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(force))),
|
||||
(getNumber(configFile >> "CfgAmmo" >> _type >> "indirecthit")*(sqrt((getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange")))))
|
||||
];
|
||||
TRACE_1("Initializing track", _round);
|
||||
GVAR(objects) pushBack _round;
|
||||
GVAR(arguments) pushBack _args;
|
||||
|
||||
if(_doSpall) then {
|
||||
[_round, 1, _spallTrack, _spallTrackID] call FUNC(spallTrack);
|
||||
};
|
||||
// ACE_player sideChat "WTF2";
|
||||
};
|
||||
//#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_enabled", "_doSpall", "_spallTrack", "_spallTrackID"];
|
||||
PARAMS_3(_gun,_type,_round);
|
||||
DEFAULT_PARAM(3,_doFragTrack,false);
|
||||
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
|
||||
//_enabled = getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(enabled));
|
||||
//if(_enabled < 1) exitWith {};
|
||||
|
||||
if(_round in GVAR(blackList)) exitWith {
|
||||
GVAR(blackList) = GVAR(blackList) - [_round];
|
||||
};
|
||||
|
||||
// Exit on max track
|
||||
if( (count GVAR(objects)) > GVAR(MaxTrack)) exitWith { };
|
||||
|
||||
if(_gun == ACE_player) then {
|
||||
_doFragTrack = true;
|
||||
} else {
|
||||
if((gunner _gun) == ACE_player) then {
|
||||
_doFragTrack = true;
|
||||
} else {
|
||||
if(local _gun && {!(isPlayer (gunner _gun))} && {!(isPlayer _gun)}) then {
|
||||
_doFragTrack = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_doSpall = false;
|
||||
if(GVAR(SpallEnabled)) then {
|
||||
if(GVAR(spallIsTrackingCount) <= 0) then {
|
||||
GVAR(spallHPData) = [];
|
||||
};
|
||||
if(GVAR(spallIsTrackingCount) > 5) then {
|
||||
// ACE_player sideChat "LIMT!";
|
||||
} else {
|
||||
_doSpall = true;
|
||||
GVAR(spallIsTrackingCount) = GVAR(spallIsTrackingCount) + 1;
|
||||
};
|
||||
};
|
||||
// ACE_player sideChat format["c: %1", GVAR(spallIsTrackingCount)];
|
||||
|
||||
if(GVAR(autoTrace)) then {
|
||||
[ACE_player, _round, [1,0,0,1]] call FUNC(addTrack);
|
||||
};
|
||||
|
||||
// We only do the single track object check here.
|
||||
// We should do an {!(_round in GVAR(objects))}
|
||||
// But we leave that out here for optimization. So this cannot be a framework function
|
||||
// Otherwise, it should only be added once and from the FiredEH
|
||||
if(_doFragTrack && alive _round) then {
|
||||
_spallTrack = [];
|
||||
_spallTrackID = [];
|
||||
|
||||
private["_args"];
|
||||
_args = [_round, (getPosASL _round), (velocity _round), _type, diag_frameno, _gun, _doSpall, _spallTrack, _spallTrackID,
|
||||
(getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(skip))),
|
||||
(getNumber (configFile >> "CfgAmmo" >> _type >> "explosive")),
|
||||
(getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange")),
|
||||
(getNumber (configFile >> "CfgAmmo" >> _type >> QGVAR(force))),
|
||||
(getNumber(configFile >> "CfgAmmo" >> _type >> "indirecthit")*(sqrt((getNumber (configFile >> "CfgAmmo" >> _type >> "indirectHitRange")))))
|
||||
];
|
||||
TRACE_1("Initializing track", _round);
|
||||
GVAR(objects) pushBack _round;
|
||||
GVAR(arguments) pushBack _args;
|
||||
|
||||
if(_doSpall) then {
|
||||
[_round, 1, _spallTrack, _spallTrackID] call FUNC(spallTrack);
|
||||
};
|
||||
// ACE_player sideChat "WTF2";
|
||||
};
|
||||
|
@ -1,23 +1,23 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_color", "_data", "_index", "_obj", "_objSpd", "_origin", "_positions"];
|
||||
|
||||
if (GVAR(autoTrace)) then {
|
||||
[] call FUNC(startTracing);
|
||||
};
|
||||
|
||||
// setAccTime 0.05;
|
||||
_index = (count GVAR(traces));
|
||||
_obj = _this select 1;
|
||||
_origin = _this select 0;
|
||||
_color = [1,0,0,1];
|
||||
if((count _this) > 2) then {
|
||||
_color = _this select 2;
|
||||
};
|
||||
_positions = [];
|
||||
_objSpd = vectorMagnitude (velocity _obj);
|
||||
_positions set[(count _positions), [(getPos _obj), _objSpd]];
|
||||
_data = [_origin, typeOf _origin, typeOf _obj, _objSpd, _positions, _color];
|
||||
|
||||
GVAR(traces) set[_index, _data];
|
||||
[DFUNC(trackTrace), 0, [_obj, _index, CBA_missionTime]] call CBA_fnc_addPerFrameHandler;
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_color", "_data", "_index", "_obj", "_objSpd", "_origin", "_positions"];
|
||||
|
||||
if (GVAR(autoTrace)) then {
|
||||
[] call FUNC(startTracing);
|
||||
};
|
||||
|
||||
// setAccTime 0.05;
|
||||
_index = (count GVAR(traces));
|
||||
_obj = _this select 1;
|
||||
_origin = _this select 0;
|
||||
_color = [1,0,0,1];
|
||||
if((count _this) > 2) then {
|
||||
_color = _this select 2;
|
||||
};
|
||||
_positions = [];
|
||||
_objSpd = vectorMagnitude (velocity _obj);
|
||||
_positions set[(count _positions), [(getPos _obj), _objSpd]];
|
||||
_data = [_origin, typeOf _origin, typeOf _obj, _objSpd, _positions, _color];
|
||||
|
||||
GVAR(traces) set[_index, _data];
|
||||
[DFUNC(trackTrace), 0, [_obj, _index, CBA_missionTime]] call CBA_fnc_addPerFrameHandler;
|
||||
|
@ -1,26 +1,26 @@
|
||||
//fnc_doExplosions.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_params", "_explosions", "_index", "_i", "_exp", "_refExp", "_bpos", "_hit", "_distance", "_indirectHitRange", "_depth"];
|
||||
_params = _this select 0;
|
||||
_explosions = _params select 0;
|
||||
_index = _params select 1;
|
||||
for "_i" from _index to ((_index+2) min (count _explosions)) do {
|
||||
_exp = _explosions select _i;
|
||||
_refExp = _exp select 0;
|
||||
_bpos = _exp select 1;
|
||||
_hit = _exp select 2;
|
||||
_distance = _exp select 3;
|
||||
_indirectHitRange = _exp select 4;
|
||||
_depth = _exp select 5;
|
||||
_refExp createVehicle (ASLtoATL _bpos);
|
||||
// if(_hit >= 150 && _distance > _indirectHitRange) then {
|
||||
// [_bpos, _refExp, _depth] call FUNC(doReflections);
|
||||
// };
|
||||
};
|
||||
_index = _index + 2;
|
||||
if(_index >= (count _explosions)) then {
|
||||
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
||||
} else {
|
||||
_params set[1, _index];
|
||||
};
|
||||
//fnc_doExplosions.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_params", "_explosions", "_index", "_i", "_exp", "_refExp", "_bpos", "_hit", "_distance", "_indirectHitRange", "_depth"];
|
||||
_params = _this select 0;
|
||||
_explosions = _params select 0;
|
||||
_index = _params select 1;
|
||||
for "_i" from _index to ((_index+2) min (count _explosions)) do {
|
||||
_exp = _explosions select _i;
|
||||
_refExp = _exp select 0;
|
||||
_bpos = _exp select 1;
|
||||
_hit = _exp select 2;
|
||||
_distance = _exp select 3;
|
||||
_indirectHitRange = _exp select 4;
|
||||
_depth = _exp select 5;
|
||||
_refExp createVehicle (ASLtoATL _bpos);
|
||||
// if(_hit >= 150 && _distance > _indirectHitRange) then {
|
||||
// [_bpos, _refExp, _depth] call FUNC(doReflections);
|
||||
// };
|
||||
};
|
||||
_index = _index + 2;
|
||||
if(_index >= (count _explosions)) then {
|
||||
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
||||
} else {
|
||||
_params set[1, _index];
|
||||
};
|
||||
|
@ -1,18 +1,18 @@
|
||||
//fnc_doReflections.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_pos", "_ammo", "_depth", "_hit", "_range", "_hitFactor", "_indirectHitRange", "_indirectHit", "_testParams"];
|
||||
|
||||
_pos = _this select 0;
|
||||
_ammo = _this select 1;
|
||||
_depth = 1;
|
||||
if(count _this > 2) then {
|
||||
_depth = _this select 2;
|
||||
};
|
||||
// TEST_ICONS pushBack [_pos, format["EXP!", _hit, _range, _hitFactor]];
|
||||
if(_depth <= 2) then {
|
||||
_indirectHitRange = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHitRange");
|
||||
_indirectHit = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHit");
|
||||
_testParams = [_pos, [_indirectHitRange, _indirectHit], [], [], -4, _depth, 0];
|
||||
[DFUNC(findReflections), 0, _testParams] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
//fnc_doReflections.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_pos", "_ammo", "_depth", "_hit", "_range", "_hitFactor", "_indirectHitRange", "_indirectHit", "_testParams"];
|
||||
|
||||
_pos = _this select 0;
|
||||
_ammo = _this select 1;
|
||||
_depth = 1;
|
||||
if(count _this > 2) then {
|
||||
_depth = _this select 2;
|
||||
};
|
||||
// TEST_ICONS pushBack [_pos, format["EXP!", _hit, _range, _hitFactor]];
|
||||
if(_depth <= 2) then {
|
||||
_indirectHitRange = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHitRange");
|
||||
_indirectHit = getNumber(configFile >> "CfgAmmo" >> _ammo >> "indirectHit");
|
||||
_testParams = [_pos, [_indirectHitRange, _indirectHit], [], [], -4, _depth, 0];
|
||||
[DFUNC(findReflections), 0, _testParams] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
@ -1,151 +1,151 @@
|
||||
//fnc_doSpall.sqf
|
||||
#include "script_component.hpp"
|
||||
// ACE_player sideChat "WAAAAAAAAAAAAAAAAAAAAA";
|
||||
|
||||
private ["_hitData", "_initialData", "_hpData", "_object", "_foundObjects", "_index", "_foundObjecsts", "_roundType", "_round", "_caliber", "_explosive", "_idh", "_alive", "_exit", "_vm", "_velocity", "_oldVelocity", "_curVelocity", "_diff", "_polar", "_unitDir", "_spallPos", "_pos1", "_i", "_pos2", "_blah", "_data", "_spallPolar", "_warn", "_c", "_m", "_k", "_gC", "_fragPower", "_fragTypes", "_spread", "_spallCount", "_elev", "_dir", "_vel", "_spallFragVect", "_fragType", "_fragment", "_pos"];
|
||||
|
||||
_hitData = _this select 0;
|
||||
_initialData = GVAR(spallHPData) select (_hitData select 0);
|
||||
_hpData = (_hitData select 1) select (_this select 1);
|
||||
|
||||
|
||||
_object = _hpData select 0;
|
||||
_object removeEventHandler ["hitPart", _initialData select 0];
|
||||
_foundObjects = _initialData select 7;
|
||||
_index = _foundObjects find _object;
|
||||
if(_index != -1) then {
|
||||
_foundObjecsts set[_index, nil];
|
||||
};
|
||||
|
||||
_roundType = (_initialData select 2);
|
||||
_round = (_initialData select 3);
|
||||
_object = (_initialData select 1);
|
||||
|
||||
_caliber = getNumber(configFile >> "CfgAmmo" >> _roundType >> "caliber");
|
||||
_explosive = getNumber(configFile >> "CfgAmmo" >> _roundType >> "explosive");
|
||||
_idh = getNumber(configFile >> "CfgAmmo" >> _roundType >> "indirectHitRange");
|
||||
|
||||
_alive = true;
|
||||
if(!alive _round && (_initialData select 6) == 1) then {
|
||||
_alive = false;
|
||||
};
|
||||
|
||||
if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then {
|
||||
// ACE_player sideChat format["BBBB"];
|
||||
_exit = false;
|
||||
_vm = 1;
|
||||
_velocity = _initialData select 5;
|
||||
|
||||
_oldVelocity = vectorMagnitude _velocity;
|
||||
_curVelocity = vectorMagnitude (velocity _round);
|
||||
|
||||
if(alive _round) then {
|
||||
_diff = _velocity vectorDiff (velocity _round);
|
||||
_polar = _diff call CBA_fnc_vect2polar;
|
||||
// ACE_player sideChat format["polar: %1", _polar];
|
||||
if((abs(_polar select 1) > 45 || abs(_polar select 2) > 45)) then {
|
||||
if(_caliber < 2.5) then {
|
||||
// ACE_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 vectorAdd (_unitDir vectorMultiply (0.01 * _i));
|
||||
_pos2 = _pos vectorAdd (_unitDir vectorMultiply (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 {
|
||||
// ACE_player sideChat format["FOUND!"];
|
||||
_spallPos = _pos2;
|
||||
};
|
||||
};
|
||||
if(!isNil "_spallPos") then {
|
||||
_spallPolar = _velocity call CBA_fnc_vect2polar;
|
||||
|
||||
if(_explosive > 0) then {
|
||||
// ACE_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 {
|
||||
ACE_LOGWARNING_1("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"
|
||||
|
||||
];
|
||||
|
||||
// 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 {
|
||||
[ACE_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 {
|
||||
[ACE_player, _fragment, [1,0,0,1]] call FUNC(addTrack);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
//fnc_doSpall.sqf
|
||||
#include "script_component.hpp"
|
||||
// ACE_player sideChat "WAAAAAAAAAAAAAAAAAAAAA";
|
||||
|
||||
private ["_hitData", "_initialData", "_hpData", "_object", "_foundObjects", "_index", "_foundObjecsts", "_roundType", "_round", "_caliber", "_explosive", "_idh", "_alive", "_exit", "_vm", "_velocity", "_oldVelocity", "_curVelocity", "_diff", "_polar", "_unitDir", "_spallPos", "_pos1", "_i", "_pos2", "_blah", "_data", "_spallPolar", "_warn", "_c", "_m", "_k", "_gC", "_fragPower", "_fragTypes", "_spread", "_spallCount", "_elev", "_dir", "_vel", "_spallFragVect", "_fragType", "_fragment", "_pos"];
|
||||
|
||||
_hitData = _this select 0;
|
||||
_initialData = GVAR(spallHPData) select (_hitData select 0);
|
||||
_hpData = (_hitData select 1) select (_this select 1);
|
||||
|
||||
|
||||
_object = _hpData select 0;
|
||||
_object removeEventHandler ["hitPart", _initialData select 0];
|
||||
_foundObjects = _initialData select 7;
|
||||
_index = _foundObjects find _object;
|
||||
if(_index != -1) then {
|
||||
_foundObjecsts set[_index, nil];
|
||||
};
|
||||
|
||||
_roundType = (_initialData select 2);
|
||||
_round = (_initialData select 3);
|
||||
_object = (_initialData select 1);
|
||||
|
||||
_caliber = getNumber(configFile >> "CfgAmmo" >> _roundType >> "caliber");
|
||||
_explosive = getNumber(configFile >> "CfgAmmo" >> _roundType >> "explosive");
|
||||
_idh = getNumber(configFile >> "CfgAmmo" >> _roundType >> "indirectHitRange");
|
||||
|
||||
_alive = true;
|
||||
if(!alive _round && (_initialData select 6) == 1) then {
|
||||
_alive = false;
|
||||
};
|
||||
|
||||
if(_alive || {_caliber >= 2.5} || {(_explosive > 0 && {_idh >= 1})}) then {
|
||||
// ACE_player sideChat format["BBBB"];
|
||||
_exit = false;
|
||||
_vm = 1;
|
||||
_velocity = _initialData select 5;
|
||||
|
||||
_oldVelocity = vectorMagnitude _velocity;
|
||||
_curVelocity = vectorMagnitude (velocity _round);
|
||||
|
||||
if(alive _round) then {
|
||||
_diff = _velocity vectorDiff (velocity _round);
|
||||
_polar = _diff call CBA_fnc_vect2polar;
|
||||
// ACE_player sideChat format["polar: %1", _polar];
|
||||
if((abs(_polar select 1) > 45 || abs(_polar select 2) > 45)) then {
|
||||
if(_caliber < 2.5) then {
|
||||
// ACE_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 vectorAdd (_unitDir vectorMultiply (0.01 * _i));
|
||||
_pos2 = _pos vectorAdd (_unitDir vectorMultiply (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 {
|
||||
// ACE_player sideChat format["FOUND!"];
|
||||
_spallPos = _pos2;
|
||||
};
|
||||
};
|
||||
if(!isNil "_spallPos") then {
|
||||
_spallPolar = _velocity call CBA_fnc_vect2polar;
|
||||
|
||||
if(_explosive > 0) then {
|
||||
// ACE_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 {
|
||||
ACE_LOGWARNING_1("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"
|
||||
|
||||
];
|
||||
|
||||
// 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 {
|
||||
[ACE_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 {
|
||||
[ACE_player, _fragment, [1,0,0,1]] call FUNC(addTrack);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,31 +1,31 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_color", "_index", "_lastPos", "_lastSpd", "_max", "_positions", "_startSpeed"];
|
||||
|
||||
{
|
||||
_positions = _x select 4;
|
||||
_color = _x select 5;
|
||||
_index = 0;
|
||||
_max = count _positions;
|
||||
_startSpeed = 0.01 max ((_positions select 0) select 1);
|
||||
_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, "RobotoCondensed"];
|
||||
} forEach GVAR(traces);
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_color", "_index", "_lastPos", "_lastSpd", "_max", "_positions", "_startSpeed"];
|
||||
|
||||
{
|
||||
_positions = _x select 4;
|
||||
_color = _x select 5;
|
||||
_index = 0;
|
||||
_max = count _positions;
|
||||
_startSpeed = 0.01 max ((_positions select 0) select 1);
|
||||
_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, "RobotoCondensed"];
|
||||
} forEach GVAR(traces);
|
||||
|
@ -1,128 +1,128 @@
|
||||
//fnc_findReflections.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_split", "_radi", "_params", "_pos", "_explosiveInfo", "_los", "_nlos", "_zIndex", "_depth", "_indirectHitRange", "_indirectHit", "_distanceCount", "_lastPos", "_test", "_vec", "_testPos", "_buckets", "_excludes", "_bucketIndex", "_bucketPos", "_bucketList", "_c", "_index", "_blist", "_avgX", "_avgY", "_avgZ", "_bpos", "_distance", "_hitFactor", "_hit", "_range", "_refExp", "_rand", "_i", "_x", "_res", "_forEachIndex", "_explosions", "_can", "_dirvec", "_zAng"];
|
||||
|
||||
BEGIN_COUNTER(fnc_findReflections);
|
||||
_params = _this select 0;
|
||||
_pos = _params select 0;
|
||||
_explosiveInfo = _params select 1;
|
||||
_los = _params select 2;
|
||||
_nlos = _params select 3;
|
||||
_zIndex = _params select 4;
|
||||
_depth = _params select 5;
|
||||
_rand = _params select 6;
|
||||
|
||||
_split = 15;
|
||||
_radi = (360/_split*_depth);
|
||||
|
||||
// player sideChat format["p: %1", _explosiveInfo];
|
||||
_indirectHitRange = _explosiveInfo select 0;
|
||||
_indirectHit = _explosiveInfo select 1;
|
||||
_distanceCount = (floor _indirectHitRange*4) min 100;
|
||||
|
||||
if(_zIndex < 5) then {
|
||||
_lastPos = _pos;
|
||||
_zAng = _zIndex*20+2;
|
||||
if(_zAng > 80) then {
|
||||
_radi = 1;
|
||||
_zAng = 90;
|
||||
};
|
||||
for "_i" from 0 to _radi do {
|
||||
_test = true;
|
||||
_vec = [1, ((_i*_split)+_rand) mod 360, _zAng] call CBA_fnc_polar2vect;
|
||||
for "_x" from 1 to _distanceCount do {
|
||||
_testPos = _pos vectorAdd (_vec vectorMultiply _x);
|
||||
// drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _testPos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""];
|
||||
_res = lineIntersectsWith [_pos, _testPos];
|
||||
if(count _res > 0) exitWith {
|
||||
_test = false;
|
||||
_nlos pushBack _lastPos;
|
||||
// {
|
||||
// _x addEventHandler ["HandleDamage", { diag_log text format["this: %1", _this]; }];
|
||||
// } forEach _res;
|
||||
// drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _testPos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""];
|
||||
// TEST_PAIRS pushBack [_pos, _lastPos, [1,0,0,1]];
|
||||
|
||||
};
|
||||
// if(terrainIntersectASL [_pos, _testPos]) exitWith {};
|
||||
_lastPos = _testPos;
|
||||
};
|
||||
};
|
||||
_params set[4, _zIndex+1];
|
||||
} else {
|
||||
_depth = _depth + 1;
|
||||
_buckets = [];
|
||||
_excludes = [];
|
||||
_bucketIndex = 0;
|
||||
_bucketPos = nil;
|
||||
_bucketList = nil;
|
||||
_c = 0;
|
||||
while { count(_nlos) != count(_excludes) && _c < (count _nlos) } do {
|
||||
scopeName "mainSearch";
|
||||
{
|
||||
if(!(_forEachIndex in _excludes)) then {
|
||||
_index = _buckets pushBack [_x, [_x]];
|
||||
_excludes pushBack _forEachIndex;
|
||||
_bucketPos = _x;
|
||||
_bucketList = (_buckets select _index) select 1;
|
||||
breakTo "mainSearch";
|
||||
};
|
||||
} forEach _nlos;
|
||||
{
|
||||
if(!(_forEachIndex in _excludes)) then {
|
||||
_testPos = _x;
|
||||
if(_testPos vectorDistanceSqr _bucketPos <= 30) then {
|
||||
_bucketList pushBack _x;
|
||||
_excludes pushBack _forEachIndex;
|
||||
};
|
||||
};
|
||||
} forEach _nlos;
|
||||
_c = _c + 1;
|
||||
};
|
||||
|
||||
// player sideChat format["c: %1", count _buckets];
|
||||
_explosions = [];
|
||||
{
|
||||
_blist = _x select 1;
|
||||
_avgX = 0;
|
||||
_avgY = 0;
|
||||
_avgZ = 0;
|
||||
|
||||
{
|
||||
_avgX = _avgX + (_x select 0);
|
||||
_avgY = _avgY + (_x select 1);
|
||||
_avgZ = _avgZ + (_x select 2);
|
||||
} forEach _blist;
|
||||
_c = count _blist;
|
||||
_bpos = [_avgX/_c, _avgY/_c, _avgZ/_c];
|
||||
|
||||
_distance = _pos vectorDistance _bpos;
|
||||
_hitFactor = 1-(((_distance/(_indirectHitRange*4)) min 1) max 0);
|
||||
// _hitFactor = 1/(_distance^2);
|
||||
_hit = _indirectHit*_hitFactor;
|
||||
_hit = (floor (_hit/4)) min 500;
|
||||
_hit = _hit - (_hit%10);
|
||||
_range = (floor (_indirectHitRange-(_distance/4))) min 100;
|
||||
_range = _range - (_range%2);
|
||||
|
||||
if(_hit >= 10 && _range > 0) then {
|
||||
// TEST_ICONS pushBack [_bpos, format["h: %1, r: %2, hf: %3 d: %4 ihr: %5", _hit, _range, _hitFactor, _distance, _indirectHitRange*4]];
|
||||
// TEST_PAIRS pushBack [_pos, _bpos, [1,0,0,1]];
|
||||
_refExp = format["ace_explosion_reflection_%1_%2", _range, _hit];
|
||||
// _refExp createVehicle (ASLtoATL _bpos);
|
||||
// drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _bpos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""];
|
||||
|
||||
_explosions pushBack [_refExp, _bpos, _hit, _distance, _indirectHitRange/4, _depth];
|
||||
|
||||
};
|
||||
if(count _explosions > (_radi*2)/_depth) exitWith {};
|
||||
} forEach _buckets;
|
||||
// _can = "Land_Bricks_V4_F" createVehicle (ASLtoATL _pos);
|
||||
// _dirvec = _pos vectorFromTo ((ATLtoASL (player modelToWorldVisual (player selectionPosition "Spine3"))));
|
||||
// _dirvec = _dirvec vectorMultiply 100;
|
||||
// _can setVelocity _dirvec;
|
||||
[DFUNC(doExplosions), 0, [_explosions, 0]] call CBA_fnc_addPerFrameHandler;
|
||||
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
END_COUNTER(fnc_findReflections);
|
||||
//fnc_findReflections.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_split", "_radi", "_params", "_pos", "_explosiveInfo", "_los", "_nlos", "_zIndex", "_depth", "_indirectHitRange", "_indirectHit", "_distanceCount", "_lastPos", "_test", "_vec", "_testPos", "_buckets", "_excludes", "_bucketIndex", "_bucketPos", "_bucketList", "_c", "_index", "_blist", "_avgX", "_avgY", "_avgZ", "_bpos", "_distance", "_hitFactor", "_hit", "_range", "_refExp", "_rand", "_i", "_x", "_res", "_forEachIndex", "_explosions", "_can", "_dirvec", "_zAng"];
|
||||
|
||||
BEGIN_COUNTER(fnc_findReflections);
|
||||
_params = _this select 0;
|
||||
_pos = _params select 0;
|
||||
_explosiveInfo = _params select 1;
|
||||
_los = _params select 2;
|
||||
_nlos = _params select 3;
|
||||
_zIndex = _params select 4;
|
||||
_depth = _params select 5;
|
||||
_rand = _params select 6;
|
||||
|
||||
_split = 15;
|
||||
_radi = (360/_split*_depth);
|
||||
|
||||
// player sideChat format["p: %1", _explosiveInfo];
|
||||
_indirectHitRange = _explosiveInfo select 0;
|
||||
_indirectHit = _explosiveInfo select 1;
|
||||
_distanceCount = (floor _indirectHitRange*4) min 100;
|
||||
|
||||
if(_zIndex < 5) then {
|
||||
_lastPos = _pos;
|
||||
_zAng = _zIndex*20+2;
|
||||
if(_zAng > 80) then {
|
||||
_radi = 1;
|
||||
_zAng = 90;
|
||||
};
|
||||
for "_i" from 0 to _radi do {
|
||||
_test = true;
|
||||
_vec = [1, ((_i*_split)+_rand) mod 360, _zAng] call CBA_fnc_polar2vect;
|
||||
for "_x" from 1 to _distanceCount do {
|
||||
_testPos = _pos vectorAdd (_vec vectorMultiply _x);
|
||||
// drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _testPos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""];
|
||||
_res = lineIntersectsWith [_pos, _testPos];
|
||||
if(count _res > 0) exitWith {
|
||||
_test = false;
|
||||
_nlos pushBack _lastPos;
|
||||
// {
|
||||
// _x addEventHandler ["HandleDamage", { diag_log text format["this: %1", _this]; }];
|
||||
// } forEach _res;
|
||||
// drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _testPos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""];
|
||||
// TEST_PAIRS pushBack [_pos, _lastPos, [1,0,0,1]];
|
||||
|
||||
};
|
||||
// if(terrainIntersectASL [_pos, _testPos]) exitWith {};
|
||||
_lastPos = _testPos;
|
||||
};
|
||||
};
|
||||
_params set[4, _zIndex+1];
|
||||
} else {
|
||||
_depth = _depth + 1;
|
||||
_buckets = [];
|
||||
_excludes = [];
|
||||
_bucketIndex = 0;
|
||||
_bucketPos = nil;
|
||||
_bucketList = nil;
|
||||
_c = 0;
|
||||
while { count(_nlos) != count(_excludes) && _c < (count _nlos) } do {
|
||||
scopeName "mainSearch";
|
||||
{
|
||||
if(!(_forEachIndex in _excludes)) then {
|
||||
_index = _buckets pushBack [_x, [_x]];
|
||||
_excludes pushBack _forEachIndex;
|
||||
_bucketPos = _x;
|
||||
_bucketList = (_buckets select _index) select 1;
|
||||
breakTo "mainSearch";
|
||||
};
|
||||
} forEach _nlos;
|
||||
{
|
||||
if(!(_forEachIndex in _excludes)) then {
|
||||
_testPos = _x;
|
||||
if(_testPos vectorDistanceSqr _bucketPos <= 30) then {
|
||||
_bucketList pushBack _x;
|
||||
_excludes pushBack _forEachIndex;
|
||||
};
|
||||
};
|
||||
} forEach _nlos;
|
||||
_c = _c + 1;
|
||||
};
|
||||
|
||||
// player sideChat format["c: %1", count _buckets];
|
||||
_explosions = [];
|
||||
{
|
||||
_blist = _x select 1;
|
||||
_avgX = 0;
|
||||
_avgY = 0;
|
||||
_avgZ = 0;
|
||||
|
||||
{
|
||||
_avgX = _avgX + (_x select 0);
|
||||
_avgY = _avgY + (_x select 1);
|
||||
_avgZ = _avgZ + (_x select 2);
|
||||
} forEach _blist;
|
||||
_c = count _blist;
|
||||
_bpos = [_avgX/_c, _avgY/_c, _avgZ/_c];
|
||||
|
||||
_distance = _pos vectorDistance _bpos;
|
||||
_hitFactor = 1-(((_distance/(_indirectHitRange*4)) min 1) max 0);
|
||||
// _hitFactor = 1/(_distance^2);
|
||||
_hit = _indirectHit*_hitFactor;
|
||||
_hit = (floor (_hit/4)) min 500;
|
||||
_hit = _hit - (_hit%10);
|
||||
_range = (floor (_indirectHitRange-(_distance/4))) min 100;
|
||||
_range = _range - (_range%2);
|
||||
|
||||
if(_hit >= 10 && _range > 0) then {
|
||||
// TEST_ICONS pushBack [_bpos, format["h: %1, r: %2, hf: %3 d: %4 ihr: %5", _hit, _range, _hitFactor, _distance, _indirectHitRange*4]];
|
||||
// TEST_PAIRS pushBack [_pos, _bpos, [1,0,0,1]];
|
||||
_refExp = format["ace_explosion_reflection_%1_%2", _range, _hit];
|
||||
// _refExp createVehicle (ASLtoATL _bpos);
|
||||
// drop ["\a3\data_f\Cl_basic","","Billboard",1,15,ASLtoATL _bpos,[0,0,0],1,1.275,1.0,0.0,[1],[[1,0,0,1]],[0],0.0,2.0,"","",""];
|
||||
|
||||
_explosions pushBack [_refExp, _bpos, _hit, _distance, _indirectHitRange/4, _depth];
|
||||
|
||||
};
|
||||
if(count _explosions > (_radi*2)/_depth) exitWith {};
|
||||
} forEach _buckets;
|
||||
// _can = "Land_Bricks_V4_F" createVehicle (ASLtoATL _pos);
|
||||
// _dirvec = _pos vectorFromTo ((ATLtoASL (player modelToWorldVisual (player selectionPosition "Spine3"))));
|
||||
// _dirvec = _dirvec vectorMultiply 100;
|
||||
// _can setVelocity _dirvec;
|
||||
[DFUNC(doExplosions), 0, [_explosions, 0]] call CBA_fnc_addPerFrameHandler;
|
||||
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
END_COUNTER(fnc_findReflections);
|
||||
|
@ -1,218 +1,218 @@
|
||||
//fnc_frago.sqf
|
||||
// #define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define FRAG_VEC_VAR 0.004
|
||||
|
||||
#define MAX_FRAG_COUNT 50
|
||||
|
||||
if(!isServer) exitWith { };
|
||||
|
||||
BEGIN_COUNTER(frago);
|
||||
// _startTime = diag_tickTime;
|
||||
|
||||
private ["_startTime", "_round", "_lastPos", "_lastVel", "_shellType", "_gun", "_fragTypes", "_warn", "_atlPos", "_isArmed", "_fuseDist", "_indirectHitRange", "_fragRange", "_c", "_m", "_k", "_gC", "_fragPower", "_fragPowerRandom", "_manObjects", "_objects", "_crew", "_fragCount", "_fragArcs", "_doRandom", "_boundingBox", "_targetPos", "_distance", "_add", "_bbX", "_bbY", "_bbZ", "_cubic", "_targetVel", "_baseVec", "_dir", "_currentCount", "_count", "_vecVar", "_vec", "_fp", "_vel", "_fragType", "_fragObj", "_randomCount", "_sectorSize", "_sectorOffset", "_i", "_randomDir", "_endTime", "_target"];
|
||||
|
||||
_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;
|
||||
};
|
||||
|
||||
_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"
|
||||
];
|
||||
|
||||
_warn = false;
|
||||
if(isArray (configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_CLASSES")) then {
|
||||
_fragTypes = getArray (configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_CLASSES");
|
||||
} else {
|
||||
_warn = true;
|
||||
};
|
||||
|
||||
_atlPos = ASLtoATL _lastPos;
|
||||
|
||||
_isArmed = true;
|
||||
if(!isNil "_gun") then {
|
||||
_fuseDist = getNumber(configFile >> "CfgAmmo" >> _shellType >> "fuseDistance");
|
||||
_isArmed = ((getPosASL _gun) distance _lastPos > _fuseDist);
|
||||
};
|
||||
|
||||
_indirectHitRange = getNumber(configFile >> "CfgAmmo" >> _shellType >> "indirecthitrange");
|
||||
_fragRange = 20*_indirectHitRange*4;
|
||||
// _c = 185; // grams of comp-b
|
||||
// _m = 210; // grams of fragmentating metal
|
||||
// _k = 3/5; // spherical K factor
|
||||
// _gC = 2843; // Gurney constant of comp-b in /ms
|
||||
|
||||
// _c = 429; // grams of tritonal
|
||||
// _m = 496; // grams of fragmentating metal
|
||||
// _k = 1/2; // spherical K factor
|
||||
// _gC = 2320; // Gurney constant of tritonal in /ms
|
||||
|
||||
|
||||
_c = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_CHARGE");
|
||||
if(_c == 0) then { _c = 1; _warn = true;};
|
||||
_m = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_METAL");
|
||||
if(_m == 0) then { _m = 2; _warn = true;};
|
||||
_k = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_GURNEY_K");
|
||||
if(_k == 0) then { _k = 1/2; _warn = true;};
|
||||
_gC = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_GURNEY_C");
|
||||
if(_gC == 0) then { _gC = 2440; _warn = true;};
|
||||
|
||||
if(_warn) then {
|
||||
ACE_LOGWARNING_1("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;
|
||||
_fragPower = _fragPower*0.8; // Gunery equation is for a non-fragmenting metal, imperical value of 80% represents fragmentation
|
||||
|
||||
_fragPowerRandom = _fragPower*0.5;
|
||||
if((_atlPos select 2) < 0.5) then {
|
||||
_lastPos set[2, (_lastPos select 2)+0.5];
|
||||
};
|
||||
|
||||
// _manObjects = _atlPos nearEntities ["CaManBase", _fragRange];
|
||||
|
||||
// setAccTime 0.01;
|
||||
|
||||
//_objects = nearestObjects [_atlPos, ["AllVehicles"], _fragRange]; // Not sure if tracking "ReammoBox" is required, if so revert this change for _objects
|
||||
_objects = _atlPos nearEntities [["Car", "Motorcycle", "Tank", "StaticWeapon", "CAManBase", "Air", "Ship"], _fragRange];
|
||||
|
||||
// _objects = _manObjects;
|
||||
// Target also people inside vehicles or manning weapons
|
||||
_crew = [];
|
||||
{
|
||||
{
|
||||
_crew set [count _crew,_x]
|
||||
} forEach (crew _x);
|
||||
} forEach _objects;
|
||||
|
||||
_objects = _objects - _crew;
|
||||
_objects = _objects + _crew;
|
||||
|
||||
_fragCount = 0;
|
||||
|
||||
_fragArcs = [];
|
||||
_fragArcs set[360, 0];
|
||||
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
ACE_player sideChat format["_fragRange: %1", _fragRange];
|
||||
ACE_player sideChat format["_objects: %1", _objects];
|
||||
#endif
|
||||
_doRandom = true;
|
||||
if(_isArmed && (count _objects) > 0) then {
|
||||
if (GVAR(ReflectionsEnabled)) then {
|
||||
[_lastPos, _shellType] call FUNC(doReflections);
|
||||
};
|
||||
{
|
||||
//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 vectorMultiply _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;
|
||||
if(GVAR(traceFrags)) then {
|
||||
GVAR(TOTALFRAGS) = GVAR(TOTALFRAGS) + 1;
|
||||
[ACE_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)+20;
|
||||
_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 vectorMultiply _fp;
|
||||
|
||||
_fragType = round (random ((count _fragTypes)-1));
|
||||
_fragObj = (_fragTypes select _fragType) createVehicleLocal [0,0,10000];
|
||||
_fragObj setPosASL _lastPos;
|
||||
_fragObj setVectorDir _vec;
|
||||
_fragObj setVelocity _vel;
|
||||
|
||||
if(GVAR(traceFrags)) then {
|
||||
GVAR(TOTALFRAGS) = GVAR(TOTALFRAGS) + 1;
|
||||
[ACE_player, _fragObj, [1,0.5,0,1]] call FUNC(addTrack);
|
||||
};
|
||||
_fragCount = _fragCount + 1;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
// #ifdef DEBUG_MODE_FULL
|
||||
// ACE_player sideChat format["total frags: %1", GVAR(TOTALFRAGS)];
|
||||
// ACE_player sideChat format["tracks: %1", (count GVAR(trackedObjects))];
|
||||
// #endif
|
||||
// _endTime = diag_tickTime;
|
||||
//fnc_frago.sqf
|
||||
// #define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
#define FRAG_VEC_VAR 0.004
|
||||
|
||||
#define MAX_FRAG_COUNT 50
|
||||
|
||||
if(!isServer) exitWith { };
|
||||
|
||||
BEGIN_COUNTER(frago);
|
||||
// _startTime = diag_tickTime;
|
||||
|
||||
private ["_startTime", "_round", "_lastPos", "_lastVel", "_shellType", "_gun", "_fragTypes", "_warn", "_atlPos", "_isArmed", "_fuseDist", "_indirectHitRange", "_fragRange", "_c", "_m", "_k", "_gC", "_fragPower", "_fragPowerRandom", "_manObjects", "_objects", "_crew", "_fragCount", "_fragArcs", "_doRandom", "_boundingBox", "_targetPos", "_distance", "_add", "_bbX", "_bbY", "_bbZ", "_cubic", "_targetVel", "_baseVec", "_dir", "_currentCount", "_count", "_vecVar", "_vec", "_fp", "_vel", "_fragType", "_fragObj", "_randomCount", "_sectorSize", "_sectorOffset", "_i", "_randomDir", "_endTime", "_target"];
|
||||
|
||||
_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;
|
||||
};
|
||||
|
||||
_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"
|
||||
];
|
||||
|
||||
_warn = false;
|
||||
if(isArray (configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_CLASSES")) then {
|
||||
_fragTypes = getArray (configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_CLASSES");
|
||||
} else {
|
||||
_warn = true;
|
||||
};
|
||||
|
||||
_atlPos = ASLtoATL _lastPos;
|
||||
|
||||
_isArmed = true;
|
||||
if(!isNil "_gun") then {
|
||||
_fuseDist = getNumber(configFile >> "CfgAmmo" >> _shellType >> "fuseDistance");
|
||||
_isArmed = ((getPosASL _gun) distance _lastPos > _fuseDist);
|
||||
};
|
||||
|
||||
_indirectHitRange = getNumber(configFile >> "CfgAmmo" >> _shellType >> "indirecthitrange");
|
||||
_fragRange = 20*_indirectHitRange*4;
|
||||
// _c = 185; // grams of comp-b
|
||||
// _m = 210; // grams of fragmentating metal
|
||||
// _k = 3/5; // spherical K factor
|
||||
// _gC = 2843; // Gurney constant of comp-b in /ms
|
||||
|
||||
// _c = 429; // grams of tritonal
|
||||
// _m = 496; // grams of fragmentating metal
|
||||
// _k = 1/2; // spherical K factor
|
||||
// _gC = 2320; // Gurney constant of tritonal in /ms
|
||||
|
||||
|
||||
_c = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_CHARGE");
|
||||
if(_c == 0) then { _c = 1; _warn = true;};
|
||||
_m = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_METAL");
|
||||
if(_m == 0) then { _m = 2; _warn = true;};
|
||||
_k = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_GURNEY_K");
|
||||
if(_k == 0) then { _k = 1/2; _warn = true;};
|
||||
_gC = getNumber(configFile >> "CfgAmmo" >> _shellType >> "ACE_frag_GURNEY_C");
|
||||
if(_gC == 0) then { _gC = 2440; _warn = true;};
|
||||
|
||||
if(_warn) then {
|
||||
ACE_LOGWARNING_1("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;
|
||||
_fragPower = _fragPower*0.8; // Gunery equation is for a non-fragmenting metal, imperical value of 80% represents fragmentation
|
||||
|
||||
_fragPowerRandom = _fragPower*0.5;
|
||||
if((_atlPos select 2) < 0.5) then {
|
||||
_lastPos set[2, (_lastPos select 2)+0.5];
|
||||
};
|
||||
|
||||
// _manObjects = _atlPos nearEntities ["CaManBase", _fragRange];
|
||||
|
||||
// setAccTime 0.01;
|
||||
|
||||
//_objects = nearestObjects [_atlPos, ["AllVehicles"], _fragRange]; // Not sure if tracking "ReammoBox" is required, if so revert this change for _objects
|
||||
_objects = _atlPos nearEntities [["Car", "Motorcycle", "Tank", "StaticWeapon", "CAManBase", "Air", "Ship"], _fragRange];
|
||||
|
||||
// _objects = _manObjects;
|
||||
// Target also people inside vehicles or manning weapons
|
||||
_crew = [];
|
||||
{
|
||||
{
|
||||
_crew set [count _crew,_x]
|
||||
} forEach (crew _x);
|
||||
} forEach _objects;
|
||||
|
||||
_objects = _objects - _crew;
|
||||
_objects = _objects + _crew;
|
||||
|
||||
_fragCount = 0;
|
||||
|
||||
_fragArcs = [];
|
||||
_fragArcs set[360, 0];
|
||||
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
ACE_player sideChat format["_fragRange: %1", _fragRange];
|
||||
ACE_player sideChat format["_objects: %1", _objects];
|
||||
#endif
|
||||
_doRandom = true;
|
||||
if(_isArmed && (count _objects) > 0) then {
|
||||
if (GVAR(ReflectionsEnabled)) then {
|
||||
[_lastPos, _shellType] call FUNC(doReflections);
|
||||
};
|
||||
{
|
||||
//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 vectorMultiply _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;
|
||||
if(GVAR(traceFrags)) then {
|
||||
GVAR(TOTALFRAGS) = GVAR(TOTALFRAGS) + 1;
|
||||
[ACE_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)+20;
|
||||
_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 vectorMultiply _fp;
|
||||
|
||||
_fragType = round (random ((count _fragTypes)-1));
|
||||
_fragObj = (_fragTypes select _fragType) createVehicleLocal [0,0,10000];
|
||||
_fragObj setPosASL _lastPos;
|
||||
_fragObj setVectorDir _vec;
|
||||
_fragObj setVelocity _vel;
|
||||
|
||||
if(GVAR(traceFrags)) then {
|
||||
GVAR(TOTALFRAGS) = GVAR(TOTALFRAGS) + 1;
|
||||
[ACE_player, _fragObj, [1,0.5,0,1]] call FUNC(addTrack);
|
||||
};
|
||||
_fragCount = _fragCount + 1;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
// #ifdef DEBUG_MODE_FULL
|
||||
// ACE_player sideChat format["total frags: %1", GVAR(TOTALFRAGS)];
|
||||
// ACE_player sideChat format["tracks: %1", (count GVAR(trackedObjects))];
|
||||
// #endif
|
||||
// _endTime = diag_tickTime;
|
||||
END_COUNTER(frago);
|
@ -1,50 +1,50 @@
|
||||
/*
|
||||
* Author: jaynus
|
||||
*
|
||||
* Master single PFH abstraction for all rounds being tracked by frag/spall
|
||||
*
|
||||
* Arguments:
|
||||
*
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*/
|
||||
//#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
//PARAMS_2(_pfhArgs,_handle);
|
||||
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
|
||||
private["_gcIndex", "_iter"];
|
||||
_gcIndex = [];
|
||||
|
||||
_iter = 0;
|
||||
while { (count GVAR(objects)) > 0 && { _iter < (GVAR(MaxTrackPerFrame) min (count GVAR(objects))) } } do {
|
||||
private["_object", "_args"];
|
||||
if(GVAR(lastIterationIndex) >= (count GVAR(objects))) then {
|
||||
GVAR(lastIterationIndex) = 0;
|
||||
};
|
||||
_object = GVAR(objects) select GVAR(lastIterationIndex);
|
||||
|
||||
if(!isNil "_object") then {
|
||||
_args = GVAR(arguments) select GVAR(lastIterationIndex);
|
||||
|
||||
if(!(_args call FUNC(pfhRound))) then {
|
||||
_gcIndex pushBack GVAR(lastIterationIndex); // Add it to the GC if it returns false
|
||||
};
|
||||
};
|
||||
_iter = _iter + 1;
|
||||
GVAR(lastIterationIndex) = GVAR(lastIterationIndex) + 1;
|
||||
};
|
||||
|
||||
// clean up dead object references
|
||||
private["_deletionCount", "_deleteIndex"];
|
||||
_deletionCount = 0;
|
||||
{
|
||||
TRACE_1("GC Projectile", _x);
|
||||
_deleteIndex = _x - _deletionCount;
|
||||
GVAR(objects) deleteAt _deleteIndex;
|
||||
GVAR(arguments) deleteAt _deleteIndex;
|
||||
|
||||
_deletionCount = _deletionCount + 1;
|
||||
} forEach _gcIndex;
|
||||
/*
|
||||
* Author: jaynus
|
||||
*
|
||||
* Master single PFH abstraction for all rounds being tracked by frag/spall
|
||||
*
|
||||
* Arguments:
|
||||
*
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*/
|
||||
//#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
//PARAMS_2(_pfhArgs,_handle);
|
||||
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
|
||||
private["_gcIndex", "_iter"];
|
||||
_gcIndex = [];
|
||||
|
||||
_iter = 0;
|
||||
while { (count GVAR(objects)) > 0 && { _iter < (GVAR(MaxTrackPerFrame) min (count GVAR(objects))) } } do {
|
||||
private["_object", "_args"];
|
||||
if(GVAR(lastIterationIndex) >= (count GVAR(objects))) then {
|
||||
GVAR(lastIterationIndex) = 0;
|
||||
};
|
||||
_object = GVAR(objects) select GVAR(lastIterationIndex);
|
||||
|
||||
if(!isNil "_object") then {
|
||||
_args = GVAR(arguments) select GVAR(lastIterationIndex);
|
||||
|
||||
if(!(_args call FUNC(pfhRound))) then {
|
||||
_gcIndex pushBack GVAR(lastIterationIndex); // Add it to the GC if it returns false
|
||||
};
|
||||
};
|
||||
_iter = _iter + 1;
|
||||
GVAR(lastIterationIndex) = GVAR(lastIterationIndex) + 1;
|
||||
};
|
||||
|
||||
// clean up dead object references
|
||||
private["_deletionCount", "_deleteIndex"];
|
||||
_deletionCount = 0;
|
||||
{
|
||||
TRACE_1("GC Projectile", _x);
|
||||
_deleteIndex = _x - _deletionCount;
|
||||
GVAR(objects) deleteAt _deleteIndex;
|
||||
GVAR(arguments) deleteAt _deleteIndex;
|
||||
|
||||
_deletionCount = _deletionCount + 1;
|
||||
} forEach _gcIndex;
|
||||
|
@ -1,50 +1,50 @@
|
||||
#include "script_component.hpp"
|
||||
private ["_round", "_lastPos", "_lastVel", "_type", "_firedFrame", "_doSpall", "_spallTrack", "_foundObjectHPIds", "_skip", "_explosive", "_indirectRange", "_force", "_fragPower"];
|
||||
_round = _this select 0;
|
||||
_lastPos = _this select 1;
|
||||
_lastVel = _this select 2;
|
||||
_type = _this select 3;
|
||||
_firedFrame = _this select 4;
|
||||
_doSpall = _this select 6;
|
||||
_spallTrack = _this select 7;
|
||||
_foundObjectHPIds = _this select 8;
|
||||
_skip = _this select 9;
|
||||
_explosive = _this select 10;
|
||||
_indirectRange = _this select 11;
|
||||
_force = _this select 12;
|
||||
_fragPower = _this select 13;
|
||||
|
||||
if(_round in GVAR(blackList)) exitWith {
|
||||
false
|
||||
};
|
||||
|
||||
if (!alive _round) exitWith {
|
||||
if((diag_frameno - _firedFrame) > 1) then { //skip if deleted within a single frame
|
||||
if(_skip == 0) then {
|
||||
if((_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}) || {_force == 1} ) then {
|
||||
[QGVAR(frag_eh), _this] call CBA_fnc_serverEvent;
|
||||
};
|
||||
};
|
||||
};
|
||||
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;
|
||||
};
|
||||
false
|
||||
};
|
||||
|
||||
_this set[1, (getPosASL _round)];
|
||||
_this set[2, (velocity _round)];
|
||||
|
||||
if(_doSpall) then {
|
||||
private["_scale"];
|
||||
_scale = ( (count GVAR(objects)) / GVAR(MaxTrackPerFrame) ) max 0.1;
|
||||
[_round, _scale, _spallTrack, _foundObjectHPIds] call FUNC(spallTrack);
|
||||
};
|
||||
|
||||
true
|
||||
#include "script_component.hpp"
|
||||
private ["_round", "_lastPos", "_lastVel", "_type", "_firedFrame", "_doSpall", "_spallTrack", "_foundObjectHPIds", "_skip", "_explosive", "_indirectRange", "_force", "_fragPower"];
|
||||
_round = _this select 0;
|
||||
_lastPos = _this select 1;
|
||||
_lastVel = _this select 2;
|
||||
_type = _this select 3;
|
||||
_firedFrame = _this select 4;
|
||||
_doSpall = _this select 6;
|
||||
_spallTrack = _this select 7;
|
||||
_foundObjectHPIds = _this select 8;
|
||||
_skip = _this select 9;
|
||||
_explosive = _this select 10;
|
||||
_indirectRange = _this select 11;
|
||||
_force = _this select 12;
|
||||
_fragPower = _this select 13;
|
||||
|
||||
if(_round in GVAR(blackList)) exitWith {
|
||||
false
|
||||
};
|
||||
|
||||
if (!alive _round) exitWith {
|
||||
if((diag_frameno - _firedFrame) > 1) then { //skip if deleted within a single frame
|
||||
if(_skip == 0) then {
|
||||
if((_explosive > 0.5 && {_indirectRange >= 4.5} && {_fragPower >= 35}) || {_force == 1} ) then {
|
||||
[QGVAR(frag_eh), _this] call CBA_fnc_serverEvent;
|
||||
};
|
||||
};
|
||||
};
|
||||
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;
|
||||
};
|
||||
false
|
||||
};
|
||||
|
||||
_this set[1, (getPosASL _round)];
|
||||
_this set[2, (velocity _round)];
|
||||
|
||||
if(_doSpall) then {
|
||||
private["_scale"];
|
||||
_scale = ( (count GVAR(objects)) / GVAR(MaxTrackPerFrame) ) max 0.1;
|
||||
[_round, _scale, _spallTrack, _foundObjectHPIds] call FUNC(spallTrack);
|
||||
};
|
||||
|
||||
true
|
||||
|
@ -1,11 +1,11 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
// THIS FUNCTION SHOULD NOT BE USED BECAUSE IT CAUSES AN SEARCH AND REBUILD
|
||||
|
||||
PARAMS_1(_round);
|
||||
|
||||
if(_round in GVAR(blackList)) then {
|
||||
GVAR(blackList) = GVAR(blackList) - [_round];
|
||||
};
|
||||
|
||||
GVAR(objects) = GVAR(objects) - [_round];
|
||||
#include "script_component.hpp"
|
||||
|
||||
// THIS FUNCTION SHOULD NOT BE USED BECAUSE IT CAUSES AN SEARCH AND REBUILD
|
||||
|
||||
PARAMS_1(_round);
|
||||
|
||||
if(_round in GVAR(blackList)) then {
|
||||
GVAR(blackList) = GVAR(blackList) - [_round];
|
||||
};
|
||||
|
||||
GVAR(objects) = GVAR(objects) - [_round];
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_ret"];
|
||||
_ret = true;
|
||||
if(IS_ARRAY((_this select 0))) then {
|
||||
_ret = false;
|
||||
} else {
|
||||
if((_this select 0) in GVAR(trackedObjects)) then {
|
||||
GVAR(trackedObjects) = GVAR(trackedObjects) - [(_this select 0)];
|
||||
} else {
|
||||
_ret = false;
|
||||
};
|
||||
};
|
||||
_ret
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_ret"];
|
||||
_ret = true;
|
||||
if(IS_ARRAY((_this select 0))) then {
|
||||
_ret = false;
|
||||
} else {
|
||||
if((_this select 0) in GVAR(trackedObjects)) then {
|
||||
GVAR(trackedObjects) = GVAR(trackedObjects) - [(_this select 0)];
|
||||
} else {
|
||||
_ret = false;
|
||||
};
|
||||
};
|
||||
_ret
|
||||
|
@ -1,29 +1,29 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_initialData", "_hpData", "_round", "_hpRound", "_hpDirect"];
|
||||
//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), [_this, _forEachIndex]] call CBA_fnc_execNextFrame;
|
||||
// player sideChat "WEEE";
|
||||
} forEach (_this select 1);
|
||||
};
|
||||
};
|
||||
};
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_initialData", "_hpData", "_round", "_hpRound", "_hpDirect"];
|
||||
//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), [_this, _forEachIndex]] call CBA_fnc_execNextFrame;
|
||||
// player sideChat "WEEE";
|
||||
} forEach (_this select 1);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,32 +1,32 @@
|
||||
//fnc_spallTrack.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_round", "_multiplier", "_foundObjects", "_foundObjectHPIds", "_delta", "_curPos", "_velocity", "_velocityStep", "_forwardPos", "_intersectsWith", "_index", "_hpId", "_data"];
|
||||
_round = _this select 0;
|
||||
_multiplier = _this select 1;
|
||||
_foundObjects = _this select 2;
|
||||
_foundObjectHPIds = _this select 3;
|
||||
|
||||
_delta = (1/diag_fps) * _multiplier;
|
||||
_curPos = getPosASL _round;
|
||||
_velocity = velocity _round;
|
||||
|
||||
_velocityStep = _velocity vectorMultiply _delta;
|
||||
_forwardPos = _curPos vectorAdd _velocityStep;
|
||||
|
||||
_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", compile format["[%1, _this] call " + QFUNC(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;
|
||||
};
|
||||
//fnc_spallTrack.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_round", "_multiplier", "_foundObjects", "_foundObjectHPIds", "_delta", "_curPos", "_velocity", "_velocityStep", "_forwardPos", "_intersectsWith", "_index", "_hpId", "_data"];
|
||||
_round = _this select 0;
|
||||
_multiplier = _this select 1;
|
||||
_foundObjects = _this select 2;
|
||||
_foundObjectHPIds = _this select 3;
|
||||
|
||||
_delta = (1/diag_fps) * _multiplier;
|
||||
_curPos = getPosASL _round;
|
||||
_velocity = velocity _round;
|
||||
|
||||
_velocityStep = _velocity vectorMultiply _delta;
|
||||
_forwardPos = _curPos vectorAdd _velocityStep;
|
||||
|
||||
_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", compile format["[%1, _this] call " + QFUNC(spallHP), _index]];
|
||||
_foundObjects set[(count _foundObjects), _x];
|
||||
_foundObjectHPIds set[(count _foundObjectHPIds), _hpId];
|
||||
_data = [_hpId, _x, typeOf _round, _round, _curPos, _velocity, 0, _foundObjects, _foundObjectHPIds];
|
||||
GVAR(spallHPData) set[_index, _data];
|
||||
};
|
||||
} forEach _intersectsWith;
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
if(!GVAR(tracesStarted)) then {
|
||||
GVAR(tracesStarted) = true;
|
||||
GVAR(traceID) = [FUNC(drawTraces), 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
#include "script_component.hpp"
|
||||
if(!GVAR(tracesStarted)) then {
|
||||
GVAR(tracesStarted) = true;
|
||||
GVAR(traceID) = [FUNC(drawTraces), 0, []] call CBA_fnc_addPerFrameHandler;
|
||||
};
|
||||
|
@ -1,5 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
if(GVAR(tracesStarted)) then {
|
||||
GVAR(tracesStarted) = false;
|
||||
[GVAR(traceID)] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
#include "script_component.hpp"
|
||||
if(GVAR(tracesStarted)) then {
|
||||
GVAR(tracesStarted) = false;
|
||||
[GVAR(traceID)] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
@ -1,14 +1,14 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_params", "_tracerObj", "_index", "_positions", "_data"];
|
||||
_params = _this select 0;
|
||||
_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;
|
||||
_positions set [(count _positions), [(getPos _tracerObj), vectorMagnitude (velocity _tracerObj)]];
|
||||
} else {
|
||||
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_params", "_tracerObj", "_index", "_positions", "_data"];
|
||||
_params = _this select 0;
|
||||
_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;
|
||||
_positions set [(count _positions), [(getPos _tracerObj), vectorMagnitude (velocity _tracerObj)]];
|
||||
} else {
|
||||
[(_this select 1)] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
|
@ -1,20 +1,20 @@
|
||||
#define COMPONENT frag
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
//#define DEBUG_ENABLED_FRAG
|
||||
// #define DEBUG_MODE_FULL
|
||||
// #define DISABLE_COMPILE_CACHE
|
||||
// #define CBA_DEBUG_SYNCHRONOUS
|
||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
||||
#ifdef DEBUG_ENABLED_FRAG
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_FRAG
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_FRAG
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
||||
#define COMPONENT frag
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
//#define DEBUG_ENABLED_FRAG
|
||||
// #define DEBUG_MODE_FULL
|
||||
// #define DISABLE_COMPILE_CACHE
|
||||
// #define CBA_DEBUG_SYNCHRONOUS
|
||||
// #define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
||||
#ifdef DEBUG_ENABLED_FRAG
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_FRAG
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_FRAG
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
||||
#define ACE_TRACE_DRAW_INC 1
|
1
addons/gunbag/$PBOPREFIX$
Normal file
1
addons/gunbag/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\gunbag
|
12
addons/gunbag/CfgEventHandlers.hpp
Normal file
12
addons/gunbag/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
|
||||
class Extended_PreStart_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preStart));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
101
addons/gunbag/CfgVehicles.hpp
Normal file
101
addons/gunbag/CfgVehicles.hpp
Normal file
@ -0,0 +1,101 @@
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
class GVAR(WeapontoGunbag) {
|
||||
displayName = CSTRING(toGunbag);
|
||||
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canInteract) == 0);
|
||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(toGunbag));
|
||||
showDisabled = 0;
|
||||
priority = 1;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
};
|
||||
class GVAR(WeaponoffGunbag) {
|
||||
displayName = CSTRING(offGunbag);
|
||||
condition = QUOTE([ARR_2(_player,_target)] call FUNC(canInteract) == 1);
|
||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(offGunbag));
|
||||
showDisabled = 0;
|
||||
priority = 1;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
};
|
||||
class GVAR(StatusGunbag) {
|
||||
displayName = CSTRING(Status);
|
||||
condition = QUOTE([_target] call FUNC(hasGunbag));
|
||||
statement = QUOTE([_target] call FUNC(status));
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_SelfActions {
|
||||
class ACE_Equipment {
|
||||
class GVAR(actions) {
|
||||
displayName = CSTRING(displayname);
|
||||
condition = QUOTE([_player] call FUNC(hasGunbag));
|
||||
showDisabled = 0;
|
||||
priority = 0.1;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
|
||||
class GVAR(WeapontoGunbag) {
|
||||
displayName = CSTRING(toGunbag);
|
||||
condition = QUOTE([ARR_2(_player,_player)] call FUNC(canInteract) == 0);
|
||||
statement = QUOTE([ARR_2(_player,_player)] call FUNC(toGunbag));
|
||||
showDisabled = 0;
|
||||
priority = 1;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
};
|
||||
class GVAR(WeaponoffGunbag) {
|
||||
displayName = CSTRING(offGunbag);
|
||||
condition = QUOTE([ARR_2(_player,_player)] call FUNC(canInteract) == 1);
|
||||
statement = QUOTE([ARR_2(_player,_player)] call FUNC(offGunbag));
|
||||
showDisabled = 0;
|
||||
priority = 1;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
};
|
||||
class GVAR(StatusGunbag) {
|
||||
displayName = CSTRING(Status);
|
||||
condition = QUOTE([_player] call FUNC(hasGunbag));
|
||||
statement = QUOTE([_player] call FUNC(status));
|
||||
showDisabled = 0;
|
||||
priority = 2;
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class Bag_Base;
|
||||
class CLASSNAME: Bag_Base {
|
||||
_generalMacro = QUOTE(CLASSNAME);
|
||||
author = "Ir0n1E";
|
||||
scope = 2;
|
||||
displayName = CSTRING(Displayname);
|
||||
model = PATHTOF(data\gunbag.p3d);
|
||||
picture = PATHTOF(ui\gunbag_ca.paa);
|
||||
icon = PATHTOF(ui\gunbag_icon_ca.paa);
|
||||
hiddenSelections[] = {QUOTE(Camo),QUOTE(insignia)};
|
||||
hiddenSelectionsTextures[] = {PATHTOF(data\gunbag_co.paa)};
|
||||
maximumLoad = 80;
|
||||
mass = 11;
|
||||
};
|
||||
|
||||
class DOUBLES(CLASSNAME,Tan): CLASSNAME {
|
||||
_generalMacro = QUOTE(DOUBLES(CLASSNAME,Tan));
|
||||
author = "Ir0n1E";
|
||||
displayName = CSTRING(Displayname_Tan);
|
||||
picture = PATHTOF(ui\gunbag_tan_ca.paa);
|
||||
hiddenSelectionsTextures[] = {PATHTOF(data\gunbag_tan_co.paa)};
|
||||
};
|
||||
|
||||
class Box_NATO_Support_F;
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportBackpacks {
|
||||
MACRO_ADDBACKPACK(CLASSNAME,3);
|
||||
MACRO_ADDBACKPACK(DOUBLES(CLASSNAME,Tan),3);
|
||||
};
|
||||
};
|
||||
};
|
41
addons/gunbag/CfgWeapons.hpp
Normal file
41
addons/gunbag/CfgWeapons.hpp
Normal file
@ -0,0 +1,41 @@
|
||||
class CfgWeapons {
|
||||
class Rifle_Long_Base_F;
|
||||
|
||||
/* Long Rifles */
|
||||
|
||||
class GM6_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
|
||||
class LRR_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
|
||||
class DMR_06_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
|
||||
class DMR_05_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
|
||||
class DMR_04_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
|
||||
class DMR_03_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
|
||||
class DMR_02_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
|
||||
class DMR_01_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
|
||||
class EBR_base_F: Rifle_Long_Base_F {
|
||||
GVAR(allowGunbag) = 1;
|
||||
};
|
||||
};
|
10
addons/gunbag/README.md
Normal file
10
addons/gunbag/README.md
Normal file
@ -0,0 +1,10 @@
|
||||
ace_gunbag
|
||||
===============
|
||||
|
||||
Adds a gunbag for DMRs.
|
||||
|
||||
|
||||
## Maintainers
|
||||
|
||||
The people responsible for merging changes to this component or answering potential questions.
|
||||
|
9
addons/gunbag/XEH_PREP.hpp
Normal file
9
addons/gunbag/XEH_PREP.hpp
Normal file
@ -0,0 +1,9 @@
|
||||
|
||||
PREP(toGunbag);
|
||||
PREP(toGunbagCallback);
|
||||
PREP(offGunbag);
|
||||
PREP(offGunbagCallback);
|
||||
PREP(status);
|
||||
PREP(canInteract);
|
||||
PREP(calculateMass);
|
||||
PREP(hasGunbag);
|
25
addons/gunbag/XEH_preInit.sqf
Normal file
25
addons/gunbag/XEH_preInit.sqf
Normal file
@ -0,0 +1,25 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
#include "XEH_PREP.hpp"
|
||||
|
||||
// restore gunbag info after respawn
|
||||
["CAManBase", "respawn", {
|
||||
[{
|
||||
params ["_unit", "_corpse"];
|
||||
|
||||
private _newBackpack = backpackContainer _unit;
|
||||
private _oldBackpack = backpackContainer _corpse;
|
||||
|
||||
if !(typeOf _newBackpack isEqualTo typeOf _oldBackpack) exitWith {};
|
||||
|
||||
private _state = _oldBackpack getVariable [QGVAR(gunbagWeapon), []];
|
||||
|
||||
if !(_state isEqualTo []) then {
|
||||
_newBackpack setVariable [QGVAR(gunbagWeapon), _state, true];
|
||||
};
|
||||
}, _this] call CBA_fnc_execNextFrame;
|
||||
}] call CBA_fnc_addClassEventHandler;
|
||||
|
||||
ADDON = true;
|
3
addons/gunbag/XEH_preStart.sqf
Normal file
3
addons/gunbag/XEH_preStart.sqf
Normal file
@ -0,0 +1,3 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#include "XEH_PREP.hpp"
|
16
addons/gunbag/config.cpp
Normal file
16
addons/gunbag/config.cpp
Normal file
@ -0,0 +1,16 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {CLASSNAME, DOUBLES(CLASSNAME,Tan)};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_interaction", "ace_movement"};
|
||||
author[] = {"Ir0n1E"};
|
||||
VERSION_CONFIG;
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
BIN
addons/gunbag/data/gunbag.p3d
Normal file
BIN
addons/gunbag/data/gunbag.p3d
Normal file
Binary file not shown.
89
addons/gunbag/data/gunbag.rvmat
Normal file
89
addons/gunbag/data/gunbag.rvmat
Normal file
@ -0,0 +1,89 @@
|
||||
class StageTI
|
||||
{
|
||||
texture="a3\characters_f_beta\indep\data\officer_ti_ca.paa";
|
||||
};
|
||||
ambient[]={0.69999999,0.69999999,0.69999999,1};
|
||||
diffuse[]={0.69999999,0.69999999,0.69999999,1};
|
||||
forcedDiffuse[]={0.30000001,0.30000001,0.30000001,0};
|
||||
emmisive[]={0,0,0,1};
|
||||
specular[]={0.2,0.2,0.2,1};
|
||||
specularPower=100;
|
||||
PixelShaderID="Super";
|
||||
VertexShaderID="Super";
|
||||
class Stage1
|
||||
{
|
||||
texture="z\ace\addons\gunbag\data\gunbag_nohq.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,0};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage2
|
||||
{
|
||||
texture="#(argb,8,8,3)color(0.5,0.5,0.5,0.5,DT)";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,0};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage3
|
||||
{
|
||||
texture="#(argb,8,8,3)color(0,0,0,0,MC)";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,0};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage4
|
||||
{
|
||||
texture="#(argb,8,8,3)color(1,1,1,1,AS)";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,0};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage5
|
||||
{
|
||||
texture="z\ACE\addons\gunbag\data\gunbag_smdi.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,0};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
||||
class Stage6
|
||||
{
|
||||
texture="#(ai,64,64,1)fresnel(1,0.3)";
|
||||
uvSource="none";
|
||||
};
|
||||
class Stage7
|
||||
{
|
||||
texture="a3\data_f\env_co.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
aside[]={1,0,0};
|
||||
up[]={0,1,0};
|
||||
dir[]={0,0,0};
|
||||
pos[]={0,0,0};
|
||||
};
|
||||
};
|
BIN
addons/gunbag/data/gunbag_co.paa
Normal file
BIN
addons/gunbag/data/gunbag_co.paa
Normal file
Binary file not shown.
BIN
addons/gunbag/data/gunbag_nohq.paa
Normal file
BIN
addons/gunbag/data/gunbag_nohq.paa
Normal file
Binary file not shown.
BIN
addons/gunbag/data/gunbag_smdi.paa
Normal file
BIN
addons/gunbag/data/gunbag_smdi.paa
Normal file
Binary file not shown.
BIN
addons/gunbag/data/gunbag_tan_co.paa
Normal file
BIN
addons/gunbag/data/gunbag_tan_co.paa
Normal file
Binary file not shown.
148
addons/gunbag/data/model.cfg
Normal file
148
addons/gunbag/data/model.cfg
Normal file
@ -0,0 +1,148 @@
|
||||
class CfgSkeletons {
|
||||
class Default {
|
||||
isDiscrete = 1;
|
||||
skeletonInherit = "";
|
||||
skeletonBones[] = {};
|
||||
};
|
||||
class OFP2_ManSkeleton {
|
||||
isDiscrete = 0;
|
||||
skeletonInherit = "";
|
||||
skeletonBones[] = {
|
||||
"Pelvis","",
|
||||
"Spine","Pelvis",
|
||||
"Spine1","Spine",
|
||||
"Spine2","Spine1",
|
||||
"Spine3","Spine2",
|
||||
"Camera","Pelvis",
|
||||
"weapon","Spine1",
|
||||
"launcher","Spine1",
|
||||
//Head skeleton in hierarchy
|
||||
"neck","Spine3",
|
||||
"neck1","neck",
|
||||
"head","neck1",
|
||||
//New facial features
|
||||
"Face_Hub","head",
|
||||
"Face_Jawbone","Face_Hub",
|
||||
"Face_Jowl","Face_Jawbone",
|
||||
"Face_chopRight","Face_Jawbone",
|
||||
"Face_chopLeft","Face_Jawbone",
|
||||
"Face_LipLowerMiddle","Face_Jawbone",
|
||||
"Face_LipLowerLeft","Face_Jawbone",
|
||||
"Face_LipLowerRight","Face_Jawbone",
|
||||
"Face_Chin","Face_Jawbone",
|
||||
"Face_Tongue","Face_Jawbone",
|
||||
"Face_CornerRight","Face_Hub",
|
||||
"Face_CheekSideRight","Face_CornerRight",
|
||||
"Face_CornerLeft","Face_Hub",
|
||||
"Face_CheekSideLeft","Face_CornerLeft",
|
||||
"Face_CheekFrontRight","Face_Hub",
|
||||
"Face_CheekFrontLeft","Face_Hub",
|
||||
"Face_CheekUpperRight","Face_Hub",
|
||||
"Face_CheekUpperLeft","Face_Hub",
|
||||
"Face_LipUpperMiddle","Face_Hub",
|
||||
"Face_LipUpperRight","Face_Hub",
|
||||
"Face_LipUpperLeft","Face_Hub",
|
||||
"Face_NostrilRight","Face_Hub",
|
||||
"Face_NostrilLeft","Face_Hub",
|
||||
"Face_Forehead","Face_Hub",
|
||||
"Face_BrowFrontRight","Face_Forehead",
|
||||
"Face_BrowFrontLeft","Face_Forehead",
|
||||
"Face_BrowMiddle","Face_Forehead",
|
||||
"Face_BrowSideRight","Face_Forehead",
|
||||
"Face_BrowSideLeft","Face_Forehead",
|
||||
"Face_Eyelids","Face_Hub",
|
||||
"Face_EyelidUpperRight","Face_Hub",
|
||||
"Face_EyelidUpperLeft","Face_Hub",
|
||||
"Face_EyelidLowerRight","Face_Hub",
|
||||
"Face_EyelidLowerLeft","Face_Hub",
|
||||
"EyeLeft","Face_Hub",
|
||||
"EyeRight","Face_Hub",
|
||||
//Left upper side
|
||||
"LeftShoulder","Spine3",
|
||||
"LeftArm","LeftShoulder",
|
||||
"LeftArmRoll","LeftArm",
|
||||
"LeftForeArm","LeftArmRoll",
|
||||
"LeftForeArmRoll","LeftForeArm",
|
||||
"LeftHand","LeftForeArmRoll",
|
||||
"LeftHandRing","LeftHand",
|
||||
"LeftHandRing1","LeftHandRing",
|
||||
"LeftHandRing2","LeftHandRing1",
|
||||
"LeftHandRing3","LeftHandRing2",
|
||||
"LeftHandPinky1","LeftHandRing",
|
||||
"LeftHandPinky2","LeftHandPinky1",
|
||||
"LeftHandPinky3","LeftHandPinky2",
|
||||
"LeftHandMiddle1","LeftHand",
|
||||
"LeftHandMiddle2","LeftHandMiddle1",
|
||||
"LeftHandMiddle3","LeftHandMiddle2",
|
||||
"LeftHandIndex1","LeftHand",
|
||||
"LeftHandIndex2","LeftHandIndex1",
|
||||
"LeftHandIndex3","LeftHandIndex2",
|
||||
"LeftHandThumb1","LeftHand",
|
||||
"LeftHandThumb2","LeftHandThumb1",
|
||||
"LeftHandThumb3","LeftHandThumb2",
|
||||
//Right upper side
|
||||
"RightShoulder","Spine3",
|
||||
"RightArm","RightShoulder",
|
||||
"RightArmRoll","RightArm",
|
||||
"RightForeArm","RightArmRoll",
|
||||
"RightForeArmRoll","RightForeArm",
|
||||
"RightHand","RightForeArmRoll",
|
||||
"RightHandRing","RightHand",
|
||||
"RightHandRing1","RightHandRing",
|
||||
"RightHandRing2","RightHandRing1",
|
||||
"RightHandRing3","RightHandRing2",
|
||||
"RightHandPinky1","RightHandRing",
|
||||
"RightHandPinky2","RightHandPinky1",
|
||||
"RightHandPinky3","RightHandPinky2",
|
||||
"RightHandMiddle1","RightHand",
|
||||
"RightHandMiddle2","RightHandMiddle1",
|
||||
"RightHandMiddle3","RightHandMiddle2",
|
||||
"RightHandIndex1","RightHand",
|
||||
"RightHandIndex2","RightHandIndex1",
|
||||
"RightHandIndex3","RightHandIndex2",
|
||||
"RightHandThumb1","RightHand",
|
||||
"RightHandThumb2","RightHandThumb1",
|
||||
"RightHandThumb3","RightHandThumb2",
|
||||
//Left lower side
|
||||
"LeftUpLeg","Pelvis",
|
||||
"LeftUpLegRoll","LeftUpLeg",
|
||||
"LeftLeg","LeftUpLegRoll",
|
||||
"LeftLegRoll","LeftLeg",
|
||||
"LeftFoot","LeftLegRoll",
|
||||
"LeftToeBase","LeftFoot",
|
||||
//Right lower side
|
||||
"RightUpLeg","Pelvis",
|
||||
"RightUpLegRoll","RightUpLeg",
|
||||
"RightLeg","RightUpLegRoll",
|
||||
"RightLegRoll","RightLeg",
|
||||
"RightFoot","RightLegRoll",
|
||||
"RightToeBase","RightFoot"
|
||||
};
|
||||
// location of pivot points (local axes) for hierarchical animation
|
||||
pivotsModel="A3\anims_f\data\skeleton\SkeletonPivots.p3d";
|
||||
};
|
||||
};
|
||||
|
||||
class CfgModels {
|
||||
class Default {
|
||||
sectionsInherit="";
|
||||
sections[] = {};
|
||||
skeletonName = "";
|
||||
};
|
||||
class ArmaMan: Default {
|
||||
htMin = 60; // Minimum half-cooling time (in seconds)
|
||||
htMax = 1800; // Maximum half-cooling time (in seconds)
|
||||
afMax = 30; // Maximum temperature in case the model is alive (in celsius)
|
||||
mfMax = 0; // Maximum temperature when the model is moving (in celsius)
|
||||
mFact = 1; // Metabolism factor - number from interval <0, 1> (0 - metabolism has no influence, 1 - metabolism has full influence (no other temperature source will be considered)).
|
||||
tBody = 37; // Metabolism temperature of the model (in celsius)
|
||||
|
||||
sections[] = {
|
||||
"osobnost","Head_Injury","Body_Injury","l_leg_injury","l_arm_injury","r_arm_injury","r_leg_injury","injury_body", "injury_legs", "injury_hands",
|
||||
"clan","clan_sign","Camo","CamoB","Camo1","Camo2","personality","hl", "injury_head", "insignia"
|
||||
};
|
||||
skeletonName = "OFP2_ManSkeleton";
|
||||
};
|
||||
|
||||
class gunbag: ArmaMan {};
|
||||
};
|
29
addons/gunbag/functions/fnc_calculateMass.sqf
Normal file
29
addons/gunbag/functions/fnc_calculateMass.sqf
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Author: Ir0n1E
|
||||
* calculate mass of weapon an items
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Weapon <STRING>
|
||||
* 1: Items <ARRAY>
|
||||
* 2: Magazines <ARRAY>
|
||||
*
|
||||
* Return Value:
|
||||
* Mass <NUMBER>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_weapon", "_items", "_magazines"];
|
||||
|
||||
private _mass = getNumber (configFile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo" >> "mass");
|
||||
|
||||
{
|
||||
_mass = _mass + getNumber (configFile >> "CfgWeapons" >> _x >> "ItemInfo" >> "mass");
|
||||
} foreach _items;
|
||||
|
||||
{
|
||||
_mass = _mass + getNumber (configFile >> "CfgWeapons" >> _x >> "mass");
|
||||
} forEach _magazines;
|
||||
|
||||
_mass
|
29
addons/gunbag/functions/fnc_canInteract.sqf
Normal file
29
addons/gunbag/functions/fnc_canInteract.sqf
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Author: Ir0n1E
|
||||
* Check if client able to interact with gunbag
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* <NUMBER> -1: can't interact 0: empty gunbag 1: full gunbag
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit", "_target"];
|
||||
|
||||
private _result = -1;
|
||||
private _gunbag = backpackContainer _target;
|
||||
|
||||
if ((_gunbag getVariable [QGVAR(gunbagWeapon), []]) isEqualTo [] && {primaryWeapon _unit != ""} && {getNumber (configFile >> "CfgWeapons" >> primaryWeapon _unit >> QGVAR(allowGunbag)) == 1}) then {
|
||||
_result = 0;
|
||||
};
|
||||
|
||||
if (!((_gunbag getVariable [QGVAR(gunbagWeapon), []]) isEqualTo []) && {primaryWeapon _unit == ""}) then {
|
||||
_result = 1;
|
||||
};
|
||||
|
||||
_result
|
17
addons/gunbag/functions/fnc_hasGunbag.sqf
Normal file
17
addons/gunbag/functions/fnc_hasGunbag.sqf
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Author: Ir0n1E
|
||||
* switches gunbag full/empty for mass calculation
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* (BOOL)
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
backpackContainer _unit isKindOf QUOTE(CLASSNAME)
|
31
addons/gunbag/functions/fnc_offGunbag.sqf
Normal file
31
addons/gunbag/functions/fnc_offGunbag.sqf
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Author: Ir0n1E
|
||||
* get weapon out of gunbag
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit", "_target"];
|
||||
|
||||
private _gunbag = backpackContainer _target;
|
||||
|
||||
_unit call EFUNC(common,goKneeling);
|
||||
|
||||
// play sound
|
||||
if (!isNil "ACE_Backpacks") then {
|
||||
[_target, _gunbag] call EFUNC(backpacks,backpackOpened);
|
||||
};
|
||||
|
||||
[PROGRESSBAR_TIME, _this, {
|
||||
(_this select 0) call FUNC(offGunbagCallback)
|
||||
}, {}, localize LSTRING(offGunbag), {
|
||||
(_this select 0) call FUNC(canInteract) == 1
|
||||
}] call EFUNC(common,progressBar);
|
48
addons/gunbag/functions/fnc_offGunbagCallback.sqf
Normal file
48
addons/gunbag/functions/fnc_offGunbagCallback.sqf
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Author: Ir0n1E
|
||||
* get weapon out of gunbag
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit", "_target"];
|
||||
|
||||
private _gunbag = backpackContainer _target;
|
||||
|
||||
private _state = _gunbag getVariable [QGVAR(gunbagWeapon), []];
|
||||
|
||||
if (_state isEqualTo []) exitWith {
|
||||
[localize LSTRING(empty)] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
|
||||
_state params ["_weapon", "_items", "_magazines"];
|
||||
|
||||
_unit addWeapon _weapon;
|
||||
removeAllPrimaryWeaponItems _unit;
|
||||
|
||||
{
|
||||
_unit addWeaponItem [_weapon, _x];
|
||||
} forEach (_items + _magazines);
|
||||
|
||||
_unit selectWeapon _weapon;
|
||||
|
||||
_magazines = _magazines apply {_x select 0};
|
||||
|
||||
private _mass = [_weapon, _items, _magazines] call FUNC(calculateMass);
|
||||
|
||||
// remove virtual load
|
||||
[_target, _gunbag, -_mass] call EFUNC(movement,addLoadToUnitContainer);
|
||||
_gunbag setVariable [QGVAR(gunbagWeapon), [], true];
|
||||
|
||||
// play sound
|
||||
if (!isNil "ACE_Backpacks") then {
|
||||
[_target, _gunbag] call EFUNC(backpacks,backpackOpened);
|
||||
};
|
28
addons/gunbag/functions/fnc_status.sqf
Normal file
28
addons/gunbag/functions/fnc_status.sqf
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Author: Ir0n1E
|
||||
* check gunbag status full/empty
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit"];
|
||||
|
||||
private _state = (backpackContainer _unit) getVariable [QGVAR(gunbagWeapon), []];
|
||||
|
||||
if (_state isEqualTo []) then {
|
||||
[localize LSTRING(empty)] call EFUNC(common,displayTextStructured);
|
||||
} else {
|
||||
_state params ["_weapon"];
|
||||
|
||||
[
|
||||
getText (configFile >> "CfgWeapons" >> _weapon >> "displayname"),
|
||||
getText (configFile >> "CfgWeapons" >> _weapon >> "picture")
|
||||
] call EFUNC(common,displayTextPicture);
|
||||
};
|
31
addons/gunbag/functions/fnc_toGunbag.sqf
Normal file
31
addons/gunbag/functions/fnc_toGunbag.sqf
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Author: Ir0n1E
|
||||
* put weapon into gunbag
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit", "_target"];
|
||||
|
||||
private _gunbag = backpackContainer _target;
|
||||
|
||||
_unit call EFUNC(common,goKneeling);
|
||||
|
||||
// play sound
|
||||
if (!isNil "ACE_Backpacks") then {
|
||||
[_target, _gunbag] call EFUNC(backpacks,backpackOpened);
|
||||
};
|
||||
|
||||
[PROGRESSBAR_TIME, _this, {
|
||||
(_this select 0) call FUNC(toGunbagCallback)
|
||||
}, {}, localize LSTRING(toGunbag), {
|
||||
(_this select 0) call FUNC(canInteract) == 0
|
||||
}] call EFUNC(common,progressBar);
|
45
addons/gunbag/functions/fnc_toGunbagCallback.sqf
Normal file
45
addons/gunbag/functions/fnc_toGunbagCallback.sqf
Normal file
@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Author: Ir0n1E
|
||||
* put weapon into gunbag
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Target <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
params ["_unit", "_target"];
|
||||
|
||||
private _weapon = primaryWeapon _unit;
|
||||
private _gunbag = backpackContainer _target;
|
||||
|
||||
private _state = [_unit, _weapon] call EFUNC(common,getWeaponState);
|
||||
|
||||
/*
|
||||
* example return value _state
|
||||
* [["","","optic_Aco",""],["arifle_MX_GL_ACO_F","GL_3GL_F"],["30Rnd_65x39_caseless_mag","1Rnd_HE_Grenade_shell"],[30,1]]
|
||||
*/
|
||||
|
||||
_state params ["_items", "", "_magazines", "_ammo"];
|
||||
|
||||
private _mass = [_weapon, _items, _magazines] call FUNC(calculateMass);
|
||||
|
||||
{
|
||||
_magazines set [_forEachIndex, [_x, _ammo select _forEachIndex]];
|
||||
} forEach _magazines;
|
||||
|
||||
_unit removeWeapon _weapon;
|
||||
|
||||
// add virtual load
|
||||
[_target, _gunbag, _mass] call EFUNC(movement,addLoadToUnitContainer);
|
||||
_gunbag setVariable [QGVAR(gunbagWeapon), [_weapon, _items, _magazines], true];
|
||||
|
||||
// play sound
|
||||
if (!isNil "ACE_Backpacks") then {
|
||||
[_target, _gunbag] call EFUNC(backpacks,backpackOpened);
|
||||
};
|
1
addons/gunbag/functions/script_component.hpp
Normal file
1
addons/gunbag/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\gunbag\script_component.hpp"
|
20
addons/gunbag/script_component.hpp
Normal file
20
addons/gunbag/script_component.hpp
Normal file
@ -0,0 +1,20 @@
|
||||
#define COMPONENT gunbag
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
//#define DEBUG_ENABLED_GUNBAG
|
||||
//#define DISABLE_COMPILE_CACHE
|
||||
//#define CBA_DEBUG_SYNCHRONOUS
|
||||
//#define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
||||
#ifdef DEBUG_ENABLED_GUNBAG
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_SETTINGS_GUNBAG
|
||||
#define DEBUG_SETTINGS DEBUG_SETTINGS_GUNBAG
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
||||
|
||||
#define CLASSNAME ACE_Gunbag
|
||||
#define PROGRESSBAR_TIME 5
|
29
addons/gunbag/stringtable.xml
Normal file
29
addons/gunbag/stringtable.xml
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project name="ACE">
|
||||
<Package name="gunbag">
|
||||
<Key ID="STR_ACE_Gunbag_DisplayName">
|
||||
<English>Gunbag</English>
|
||||
<German>Waffentasche</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gunbag_DisplayName_Tan">
|
||||
<English>Gunbag (Tan)</English>
|
||||
<German>Waffentasche (Tan)</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gunbag_toGunbag">
|
||||
<English>Put weapon into gunbag</English>
|
||||
<German>Lege Waffe in Waffentasche</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gunbag_offGunbag">
|
||||
<English>Get weapon out of gunbag</English>
|
||||
<German>Hole Waffe aus Waffentasche</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gunbag_Status">
|
||||
<English>Status Gunbag</English>
|
||||
<German>Status Waffentasche</German>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Gunbag_empty">
|
||||
<English>Gunbag Empty</English>
|
||||
<German>Waffentasche leer</German>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
BIN
addons/gunbag/ui/gunbag_ca.paa
Normal file
BIN
addons/gunbag/ui/gunbag_ca.paa
Normal file
Binary file not shown.
BIN
addons/gunbag/ui/gunbag_icon_ca.paa
Normal file
BIN
addons/gunbag/ui/gunbag_icon_ca.paa
Normal file
Binary file not shown.
BIN
addons/gunbag/ui/gunbag_tan_ca.paa
Normal file
BIN
addons/gunbag/ui/gunbag_tan_ca.paa
Normal file
Binary file not shown.
@ -1,67 +1,67 @@
|
||||
//XEH_clientInit.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
GVAR(cachedBuildingTypes) = [];
|
||||
GVAR(cachedBuildingActionPairs) = [];
|
||||
|
||||
GVAR(ParsedTextCached) = [];
|
||||
|
||||
["ace_settingChanged", {
|
||||
params ["_name"];
|
||||
if (({_x == _name} count [QGVAR(colorTextMax), QGVAR(colorTextMin), QGVAR(colorShadowMax), QGVAR(colorShadowMin), QGVAR(textSize), QGVAR(shadowSetting)]) == 1) then {
|
||||
[] call FUNC(setupTextColors);
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["ace_settingsInitialized", {
|
||||
//Setup text/shadow/size/color settings matrix
|
||||
[] call FUNC(setupTextColors);
|
||||
// Install the render EH on the main display
|
||||
addMissionEventHandler ["Draw3D", DFUNC(render)];
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
//Add Actions to Houses:
|
||||
["ace_interactMenuOpened", {_this call FUNC(userActions_addHouseActions)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["ACE3 Common", QGVAR(InteractKey), (localize LSTRING(InteractKey)),
|
||||
{
|
||||
// Statement
|
||||
[0] call FUNC(keyDown)
|
||||
},{[0,false] call FUNC(keyUp)},
|
||||
[219, [false, false, false]], false] call CBA_fnc_addKeybind; //Left Windows Key
|
||||
|
||||
["ACE3 Common", QGVAR(SelfInteractKey), (localize LSTRING(SelfInteractKey)),
|
||||
{
|
||||
// Statement
|
||||
[1] call FUNC(keyDown)
|
||||
},{[1,false] call FUNC(keyUp)},
|
||||
[219, [false, true, false]], false] call CBA_fnc_addKeybind; //Left Windows Key + Ctrl/Strg
|
||||
|
||||
|
||||
// Listens for the falling unconscious event, just in case the menu needs to be closed
|
||||
["ace_unconscious", {
|
||||
// If no menu is open just quit
|
||||
if (GVAR(openedMenuType) < 0) exitWith {};
|
||||
|
||||
params ["_unit", "_isUnconscious"];
|
||||
|
||||
if (_unit != ACE_player || !_isUnconscious) exitWith {};
|
||||
|
||||
GVAR(actionSelected) = false;
|
||||
[GVAR(openedMenuType), false] call FUNC(keyUp);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// disable firing while the interact menu is is is opened
|
||||
["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// background options
|
||||
["ace_interactMenuOpened", {
|
||||
if (GVAR(menuBackground)==1) then {[QGVAR(menuBackground), true] call EFUNC(common,blurScreen);};
|
||||
if (GVAR(menuBackground)==2) then {0 cutRsc[QGVAR(menuBackground), "PLAIN", 1, false];};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
["ace_interactMenuClosed", {
|
||||
if (GVAR(menuBackground)==1) then {[QGVAR(menuBackground), false] call EFUNC(common,blurScreen);};
|
||||
if (GVAR(menuBackground)==2) then {(uiNamespace getVariable [QGVAR(menuBackground), displayNull]) closeDisplay 0;};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
//XEH_clientInit.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
GVAR(cachedBuildingTypes) = [];
|
||||
GVAR(cachedBuildingActionPairs) = [];
|
||||
|
||||
GVAR(ParsedTextCached) = [];
|
||||
|
||||
["ace_settingChanged", {
|
||||
params ["_name"];
|
||||
if (({_x == _name} count [QGVAR(colorTextMax), QGVAR(colorTextMin), QGVAR(colorShadowMax), QGVAR(colorShadowMin), QGVAR(textSize), QGVAR(shadowSetting)]) == 1) then {
|
||||
[] call FUNC(setupTextColors);
|
||||
};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["ace_settingsInitialized", {
|
||||
//Setup text/shadow/size/color settings matrix
|
||||
[] call FUNC(setupTextColors);
|
||||
// Install the render EH on the main display
|
||||
addMissionEventHandler ["Draw3D", DFUNC(render)];
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
//Add Actions to Houses:
|
||||
["ace_interactMenuOpened", {_this call FUNC(userActions_addHouseActions)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
["ACE3 Common", QGVAR(InteractKey), (localize LSTRING(InteractKey)),
|
||||
{
|
||||
// Statement
|
||||
[0] call FUNC(keyDown)
|
||||
},{[0,false] call FUNC(keyUp)},
|
||||
[219, [false, false, false]], false] call CBA_fnc_addKeybind; //Left Windows Key
|
||||
|
||||
["ACE3 Common", QGVAR(SelfInteractKey), (localize LSTRING(SelfInteractKey)),
|
||||
{
|
||||
// Statement
|
||||
[1] call FUNC(keyDown)
|
||||
},{[1,false] call FUNC(keyUp)},
|
||||
[219, [false, true, false]], false] call CBA_fnc_addKeybind; //Left Windows Key + Ctrl/Strg
|
||||
|
||||
|
||||
// Listens for the falling unconscious event, just in case the menu needs to be closed
|
||||
["ace_unconscious", {
|
||||
// If no menu is open just quit
|
||||
if (GVAR(openedMenuType) < 0) exitWith {};
|
||||
|
||||
params ["_unit", "_isUnconscious"];
|
||||
|
||||
if (_unit != ACE_player || !_isUnconscious) exitWith {};
|
||||
|
||||
GVAR(actionSelected) = false;
|
||||
[GVAR(openedMenuType), false] call FUNC(keyUp);
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// disable firing while the interact menu is is is opened
|
||||
["ace_playerChanged", {_this call FUNC(handlePlayerChanged)}] call CBA_fnc_addEventHandler;
|
||||
|
||||
// background options
|
||||
["ace_interactMenuOpened", {
|
||||
if (GVAR(menuBackground)==1) then {[QGVAR(menuBackground), true] call EFUNC(common,blurScreen);};
|
||||
if (GVAR(menuBackground)==2) then {0 cutRsc[QGVAR(menuBackground), "PLAIN", 1, false];};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
["ace_interactMenuClosed", {
|
||||
if (GVAR(menuBackground)==1) then {[QGVAR(menuBackground), false] call EFUNC(common,blurScreen);};
|
||||
if (GVAR(menuBackground)==2) then {(uiNamespace getVariable [QGVAR(menuBackground), displayNull]) closeDisplay 0;};
|
||||
}] call CBA_fnc_addEventHandler;
|
||||
|
@ -1,25 +1,25 @@
|
||||
|
||||
class Extended_PreStart_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preStart));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_pre_init));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_post_init));
|
||||
clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_FiredBIS_EventHandlers {
|
||||
class All {
|
||||
ADDON = QUOTE(_this call FUNC(onFired));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PreStart_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preStart));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_pre_init));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_post_init));
|
||||
clientInit = QUOTE(call COMPILE_FILE(XEH_clientInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_FiredBIS_EventHandlers {
|
||||
class All {
|
||||
ADDON = QUOTE(_this call FUNC(onFired));
|
||||
};
|
||||
};
|
||||
|
@ -1,13 +1,13 @@
|
||||
|
||||
class CfgSounds {
|
||||
class ACE_Javelin_Locking {
|
||||
name = "ACE_Javelin_Locking";
|
||||
sound[] = {PATHTOF(data\sounds\javelin_locking.ogg), db+0, 1.0};
|
||||
titles[] = {};
|
||||
};
|
||||
class ACE_Javelin_Locked {
|
||||
name = "ACE_Javelin_Locked";
|
||||
sound[] = {PATHTOF(data\sounds\javelin_locked.ogg), db+0, 1.0};
|
||||
titles[] = {};
|
||||
};
|
||||
};
|
||||
|
||||
class CfgSounds {
|
||||
class ACE_Javelin_Locking {
|
||||
name = "ACE_Javelin_Locking";
|
||||
sound[] = {PATHTOF(data\sounds\javelin_locking.ogg), db+0, 1.0};
|
||||
titles[] = {};
|
||||
};
|
||||
class ACE_Javelin_Locked {
|
||||
name = "ACE_Javelin_Locked";
|
||||
sound[] = {PATHTOF(data\sounds\javelin_locked.ogg), db+0, 1.0};
|
||||
titles[] = {};
|
||||
};
|
||||
};
|
||||
|
@ -1,68 +1,68 @@
|
||||
class CfgVehicles {
|
||||
class LandVehicle;
|
||||
class StaticWeapon : LandVehicle {
|
||||
class Turrets;
|
||||
};
|
||||
|
||||
class StaticMGWeapon : StaticWeapon {
|
||||
class Turrets : Turrets {
|
||||
class MainTurret;
|
||||
};
|
||||
};
|
||||
class AT_01_base_F: StaticMGWeapon {};
|
||||
|
||||
class B_static_AT_F: AT_01_base_F {
|
||||
class Turrets : Turrets {
|
||||
class MainTurret : MainTurret {
|
||||
weapons[] = { QGVAR(Titan_Static) };
|
||||
magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"};
|
||||
|
||||
turretInfoType = "ACE_RscOptics_javelin";
|
||||
gunnerOpticsModel = QPATHTOF(data\reticle_titan.p3d);
|
||||
opticsZoomMin = 0.08333;
|
||||
opticsZoomMax = 0.04167;
|
||||
opticsZoomInit = 0.08333;
|
||||
opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1"};
|
||||
opticsFlare = 0;
|
||||
discretefov[] = {0.08333,0.04167};
|
||||
discreteInitIndex = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
class O_static_AT_F: AT_01_base_F {
|
||||
class Turrets : Turrets {
|
||||
class MainTurret : MainTurret {
|
||||
weapons[] = { QGVAR(Titan_Static) };
|
||||
magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"};
|
||||
|
||||
turretInfoType = "ACE_RscOptics_javelin";
|
||||
gunnerOpticsModel = QPATHTOF(data\reticle_titan.p3d);
|
||||
opticsZoomMin = 0.08333;
|
||||
opticsZoomMax = 0.04167;
|
||||
opticsZoomInit = 0.08333;
|
||||
opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1"};
|
||||
opticsFlare = 0;
|
||||
discretefov[] = {0.08333,0.04167};
|
||||
discreteInitIndex = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
class I_static_AT_F: AT_01_base_F {
|
||||
class Turrets : Turrets {
|
||||
class MainTurret : MainTurret {
|
||||
weapons[] = { QGVAR(Titan_Static) };
|
||||
magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"};
|
||||
|
||||
turretInfoType = "ACE_RscOptics_javelin";
|
||||
gunnerOpticsModel = QPATHTOF(data\reticle_titan.p3d);
|
||||
opticsZoomMin = 0.08333;
|
||||
opticsZoomMax = 0.04167;
|
||||
opticsZoomInit = 0.08333;
|
||||
opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1"};
|
||||
opticsFlare = 0;
|
||||
discretefov[] = {0.08333,0.04167};
|
||||
discreteInitIndex = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
class CfgVehicles {
|
||||
class LandVehicle;
|
||||
class StaticWeapon : LandVehicle {
|
||||
class Turrets;
|
||||
};
|
||||
|
||||
class StaticMGWeapon : StaticWeapon {
|
||||
class Turrets : Turrets {
|
||||
class MainTurret;
|
||||
};
|
||||
};
|
||||
class AT_01_base_F: StaticMGWeapon {};
|
||||
|
||||
class B_static_AT_F: AT_01_base_F {
|
||||
class Turrets : Turrets {
|
||||
class MainTurret : MainTurret {
|
||||
weapons[] = { QGVAR(Titan_Static) };
|
||||
magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"};
|
||||
|
||||
turretInfoType = "ACE_RscOptics_javelin";
|
||||
gunnerOpticsModel = QPATHTOF(data\reticle_titan.p3d);
|
||||
opticsZoomMin = 0.08333;
|
||||
opticsZoomMax = 0.04167;
|
||||
opticsZoomInit = 0.08333;
|
||||
opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1"};
|
||||
opticsFlare = 0;
|
||||
discretefov[] = {0.08333,0.04167};
|
||||
discreteInitIndex = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
class O_static_AT_F: AT_01_base_F {
|
||||
class Turrets : Turrets {
|
||||
class MainTurret : MainTurret {
|
||||
weapons[] = { QGVAR(Titan_Static) };
|
||||
magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"};
|
||||
|
||||
turretInfoType = "ACE_RscOptics_javelin";
|
||||
gunnerOpticsModel = QPATHTOF(data\reticle_titan.p3d);
|
||||
opticsZoomMin = 0.08333;
|
||||
opticsZoomMax = 0.04167;
|
||||
opticsZoomInit = 0.08333;
|
||||
opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1"};
|
||||
opticsFlare = 0;
|
||||
discretefov[] = {0.08333,0.04167};
|
||||
discreteInitIndex = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
class I_static_AT_F: AT_01_base_F {
|
||||
class Turrets : Turrets {
|
||||
class MainTurret : MainTurret {
|
||||
weapons[] = { QGVAR(Titan_Static) };
|
||||
magazines[] = {"1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles","1Rnd_GAT_missiles"};
|
||||
|
||||
turretInfoType = "ACE_RscOptics_javelin";
|
||||
gunnerOpticsModel = QPATHTOF(data\reticle_titan.p3d);
|
||||
opticsZoomMin = 0.08333;
|
||||
opticsZoomMax = 0.04167;
|
||||
opticsZoomInit = 0.08333;
|
||||
opticsPPEffects[] = {"OpticsCHAbera1","OpticsBlur1"};
|
||||
opticsFlare = 0;
|
||||
discretefov[] = {0.08333,0.04167};
|
||||
discreteInitIndex = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,72 +1,72 @@
|
||||
class CfgWeapons {
|
||||
class Launcher;
|
||||
class MissileLauncher;
|
||||
|
||||
class Launcher_Base_F : Launcher {
|
||||
class WeaponSlotsInfo;
|
||||
};
|
||||
|
||||
// @TODO: AA by default, motherfuckers
|
||||
class missiles_titan : MissileLauncher {
|
||||
|
||||
};
|
||||
|
||||
class missiles_titan_at : missiles_titan { };
|
||||
class GVAR(Titan_Static) : missiles_titan_at {
|
||||
GVAR(enabled) = 1;
|
||||
weaponInfoType = "ACE_RscOptics_javelin";
|
||||
modelOptics = QPATHTOF(data\reticle_titan.p3d);
|
||||
|
||||
canLock = 0;
|
||||
magazines[] = {"1Rnd_GAT_missiles"};
|
||||
lockingTargetSound[] = {"",0,1};
|
||||
lockedTargetSound[] = {"",0,1};
|
||||
};
|
||||
|
||||
// @TODO: AA by default, motherfuckers
|
||||
class launch_Titan_base : Launcher_Base_F {};
|
||||
|
||||
class launch_Titan_short_base : launch_Titan_base { };
|
||||
|
||||
class launch_B_Titan_short_F: launch_Titan_short_base {
|
||||
GVAR(enabled) = 1;
|
||||
weaponInfoType = "ACE_RscOptics_javelin";
|
||||
modelOptics = QPATHTOF(data\reticle_titan.p3d);
|
||||
|
||||
canLock = 0;
|
||||
|
||||
lockingTargetSound[] = {"",0,1};
|
||||
lockedTargetSound[] = {"",0,1};
|
||||
};
|
||||
class launch_I_Titan_short_F: launch_Titan_short_base {
|
||||
GVAR(enabled) = 1;
|
||||
weaponInfoType = "ACE_RscOptics_javelin";
|
||||
modelOptics = QPATHTOF(data\reticle_titan.p3d);
|
||||
|
||||
canLock = 0;
|
||||
|
||||
lockingTargetSound[] = {"",0,1};
|
||||
lockedTargetSound[] = {"",0,1};
|
||||
};
|
||||
class launch_O_Titan_short_F: launch_Titan_short_base {
|
||||
GVAR(enabled) = 1;
|
||||
weaponInfoType = "ACE_RscOptics_javelin";
|
||||
modelOptics = QPATHTOF(data\reticle_titan.p3d);
|
||||
|
||||
canLock = 0;
|
||||
|
||||
|
||||
lockingTargetSound[] = {"",0,1};
|
||||
lockedTargetSound[] = {"",0,1};
|
||||
};
|
||||
class launch_Titan_short_F: launch_Titan_short_base {
|
||||
GVAR(enabled) = 1;
|
||||
weaponInfoType = "ACE_RscOptics_javelin";
|
||||
modelOptics = QPATHTOF(data\reticle_titan.p3d);
|
||||
|
||||
canLock = 0;
|
||||
|
||||
lockingTargetSound[] = {"",0,1};
|
||||
lockedTargetSound[] = {"",0,1};
|
||||
};
|
||||
};
|
||||
class CfgWeapons {
|
||||
class Launcher;
|
||||
class MissileLauncher;
|
||||
|
||||
class Launcher_Base_F : Launcher {
|
||||
class WeaponSlotsInfo;
|
||||
};
|
||||
|
||||
// @TODO: AA by default, motherfuckers
|
||||
class missiles_titan : MissileLauncher {
|
||||
|
||||
};
|
||||
|
||||
class missiles_titan_at : missiles_titan { };
|
||||
class GVAR(Titan_Static) : missiles_titan_at {
|
||||
GVAR(enabled) = 1;
|
||||
weaponInfoType = "ACE_RscOptics_javelin";
|
||||
modelOptics = QPATHTOF(data\reticle_titan.p3d);
|
||||
|
||||
canLock = 0;
|
||||
magazines[] = {"1Rnd_GAT_missiles"};
|
||||
lockingTargetSound[] = {"",0,1};
|
||||
lockedTargetSound[] = {"",0,1};
|
||||
};
|
||||
|
||||
// @TODO: AA by default, motherfuckers
|
||||
class launch_Titan_base : Launcher_Base_F {};
|
||||
|
||||
class launch_Titan_short_base : launch_Titan_base { };
|
||||
|
||||
class launch_B_Titan_short_F: launch_Titan_short_base {
|
||||
GVAR(enabled) = 1;
|
||||
weaponInfoType = "ACE_RscOptics_javelin";
|
||||
modelOptics = QPATHTOF(data\reticle_titan.p3d);
|
||||
|
||||
canLock = 0;
|
||||
|
||||
lockingTargetSound[] = {"",0,1};
|
||||
lockedTargetSound[] = {"",0,1};
|
||||
};
|
||||
class launch_I_Titan_short_F: launch_Titan_short_base {
|
||||
GVAR(enabled) = 1;
|
||||
weaponInfoType = "ACE_RscOptics_javelin";
|
||||
modelOptics = QPATHTOF(data\reticle_titan.p3d);
|
||||
|
||||
canLock = 0;
|
||||
|
||||
lockingTargetSound[] = {"",0,1};
|
||||
lockedTargetSound[] = {"",0,1};
|
||||
};
|
||||
class launch_O_Titan_short_F: launch_Titan_short_base {
|
||||
GVAR(enabled) = 1;
|
||||
weaponInfoType = "ACE_RscOptics_javelin";
|
||||
modelOptics = QPATHTOF(data\reticle_titan.p3d);
|
||||
|
||||
canLock = 0;
|
||||
|
||||
|
||||
lockingTargetSound[] = {"",0,1};
|
||||
lockedTargetSound[] = {"",0,1};
|
||||
};
|
||||
class launch_Titan_short_F: launch_Titan_short_base {
|
||||
GVAR(enabled) = 1;
|
||||
weaponInfoType = "ACE_RscOptics_javelin";
|
||||
modelOptics = QPATHTOF(data\reticle_titan.p3d);
|
||||
|
||||
canLock = 0;
|
||||
|
||||
lockingTargetSound[] = {"",0,1};
|
||||
lockedTargetSound[] = {"",0,1};
|
||||
};
|
||||
};
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user