mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Alternative way to address shot parent self-harm issue
This commit is contained in:
parent
5059cb283d
commit
ed36b6a4c8
@ -45,7 +45,7 @@ if (GVAR(spallEnabled) && {_ammo call FUNC(shouldSpall)}) then {
|
|||||||
if (CBA_missionTime < _shotParents#1 getVariable [QGVAR(nextSpallEvent), -1]) exitWith {};
|
if (CBA_missionTime < _shotParents#1 getVariable [QGVAR(nextSpallEvent), -1]) exitWith {};
|
||||||
_this call FUNC(doSpall);
|
_this call FUNC(doSpall);
|
||||||
},
|
},
|
||||||
[_hitObject, _ammo, _projectile, _posASL, _velocity, _shotParents]
|
[_hitObject, _ammo, _projectile, _posASL, _velocity, [objNull, _shotParents#1]]
|
||||||
] call CBA_fnc_execNextFrame;
|
] call CBA_fnc_execNextFrame;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@ -73,7 +73,7 @@ if (GVAR(reflectionsEnabled) || GVAR(enabled) && _ammo call FUNC(shouldFrag)) th
|
|||||||
// Wait a frame to make sure it doesn't target the dead
|
// Wait a frame to make sure it doesn't target the dead
|
||||||
[
|
[
|
||||||
{ [QGVAR(frag_eh), _this] call CBA_fnc_serverEvent; },
|
{ [QGVAR(frag_eh), _this] call CBA_fnc_serverEvent; },
|
||||||
[_posASL, _ammo, _shotParents]
|
[_posASL, _ammo, [objNull _instigator]]
|
||||||
] call CBA_fnc_execNextFrame;
|
] call CBA_fnc_execNextFrame;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
@ -113,11 +113,7 @@ if (_targets isNotEqualTo []) then {
|
|||||||
private _fragObj = createVehicleLocal [selectRandom _fragTypes, _fragPosAGL, [], 0, "CAN_COLLIDE"];
|
private _fragObj = createVehicleLocal [selectRandom _fragTypes, _fragPosAGL, [], 0, "CAN_COLLIDE"];
|
||||||
_fragObj setVectorDir _vectorDir;
|
_fragObj setVectorDir _vectorDir;
|
||||||
_fragObj setVelocity _fragObjVelocity;
|
_fragObj setVelocity _fragObjVelocity;
|
||||||
if (_shotParents#0 isEqualTo _target) then {
|
|
||||||
_fragObj setShotParents [objNull, _fragObj#1];
|
|
||||||
} else {
|
|
||||||
_fragObj setShotParents _shotParents;
|
_fragObj setShotParents _shotParents;
|
||||||
};
|
|
||||||
#ifdef DEBUG_MODE_DRAW
|
#ifdef DEBUG_MODE_DRAW
|
||||||
[_fragObj, "green", true] call FUNC(dev_trackObj);
|
[_fragObj, "green", true] call FUNC(dev_trackObj);
|
||||||
[_targetPos, "(0.88,0.36,0.92,0.8)"] call FUNC(dev_sphereDraw);
|
[_targetPos, "(0.88,0.36,0.92,0.8)"] call FUNC(dev_sphereDraw);
|
||||||
|
Loading…
Reference in New Issue
Block a user