mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
AdvThrow - Fix toqrue script error for IR strobes (#5842)
Close #5835 - Add config to GrenadeCore (IRStrobeBase: GrenadeCore) - Verify array is valid 3d vector in throw.sqf
This commit is contained in:
parent
a00457ccff
commit
d1ba153ae8
@ -4,4 +4,8 @@ class CfgAmmo {
|
||||
GVAR(torqueDirection)[] = {1, 1, 0};
|
||||
GVAR(torqueMagnitude) = "(50 + random 100) * selectRandom [1, -1]";
|
||||
};
|
||||
class GrenadeCore: Default {
|
||||
GVAR(torqueDirection)[] = {1, 1, 0};
|
||||
GVAR(torqueMagnitude) = "(50 + random 100) * selectRandom [1, -1]";
|
||||
};
|
||||
};
|
||||
|
@ -50,7 +50,8 @@ if (!(_unit getVariable [QGVAR(primed), false])) then {
|
||||
};
|
||||
|
||||
private _config = configFile >> "CfgAmmo" >> typeOf _activeThrowable;
|
||||
private _torqueDir = vectorNormalized (getArray (_config >> QGVAR(torqueDirection)));
|
||||
private _torqueDir = getArray (_config >> QGVAR(torqueDirection));
|
||||
_torqueDir = if (_torqueDir isEqualTypeArray [0,0,0]) then { vectorNormalized _torqueDir } else { [0,0,0] };
|
||||
private _torqueMag = getNumber (_config >> QGVAR(torqueMagnitude));
|
||||
private _torque = _torqueDir vectorMultiply _torqueMag;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user