mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Remove weapon initVelocities for guns with FCS
This commit is contained in:
parent
e42851dd8b
commit
bcf533292a
@ -12,7 +12,7 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_weapon", "_ammo", "_magazine", "_projectile"];
|
||||
private ["_vehicle", "_weapon", "_ammo", "_magazine", "_projectile","_velocityCorrection"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
_weapon = _this select 1;
|
||||
@ -43,8 +43,12 @@ _offset = 0;
|
||||
};
|
||||
} forEach _FCSMagazines;
|
||||
|
||||
[_projectile, (_vehicle getVariable format ["%1_%2", QGVAR(Azimuth), _turret]), _offset, 0] call EFUNC(common,changeProjectileDirection);
|
||||
// Correct velocity for weapons that have initVelocity
|
||||
// @todo: Take into account negative initVelocities
|
||||
_velocityCorrection = (vectorMagnitude velocity _projectile) -
|
||||
getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed");
|
||||
|
||||
[_projectile, (_vehicle getVariable format ["%1_%2", QGVAR(Azimuth), _turret]), _offset, _velocityCorrection] call EFUNC(common,changeProjectileDirection);
|
||||
// Air burst missile
|
||||
|
||||
// handle locally only
|
||||
|
Loading…
Reference in New Issue
Block a user