mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Use setShotParents in Advanced Throwing (#5052)
* Use setShotParents in Advanced Throwing - close #5034 * Execute setShotParents on server (server-only command)
This commit is contained in:
@ -32,6 +32,9 @@ if !(_unit getVariable [QGVAR(primed), false]) then {
|
||||
_unit setVariable [QGVAR(lastThrownTime), CBA_missionTime];
|
||||
// Fix floating for throwables without proper physics (eg. IR Grenade)
|
||||
_activeThrowable setVelocity [0, 0, -0.1];
|
||||
|
||||
// Set thrower
|
||||
[QEGVAR(common,setShotParents), [_activeThrowable, _unit, (getShotParents _activeThrowable) select 1]] call CBA_fnc_serverEvent;
|
||||
};
|
||||
|
||||
// Restore muzzle ammo (setAmmo 1 has no impact if no appliccable throwable in inventory)
|
||||
|
@ -54,6 +54,9 @@ deleteVehicle _activeThrowableOld;
|
||||
_activeThrowable // projectile
|
||||
]] call CBA_fnc_globalEvent;
|
||||
|
||||
// Set prime instigator
|
||||
[QEGVAR(common,setShotParents), [_activeThrowable, _unit, _unit]] call CBA_fnc_serverEvent;
|
||||
|
||||
if (_showHint) then {
|
||||
// Show primed hint
|
||||
private _displayNameShort = getText (configFile >> "CfgMagazines" >> _throwableMag >> "displayNameShort");
|
||||
|
Reference in New Issue
Block a user