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 {\
|
#define ACE_FRAG_ADD_EH class EventHandlers {\
|
||||||
class ADDON {\
|
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;
|
ADDON = false;
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ params [
|
|||||||
["_projectile", objNull, [objNull]]
|
["_projectile", objNull, [objNull]]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
private _ammo = typeOf _projectile;
|
private _ammo = typeOf _projectile;
|
||||||
if (_ammo isEqualTo "" || {isNull _projectile}) exitWith {
|
if (_ammo isEqualTo "" || {isNull _projectile}) exitWith {
|
||||||
TRACE_2("bad ammo or projectile",_ammo,_projectile);
|
TRACE_2("bad ammo or projectile",_ammo,_projectile);
|
||||||
@ -32,17 +33,10 @@ if (_doFrag) then {
|
|||||||
private _shotParents = getShotParents _proj;
|
private _shotParents = getShotParents _proj;
|
||||||
private _ammo = typeOf _proj;
|
private _ammo = typeOf _proj;
|
||||||
// wait for frag damage to kill units before spawning fragments
|
// wait for frag damage to kill units before spawning fragments
|
||||||
if (isServer) then {
|
[
|
||||||
[
|
FUNC(doFrag),
|
||||||
FUNC(doFrag),
|
_this + [_ammo, _shotParents]
|
||||||
_this + [_ammo, _shotParents]
|
] call CBA_fnc_execNextFrame;
|
||||||
] call CBA_fnc_execNextFrame;
|
|
||||||
} else {
|
|
||||||
[
|
|
||||||
QGVAR(frag_eh),
|
|
||||||
_this + [_ammo, _shotParents]
|
|
||||||
] call CBA_fnc_serverEvent;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@ -61,17 +55,10 @@ if (GVAR(spallEnabled) && {_shouldSpall}) then
|
|||||||
private _shotPrnt = getShotParents _proj;
|
private _shotPrnt = getShotParents _proj;
|
||||||
private _ammo = typeOf _proj;
|
private _ammo = typeOf _proj;
|
||||||
private _vUp = vectorUp _proj;
|
private _vUp = vectorUp _proj;
|
||||||
if (isServer) then {
|
[
|
||||||
[
|
QGVAR(spall_eh),
|
||||||
LINKFUNC(doSpall),
|
[_proj, _hitObj, _posASL, _vel, _sNorm, _surfType, _ammo, _shotPrnt, _vUp]
|
||||||
[_proj, _hitObj, _posASL, _vel, _sNorm, _surfType, _ammo, _shotPrnt, _vUp]
|
] call CBA_fnc_serverEvent;
|
||||||
] call CBA_fnc_execNextFrame;
|
};
|
||||||
} else {
|
|
||||||
[
|
|
||||||
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",
|
QGVAR(atLeastOne), "CHECKBOX",
|
||||||
[LSTRING(MinFrag), LSTRING(MinFrag_Desc)],
|
[LSTRING(MinFrag), LSTRING(MinFrag_Desc)],
|
||||||
[_category, LSTRING(Frag)],
|
[_category, LSTRING(Frag)],
|
||||||
true
|
false,
|
||||||
|
true
|
||||||
] call CBA_fnc_addSetting;
|
] call CBA_fnc_addSetting;
|
||||||
|
|
||||||
[
|
[
|
||||||
|
Loading…
Reference in New Issue
Block a user