mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
fixed eventhandler to match new, no velocity version of frago
This commit is contained in:
parent
3c235111da
commit
b61150b382
@ -20,10 +20,10 @@ params ["_ammo", "_projectile"];
|
|||||||
|
|
||||||
_ammo call FUNC(shouldFrag) params ["_shouldFrag", "_submunitionShouldFrag"];
|
_ammo call FUNC(shouldFrag) params ["_shouldFrag", "_submunitionShouldFrag"];
|
||||||
if (_shouldFrag) then {
|
if (_shouldFrag) then {
|
||||||
_projectile addEventHandler [
|
private _explodeEH = _projectile addEventHandler [
|
||||||
"Explode",
|
"Explode",
|
||||||
{
|
{
|
||||||
params ["_projectile", "_posASL", "_velocity"];
|
params ["_projectile", "_posASL"];
|
||||||
|
|
||||||
if (GVAR(reflectionsEnabled)) then {
|
if (GVAR(reflectionsEnabled)) then {
|
||||||
[_posASL, _ammo] call FUNC(doReflections);
|
[_posASL, _ammo] call FUNC(doReflections);
|
||||||
@ -37,11 +37,13 @@ if (_shouldFrag) then {
|
|||||||
private _ammo = typeOf _projectile;
|
private _ammo = typeOf _projectile;
|
||||||
// Wait a frame to make sure it doesn't target soon to be dead objects
|
// Wait a frame to make sure it doesn't target soon to be dead objects
|
||||||
[
|
[
|
||||||
{ [QGVAR(explosionEvent), _this] call CBA_fnc_serverEvent; },
|
{ [QGVAR(frag_eh), _this] call CBA_fnc_serverEvent; },
|
||||||
[_posASL, _velocity, _ammo, _shotParents]
|
[_posASL, _ammo, _shotParents]
|
||||||
] call CBA_fnc_execNextFrame;
|
] call CBA_fnc_execNextFrame;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
TRACE_2("adding explode EH",_projectile,_explodeEH);
|
||||||
|
_projectile setVariable [QGVAR(explodeEventHandler),explodeEH];
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_submunitionShouldFrag) then {
|
if (_submunitionShouldFrag) then {
|
||||||
|
Loading…
Reference in New Issue
Block a user