mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Takes negative initSpeed values into account
This commit is contained in:
parent
b4c057919e
commit
965e45a53c
@ -44,9 +44,11 @@ _offset = 0;
|
||||
} forEach _FCSMagazines;
|
||||
|
||||
// Correct velocity for weapons that have initVelocity
|
||||
// @todo: Take into account negative initVelocities
|
||||
_velocityCorrection = (vectorMagnitude velocity _projectile) -
|
||||
getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed");
|
||||
_velocityCorrection = if (getNumber(configFile >> "CfgMagazines" >> _weapon >> "initSpeed") > 0) then {
|
||||
(vectorMagnitude velocity _projectile) - getNumber(configFile >> "CfgMagazines" >> _magazine >> "initSpeed")
|
||||
} else {
|
||||
0
|
||||
};
|
||||
|
||||
[_projectile, (_vehicle getVariable format ["%1_%2", QGVAR(Azimuth), _turret]), _offset, -_velocityCorrection] call EFUNC(common,changeProjectileDirection);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user