mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixed MP compat issue
This commit is contained in:
parent
d7f2f673f3
commit
e290fd7c04
@ -6,7 +6,7 @@
|
||||
}
|
||||
#define ACE_FRAG_ADD_EH class EventHandlers {\
|
||||
class ADDON {\
|
||||
init = QUOTE(_this call FUNC(initRound););\
|
||||
init = QUOTE(if (isServer) then {_this call FUNC(initRound);};);\
|
||||
};\
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include "..\script_component.hpp"
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
|
@ -18,6 +18,7 @@ params [
|
||||
["_projectile", objNull, [objNull]]
|
||||
];
|
||||
|
||||
|
||||
private _ammo = typeOf _projectile;
|
||||
if (_ammo isEqualTo "" || {isNull _projectile}) exitWith {
|
||||
TRACE_2("bad ammo or projectile",_ammo,_projectile);
|
||||
@ -32,17 +33,10 @@ if (_doFrag) then {
|
||||
private _shotParents = getShotParents _proj;
|
||||
private _ammo = typeOf _proj;
|
||||
// wait for frag damage to kill units before spawning fragments
|
||||
if (isServer) then {
|
||||
[
|
||||
FUNC(doFrag),
|
||||
_this + [_ammo, _shotParents]
|
||||
] call CBA_fnc_execNextFrame;
|
||||
} else {
|
||||
[
|
||||
QGVAR(frag_eh),
|
||||
_this + [_ammo, _shotParents]
|
||||
] call CBA_fnc_serverEvent;
|
||||
};
|
||||
[
|
||||
FUNC(doFrag),
|
||||
_this + [_ammo, _shotParents]
|
||||
] call CBA_fnc_execNextFrame;
|
||||
}
|
||||
];
|
||||
};
|
||||
@ -61,17 +55,10 @@ if (GVAR(spallEnabled) && {_shouldSpall}) then
|
||||
private _shotPrnt = getShotParents _proj;
|
||||
private _ammo = typeOf _proj;
|
||||
private _vUp = vectorUp _proj;
|
||||
if (isServer) then {
|
||||
[
|
||||
LINKFUNC(doSpall),
|
||||
[_proj, _hitObj, _posASL, _vel, _sNorm, _surfType, _ammo, _shotPrnt, _vUp]
|
||||
] call CBA_fnc_execNextFrame;
|
||||
} else {
|
||||
[
|
||||
QGVAR(spall_eh),
|
||||
[_proj, _hitObj, _posASL, _vel, _sNorm, _surfType, _ammo, _shotPrnt, _vUp]
|
||||
] call CBA_fnc_serverEvent;
|
||||
};
|
||||
}
|
||||
[
|
||||
QGVAR(spall_eh),
|
||||
[_proj, _hitObj, _posASL, _vel, _sNorm, _surfType, _ammo, _shotPrnt, _vUp]
|
||||
] call CBA_fnc_serverEvent;
|
||||
};
|
||||
];
|
||||
};
|
@ -37,7 +37,8 @@ private _category = format ["ACE %1", localize LSTRING(Module_DisplayName)];
|
||||
QGVAR(atLeastOne), "CHECKBOX",
|
||||
[LSTRING(MinFrag), LSTRING(MinFrag_Desc)],
|
||||
[_category, LSTRING(Frag)],
|
||||
true
|
||||
false,
|
||||
true
|
||||
] call CBA_fnc_addSetting;
|
||||
|
||||
[
|
||||
|
Loading…
Reference in New Issue
Block a user