Sord is now able to transmit the direction of fire

This commit is contained in:
ulteq 2015-04-19 12:40:13 +02:00
parent 2b5b89604e
commit a73c0bc429
2 changed files with 5 additions and 5 deletions

View File

@ -32,12 +32,12 @@ GVAR(windSpeed1) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 140020
GVAR(windSpeed2) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 140021)) min 50]; GVAR(windSpeed2) set [GVAR(currentTarget), 0 max abs(parseNumber(ctrlText 140021)) min 50];
GVAR(windDirection) set [GVAR(currentTarget), 1 max Round(parseNumber(ctrlText 140030)) min 12]; GVAR(windDirection) set [GVAR(currentTarget), 1 max Round(parseNumber(ctrlText 140030)) min 12];
_inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1; _inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1;
_inclinationAngleDegree = -60 max parseNumber(ctrlText 140040) min 60; _inclinationAngleDegree = -60 max round(parseNumber(ctrlText 140040)) min 60;
if (_inclinationAngleDegree != GVAR(inclinationAngle) select GVAR(currentTarget)) then { if (_inclinationAngleDegree != GVAR(inclinationAngle) select GVAR(currentTarget)) then {
GVAR(inclinationAngle) set [GVAR(currentTarget), _inclinationAngleDegree]; GVAR(inclinationAngle) set [GVAR(currentTarget), _inclinationAngleDegree];
} else { } else {
if (_inclinationAngleCosine != Round(cos(GVAR(inclinationAngle) select GVAR(currentTarget)) * 100) / 100) then { if (_inclinationAngleCosine != Round(cos(GVAR(inclinationAngle) select GVAR(currentTarget)) * 100) / 100) then {
GVAR(inclinationAngle) set [GVAR(currentTarget), acos(_inclinationAngleCosine)]; GVAR(inclinationAngle) set [GVAR(currentTarget), round(acos(_inclinationAngleCosine))];
}; };
}; };
GVAR(targetSpeed) set [GVAR(currentTarget), -50 max abs(parseNumber(ctrlText 140050)) min 50]; GVAR(targetSpeed) set [GVAR(currentTarget), -50 max abs(parseNumber(ctrlText 140050)) min 50];

View File

@ -22,6 +22,6 @@ _slopeDistance = _this select 0;
_azimuth = _this select 1; _azimuth = _this select 1;
_inclination = _this select 2; _inclination = _this select 2;
//_inclination = asin((ACE_player weaponDirection currentWeapon ACE_player) select 2); GVAR(inclinationAngle) set [GVAR(currentTarget), round(_inclination)];
GVAR(inclinationAngle) set [GVAR(currentTarget), _inclination]; GVAR(directionOfFire) set [GVAR(currentTarget), round(_azimuth)];
GVAR(targetRange) set [GVAR(currentTarget), _slopeDistance]; GVAR(targetRange) set [GVAR(currentTarget), round(_slopeDistance)];