mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Reformatted for readability and optimized first if statement
This commit is contained in:
parent
c3f04596c0
commit
02dd35f63f
@ -14,23 +14,23 @@
|
|||||||
*
|
*
|
||||||
* Public: No
|
* Public: No
|
||||||
*/
|
*/
|
||||||
params ["_projectile"];
|
params [
|
||||||
|
["_projectile", objNull, [objNull]]
|
||||||
|
];
|
||||||
|
|
||||||
private _ammo = typeOf _projectile;
|
private _ammo = typeOf _projectile;
|
||||||
if (isNil "_ammo" ||
|
if (_ammo isEqualTo "" || {isNull _projectile}) exitWith {
|
||||||
{_ammo isEqualTo "" ||
|
|
||||||
{isNil "_projectile" ||
|
|
||||||
{isNull _projectile}}}) exitWith {
|
|
||||||
TRACE_2("bad ammo or projectile",_ammo,_projectile);
|
TRACE_2("bad ammo or projectile",_ammo,_projectile);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
private _shouldFrag = _ammo call FUNC(shouldFrag);
|
private _shouldFrag = _ammo call FUNC(shouldFrag);
|
||||||
_shouldFrag params ["_doFrag"];
|
_shouldFrag params ["_doFrag"];
|
||||||
|
|
||||||
if (_doFrag) then {
|
if (_doFrag) then {
|
||||||
// wait for frag damage to kill units before spawning fragments
|
// wait for frag damage to kill units before spawning fragments
|
||||||
_projectile addEventHandler ["Explode", {
|
_projectile addEventHandler [
|
||||||
|
"Explode",
|
||||||
|
{
|
||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
[FUNC(doFrag), [_this]] call CBA_fnc_execNextFrame;
|
[FUNC(doFrag), [_this]] call CBA_fnc_execNextFrame;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user