mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
updated some defne names and usages
This commit is contained in:
parent
1480715111
commit
4f251767d7
@ -71,7 +71,7 @@ for "_i" from 0 to 100 do {
|
|||||||
if (_spallPosAGL isEqualTo []) exitWith {
|
if (_spallPosAGL isEqualTo []) exitWith {
|
||||||
TRACE_1("can't find other side",_oldPosASL);
|
TRACE_1("can't find other side",_oldPosASL);
|
||||||
};
|
};
|
||||||
(_shotParents#1) setVariable [QGVAR(nextSpallEvent), CBA_missionTime + ACE_FRAG_SPALL_EVENT_HOLDOFF];
|
(_shotParents#1) setVariable [QGVAR(nextSpallEvent), CBA_missionTime + ACE_FRAG_SPALL_UNIT_HOLDOFF];
|
||||||
private _spallVelocitySpherical = _oldVelocity call CBA_fnc_vect2polar;
|
private _spallVelocitySpherical = _oldVelocity call CBA_fnc_vect2polar;
|
||||||
|
|
||||||
if (_explosive > 0) then {
|
if (_explosive > 0) then {
|
||||||
|
@ -40,7 +40,7 @@ if (GVAR(spallEnabled) && {_ammo call FUNC(shouldSpall)}) then {
|
|||||||
* multiple hits / slowdowns getting shunted to the first hit
|
* multiple hits / slowdowns getting shunted to the first hit
|
||||||
*/
|
*/
|
||||||
[
|
[
|
||||||
// only let a unit make a frag event once per ACE_FRAG_SPALL_EVENT_HOLDOFF
|
// only let a unit make a frag event once per ACE_FRAG_SPALL_UNIT_HOLDOFF
|
||||||
{
|
{
|
||||||
private _shotParents = _this#5;
|
private _shotParents = _this#5;
|
||||||
if (CBA_missionTime < _shotParents#1 getVariable [QGVAR(nextSpallEvent), -1]) exitWith {};
|
if (CBA_missionTime < _shotParents#1 getVariable [QGVAR(nextSpallEvent), -1]) exitWith {};
|
||||||
@ -69,7 +69,7 @@ if (GVAR(reflectionsEnabled) || GVAR(enabled) && _ammo call FUNC(shouldFrag)) th
|
|||||||
// only let a unit make a frag event once per second
|
// only let a unit make a frag event once per second
|
||||||
private _instigator = _shotParents#1;
|
private _instigator = _shotParents#1;
|
||||||
if (CBA_missionTime < (_instigator getVariable [QGVAR(nextFragEvent), -1])) exitWith {};
|
if (CBA_missionTime < (_instigator getVariable [QGVAR(nextFragEvent), -1])) exitWith {};
|
||||||
_instigator setVariable [QGVAR(nextFragEvent), CBA_missionTime + ACE_FRAG_FRAG_EVENT_HOLDOFF];
|
_instigator setVariable [QGVAR(nextFragEvent), CBA_missionTime + ACE_FRAG_FRAG_UNIT_HOLDOFF];
|
||||||
|
|
||||||
// Wait a frame to make sure it doesn't target the dead
|
// Wait a frame to make sure it doesn't target the dead
|
||||||
[
|
[
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define FRAG_VEC_VAR 0.004
|
#define FRAG_VEC_VAR 0.004
|
||||||
#define MAX_FRAG_COUNT 50
|
|
||||||
|
|
||||||
BEGIN_COUNTER(frago);
|
BEGIN_COUNTER(frago);
|
||||||
|
|
||||||
@ -27,7 +26,7 @@ params ["_fragPosASL", "_lastVel", "_shellType", "_shotParents"];
|
|||||||
TRACE_4("frago",_fragPosASL,_lastVel,_shellType,_shotParents);
|
TRACE_4("frago",_fragPosASL,_lastVel,_shellType,_shotParents);
|
||||||
|
|
||||||
// Limit max frag count if there was a recent frag
|
// Limit max frag count if there was a recent frag
|
||||||
private _maxFrags = round (MAX_FRAG_COUNT * linearConversion [ACE_FRAG_COUNT_MIN_TIME, ACE_FRAG_COUNT_MAX_TIME, (CBA_missionTime - GVAR(lastFragTime)), 0.1, 1, true]);
|
private _maxFrags = round linearConversion [ACE_FRAG_COUNT_MIN_TIME, ACE_FRAG_COUNT_MAX_TIME, (CBA_missionTime - GVAR(lastFragTime)), ACE_FRAG_COUNT_MIN, ACE_FRAG_COUNT_MAX, true];
|
||||||
TRACE_2("",_maxFrags,CBA_missionTime - GVAR(lastFragTime));
|
TRACE_2("",_maxFrags,CBA_missionTime - GVAR(lastFragTime));
|
||||||
GVAR(lastFragTime) = CBA_missionTime;
|
GVAR(lastFragTime) = CBA_missionTime;
|
||||||
|
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
#include "\z\ace\addons\main\script_macros.hpp"
|
#include "\z\ace\addons\main\script_macros.hpp"
|
||||||
|
|
||||||
// Mimimum hold-off time between frag events per unit
|
// Mimimum hold-off time between frag events per unit
|
||||||
#define ACE_FRAG_FRAG_EVENT_HOLDOFF 0.5
|
#define ACE_FRAG_FRAG_UNIT_HOLDOFF 0.5
|
||||||
#define ACE_FRAG_SPALL_EVENT_HOLDOFF 0.5
|
#define ACE_FRAG_SPALL_UNIT_HOLDOFF 0.5
|
||||||
// Scaling for the min/max # of fragments since last frag event
|
// Scaling for the min/max # of fragments since last frag event
|
||||||
#define ACE_FRAG_COUNT_MIN_TIME 0.1
|
#define ACE_FRAG_COUNT_MIN_TIME 0.1
|
||||||
#define ACE_FRAG_COUNT_MIN 5
|
#define ACE_FRAG_COUNT_MIN 5
|
||||||
|
Loading…
Reference in New Issue
Block a user