I am sorry for machine translation, very much I hope that all of you will understand.
I want to discuss shutdown of capture of an air target by the Whirlwind. https://dev-heaven.net/issues/62005
in the current Vikhr version it is capable to kill planes - it is bad & it is bad to clean capture of an air target completely.
we solved this problem on another. more plausibly:
/*
************************************************** ****************************************
* Module: Common_HandleIncomingMissile.sqf
* Version: [1.0] 30.09.2012
* Author: Prodavec
* Project: IncomingMissile EH
* Comments: Handles "Vikhr" trajectory for Air units
************************************************** ****************************************
*/
// ====================================
// | DEFINITIONS |
// ====================================
#define __SPEEDLIMIT 250
// ====================================
// | MAIN |
// ====================================
private
[
"_msg",
"_targetVehicle",
"_attackingVehicle",
"_missileType",
"_missile",
"_magnitude",
"_vectorDir",
"_vectorUp",
"_irLock",
"_hit",
"_distance",
"_limit"
];
_targetVehicle = _this select 0;
_missileType = _this select 1;
_attackingVehicle = _this select 2;
_missile = nearestObject [_attackingVehicle, _missileType];
/*
_msg = format ["_targetVehicle: %1 | _missileType: %2 | _missile: %3 | _attackingVehicle: %4", _targetVehicle, _missileType, _missile, _attackingVehicle];
hintSilent _msg;
player groupChat _msg;
*/
if (isNull _missile) exitWith {};
if ((_missileType == "M_Vikhr_AT") && (_targetVehicle isKindOf "Air")) then
{
/*
_msg = "AntiVikhr";
hintSilent _msg;
player groupChat _msg;
*/
/*
_missileVelocityPrevious = velocity _missile;
_Ax = _missileVelocityPrevious select 0;
_Az = _missileVelocityPrevious select 1;
_Ay = _missileVelocityPrevious select 2;
_magnitudeA = sqrt (_Ax^2 + _Az^2 + _Ay^2); // Classic, precious but slower than shitty way
_magnitudeA = [0, 0, 0] distance _missileVelocityPrevious; // Shitty but fastest way to get vector magnitude
// http://forums.bistudio.com/showthread.php?140660-Vector-magnitude
*/
_vectorDir = vectorDir _missile;
_vectorUp = vectorUp _missile;
while {!isNull _missile} do
{
/*
_ammoVelocity = velocity _missile;
_Bx = _missileVelocity select 0;
_Bz = _missileVelocity select 1;
_By = _missileVelocity select 2;
_absB = sqrt (_Bx^2 + _Bz^2 + _By^2);
*/
_magnitude = [0, 0, 0] distance (velocity _missile); // See description above
if ((abs (speed _targetVehicle)) > __SPEEDLIMIT) then
{
_missile setVectorDirAndUp [_vectorDir, _vectorUp];
_missile setVelocity [(_vectorDir select 0) * _magnitude, (_vectorDir select 1) * _magnitude, (_vectorDir select 2) * _magnitude];
}
else
{
_vectorDir = vectorDir _missile;
_vectorUp = vectorUp _missile;
};
sleep 0.05;
};
those. Vikhr isn't capable to kill the purpose at which speed more than 250
I will try to make video in the evening as it works
__________________________________________________ ____________________
One more bug with the LAV25_HQ model. (CO 1.62)
The point of capture is strongly displaced above model therefore rockets don't get to it almost.
LAV25_HQ is attacked by ~10 metis: