From 4188893839602b7c5d09a0cb14622274706697c5 Mon Sep 17 00:00:00 2001 From: jaynus Date: Fri, 10 Apr 2015 14:23:55 -0700 Subject: [PATCH] Move spatial model translations to ace_common --- addons/common/XEH_preInit.sqf | 3 +++ .../functions/fnc_translateToModelSpace.sqf | 0 .../functions/fnc_translateToWeaponSpace.sqf | 0 addons/missileguidance/XEH_pre_init.sqf | 3 --- addons/missileguidance/functions/fnc_guidancePFH.sqf | 4 ++-- 5 files changed, 5 insertions(+), 5 deletions(-) rename addons/{missileguidance => common}/functions/fnc_translateToModelSpace.sqf (100%) rename addons/{missileguidance => common}/functions/fnc_translateToWeaponSpace.sqf (100%) diff --git a/addons/common/XEH_preInit.sqf b/addons/common/XEH_preInit.sqf index e7169f1d23..3b47153c7a 100644 --- a/addons/common/XEH_preInit.sqf +++ b/addons/common/XEH_preInit.sqf @@ -178,6 +178,9 @@ PREP(useItem); PREP(useMagazine); PREP(waitAndExecute); +PREP(translateToWeaponSpace); +PREP(translateToModelSpace); + // config items PREP(getConfigType); PREP(getItemType); diff --git a/addons/missileguidance/functions/fnc_translateToModelSpace.sqf b/addons/common/functions/fnc_translateToModelSpace.sqf similarity index 100% rename from addons/missileguidance/functions/fnc_translateToModelSpace.sqf rename to addons/common/functions/fnc_translateToModelSpace.sqf diff --git a/addons/missileguidance/functions/fnc_translateToWeaponSpace.sqf b/addons/common/functions/fnc_translateToWeaponSpace.sqf similarity index 100% rename from addons/missileguidance/functions/fnc_translateToWeaponSpace.sqf rename to addons/common/functions/fnc_translateToWeaponSpace.sqf diff --git a/addons/missileguidance/XEH_pre_init.sqf b/addons/missileguidance/XEH_pre_init.sqf index 801a780b16..873715fef8 100644 --- a/addons/missileguidance/XEH_pre_init.sqf +++ b/addons/missileguidance/XEH_pre_init.sqf @@ -3,9 +3,6 @@ PREP(rotateVectLineGetMap); PREP(rotateVectLine); -PREP(translateToModelSpace); -PREP(translateToWeaponSpace); - PREP(fired); PREP(guidancePFH); diff --git a/addons/missileguidance/functions/fnc_guidancePFH.sqf b/addons/missileguidance/functions/fnc_guidancePFH.sqf index 976832a1cd..7041201ded 100644 --- a/addons/missileguidance/functions/fnc_guidancePFH.sqf +++ b/addons/missileguidance/functions/fnc_guidancePFH.sqf @@ -43,7 +43,7 @@ if(!isNil "_seekerTargetPos") then { _projectilePos = getPosASL _projectile; - _targetVectorSeeker = [_projectile, [_xVec, _yVec, _zVec], _profileAdjustedTargetPos] call FUNC(translateToWeaponSpace); + _targetVectorSeeker = [_projectile, [_xVec, _yVec, _zVec], _profileAdjustedTargetPos] call EFUNC(common,translateToWeaponSpace); _targetVector = [0,0,0] vectorFromTo _targetVectorSeeker; TRACE_1("", _targetVectorSeeker, _targetVector); @@ -80,7 +80,7 @@ if(!isNil "_seekerTargetPos") then { // @TODO: Apply velocity multiplier to yaw/pitch. Basically, it can adjust faster at lower speeds //_adjustDeflection = (vectorMagnitude velocity _projectile); - _outVector = [_projectile, [_xVec, _yVec, _zVec], [_yaw, _adjustTime, _pitch]] call FUNC(translateToModelSpace); + _outVector = [_projectile, [_xVec, _yVec, _zVec], [_yaw, _adjustTime, _pitch]] call EFUNC(common,translateToModelSpace); _vectorTo = _projectilePos vectorFromTo _outVector; _projectile setVectorDirAndUp [_vectorTo, vectorUp _projectile];