From c7b82a51f30e5d184161c25b43c5480084f2dbe6 Mon Sep 17 00:00:00 2001 From: johnb432 <58661205+johnb432@users.noreply.github.com> Date: Fri, 30 Aug 2024 15:51:28 +0200 Subject: [PATCH] Bring component up-to-date, cleanup --- addons/spike/XEH_postInit.sqf | 7 +++--- .../spike/functions/fnc_camera_changeZoom.sqf | 3 +-- .../functions/fnc_camera_cycleViewMode.sqf | 4 ++-- addons/spike/functions/fnc_camera_destroy.sqf | 7 +++--- .../functions/fnc_camera_handleKeyPress.sqf | 8 +++---- addons/spike/functions/fnc_camera_init.sqf | 7 +++--- .../functions/fnc_camera_setViewMode.sqf | 2 +- addons/spike/functions/fnc_camera_setZoom.sqf | 3 +-- .../spike/functions/fnc_camera_switchAway.sqf | 3 +-- .../spike/functions/fnc_camera_switchTo.sqf | 3 +-- addons/spike/functions/fnc_camera_update.sqf | 16 ++++++-------- .../fnc_camera_updateTargetingGate.sqf | 14 ++++++------ .../functions/fnc_camera_userInCamera.sqf | 5 ++--- .../spike/functions/fnc_getTargetPosition.sqf | 5 ++--- addons/spike/functions/fnc_keyDown.sqf | 4 ++-- addons/spike/functions/fnc_mapHelperDraw.sqf | 10 ++++----- .../functions/fnc_midCourseTransition.sqf | 3 +-- addons/spike/functions/fnc_navigation.sqf | 3 +-- addons/spike/functions/fnc_onFired.sqf | 22 +++++++++---------- addons/spike/functions/fnc_seeker.sqf | 3 +-- addons/spike/functions/script_component.hpp | 1 - 21 files changed, 58 insertions(+), 75 deletions(-) delete mode 100644 addons/spike/functions/script_component.hpp diff --git a/addons/spike/XEH_postInit.sqf b/addons/spike/XEH_postInit.sqf index effc58e69a..1e3be26dbc 100644 --- a/addons/spike/XEH_postInit.sqf +++ b/addons/spike/XEH_postInit.sqf @@ -1,6 +1,6 @@ #include "script_component.hpp" -if (hasInterface) then { +if (hasInterface) then { #include "initKeybinds.inc.sqf" // add camera interactions @@ -14,14 +14,13 @@ if (hasInterface) then { params ["_target", "_player", "_params"]; private _camera = _player getVariable [QGVAR(missileCamera), objNull]; private _projectile = _camera getVariable [QGVAR(missile), objNull]; - !([] call FUNC(camera_userInCamera)) && { !(_camera isEqualTo objNull); } && { !(_projectile isEqualTo objNull) } + !([] call FUNC(camera_userInCamera)) && { !isNull _camera } && { !isNull _projectile } }/*, { params ["_target", "_player", "_params"]; // insert children }*/] call EFUNC(interact_menu,createAction); ["CAManBase", 1, ["ACE_SelfActions"], _switchToCameraAction, true] call EFUNC(interact_menu,addActionToClass); - + GVAR(activeCamera) = objNull; GVAR(projectileHashMap) = createHashMap; // used in the seeker to get the namespace for the associated projectile }; - diff --git a/addons/spike/functions/fnc_camera_changeZoom.sqf b/addons/spike/functions/fnc_camera_changeZoom.sqf index 5ab5473e48..e536835bf9 100644 --- a/addons/spike/functions/fnc_camera_changeZoom.sqf +++ b/addons/spike/functions/fnc_camera_changeZoom.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Decreases zoom of current camera @@ -31,4 +31,3 @@ if (_increase) then { }; }; [_cameraNamespace, _zoomIndex] call FUNC(camera_setZoom); - diff --git a/addons/spike/functions/fnc_camera_cycleViewMode.sqf b/addons/spike/functions/fnc_camera_cycleViewMode.sqf index 55773b229f..f433e997a7 100644 --- a/addons/spike/functions/fnc_camera_cycleViewMode.sqf +++ b/addons/spike/functions/fnc_camera_cycleViewMode.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Cycles camera thermal mode (if avaliable) @@ -23,7 +23,7 @@ private _tiArray = _cameraNamespace getVariable [QGVAR(thermalTypes), []]; if ((count _tiArray) == 0) exitWith {}; if ((_tiIndex + 1) >= count _tiArray) then { _tiIndex = 0; -} else { +} else { _tiIndex = _tiIndex + 1; }; diff --git a/addons/spike/functions/fnc_camera_destroy.sqf b/addons/spike/functions/fnc_camera_destroy.sqf index 6942696e0d..e7d05bf09e 100644 --- a/addons/spike/functions/fnc_camera_destroy.sqf +++ b/addons/spike/functions/fnc_camera_destroy.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Destroys camera attaches to projectile @@ -18,10 +18,10 @@ params ["_cameraNamespace"]; private _userInThisCamera = [_cameraNamespace] call FUNC(camera_userInCamera); -private _userCamera = ACE_PLAYER getVariable [QGVAR(missileCamera), objNull]; +private _userCamera = ACE_player getVariable [QGVAR(missileCamera), objNull]; if (_userInThisCamera || { _userCamera isEqualTo _cameraNamespace }) then { - ACE_PLAYER setVariable [QGVAR(missileCamera), objNull]; + ACE_player setVariable [QGVAR(missileCamera), objNull]; }; [_cameraNamespace] call FUNC(camera_switchAway); @@ -35,4 +35,3 @@ private _camera = _cameraNamespace getVariable QGVAR(camera); camDestroy _camera; _cameraNamespace call CBA_fnc_deleteNamespace; - diff --git a/addons/spike/functions/fnc_camera_handleKeyPress.sqf b/addons/spike/functions/fnc_camera_handleKeyPress.sqf index 0dba0153b9..76894329ae 100644 --- a/addons/spike/functions/fnc_camera_handleKeyPress.sqf +++ b/addons/spike/functions/fnc_camera_handleKeyPress.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Updates camera with inputs @@ -43,7 +43,7 @@ switch (_key) do { }; _return = true; }; //Up - + case CAMERA_KEY_LEFT: { if (_down) then { _lookInput set [2, 1]; @@ -52,7 +52,7 @@ switch (_key) do { }; _return = true; }; //Left - + case CAMERA_KEY_RIGHT: { if (_down) then { _lookInput set [3, 1]; @@ -61,7 +61,7 @@ switch (_key) do { }; _return = true; }; //Right - + case CAMERA_KEY_DOWN: { if (_down) then { _lookInput set [1, 1]; diff --git a/addons/spike/functions/fnc_camera_init.sqf b/addons/spike/functions/fnc_camera_init.sqf index 44e1fa0d4b..0ac86def7e 100644 --- a/addons/spike/functions/fnc_camera_init.sqf +++ b/addons/spike/functions/fnc_camera_init.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Initializes camera for player to view missile from its nose @@ -18,9 +18,9 @@ params ["_projectile", "_cameraArray", "_shooter", "_switchOnFireInit"]; _cameraArray params ["_enabled", "_fovLevels", "_initialFOV", "_thermalTypes", "_initialThermalType", "_switchOnFire", "_lerpFOV", "_fovChangeTime", "", "_gimbalData", "_reticleData", "_designating"]; _gimbalData params ["_hasGimbal", "_maxGimbalX", "_maxGimbalY", "_gimbalSpeedX", "_gimbalSpeedY", "_initGimbalAngleX", "_initGimbalAngleY", "_gimbalZoomSpeedModifiers"]; - + if !(_enabled) exitWith {}; - + private _activeCameraNamespace = [] call CBA_fnc_createNamespace; _activeCameraNamespace setVariable [QGVAR(fovLevels), _fovLevels]; _activeCameraNamespace setVariable [QGVAR(thermalTypes), _thermalTypes]; @@ -83,4 +83,3 @@ if (_switchOnFire && _switchOnFireInit) then { }; _activeCameraNamespace - diff --git a/addons/spike/functions/fnc_camera_setViewMode.sqf b/addons/spike/functions/fnc_camera_setViewMode.sqf index 95793eec30..95d8917074 100644 --- a/addons/spike/functions/fnc_camera_setViewMode.sqf +++ b/addons/spike/functions/fnc_camera_setViewMode.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Cycles camera thermal mode (if avaliable) diff --git a/addons/spike/functions/fnc_camera_setZoom.sqf b/addons/spike/functions/fnc_camera_setZoom.sqf index abe8753e84..5816f69ba6 100644 --- a/addons/spike/functions/fnc_camera_setZoom.sqf +++ b/addons/spike/functions/fnc_camera_setZoom.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Decreases zoom of current camera @@ -22,4 +22,3 @@ _cameraNamespace setVariable [QGVAR(targetFOV), _zoomArray select _zoomIndex]; _cameraNamespace setVariable [QGVAR(fovChanged), true]; _cameraNamespace setVariable [QGVAR(fovChangedTime), CBA_missionTime]; _cameraNamespace setVariable [QGVAR(startingFov), _cameraNamespace getVariable QGVAR(currentFOV)]; - diff --git a/addons/spike/functions/fnc_camera_switchAway.sqf b/addons/spike/functions/fnc_camera_switchAway.sqf index b9a0384aaf..f3bd2edbd2 100644 --- a/addons/spike/functions/fnc_camera_switchAway.sqf +++ b/addons/spike/functions/fnc_camera_switchAway.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Switches away from the currently controlled camera @@ -24,4 +24,3 @@ _camera cameraEffect ["terminate", "back"]; GVAR(activeCamera) = objNull; QGVAR(camera_hud) cutText ["", "PLAIN"]; - diff --git a/addons/spike/functions/fnc_camera_switchTo.sqf b/addons/spike/functions/fnc_camera_switchTo.sqf index 78daf08f7a..138d5cb8b0 100644 --- a/addons/spike/functions/fnc_camera_switchTo.sqf +++ b/addons/spike/functions/fnc_camera_switchTo.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Switches to the currently controlled camera @@ -50,4 +50,3 @@ _cameraNamespace setVariable [QGVAR(reticleLeft), (uiNameSpace getVariable _uiNa _cameraNamespace setVariable [QGVAR(reticleRight), (uiNameSpace getVariable _uiNamespaceDialogVariable) displayCtrl _rightGate]; _cameraNamespace setVariable [QGVAR(reticleTop), (uiNameSpace getVariable _uiNamespaceDialogVariable) displayCtrl _topGate]; _cameraNamespace setVariable [QGVAR(reticleBottom), (uiNameSpace getVariable _uiNamespaceDialogVariable) displayCtrl _bottomGate]; - diff --git a/addons/spike/functions/fnc_camera_update.sqf b/addons/spike/functions/fnc_camera_update.sqf index bc4f1010bd..8bf7a55b0d 100644 --- a/addons/spike/functions/fnc_camera_update.sqf +++ b/addons/spike/functions/fnc_camera_update.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Updates camera to be on a fixed point @@ -20,7 +20,7 @@ _cameraArray params ["_hasCamera", "", "", "", "", "", "", "", "_viewData", "_gi _viewData params ["_lookDir", "_groundPos", "_pointPos", "_movingCameraX", "_movingCameraY"]; _gimbalData params ["_hasGimbal", "_maxGimbalX", "_maxGimbalY", "_gimbalSpeedX", "_gimbalSpeedY", "", "", "_gimbalZoomSpeedModifiers", "_stabilizeWhenMoving", "_designateWhenStationary", "_trackLockedPosition"]; -if (!_hasCamera || { _cameraNamespace isEqualTo objNull }) exitWith {}; +if (!_hasCamera || { isNull _cameraNamespace }) exitWith {}; if ([_cameraNamespace] call FUNC(camera_userInCamera)) then { cameraEffectEnableHUD true; @@ -51,20 +51,20 @@ if (_fovChanged) then { private _fovChangeStart = _cameraNamespace getVariable [QGVAR(fovChangedTime), 0]; private _startingFOV = _cameraNamespace getVariable [QGVAR(startingFov), 1]; private _fovChangeTime = _cameraNamespace getVariable [QGVAR(fovChangeTime), 0]; - + private _setFOV = _targetFOV; if (_lerpFovEnabled) then { _setFOV = linearConversion [0, _fovChangeTime, CBA_missionTime - _fovChangeStart, _startingFOV, _targetFOV, true]; } else { _fovChanged = false; }; - + // if the FOV is near enough to the target FOV stop the lerp if (abs(_setFOV - _targetFOV) == 0 || ((CBA_missionTime - _fovChangeStart) > _fovChangeTime + 2)) then { _setFOV = _targetFOV; _fovChanged = false; }; - + _camera camSetFOV _setFOV; _cameraNamespace setVariable [QGVAR(fovChanged), _fovChanged]; _cameraNamespace setVariable [QGVAR(currentFOV), _setFOV]; @@ -84,7 +84,7 @@ if (_hasGimbal) then { private _lastGroundPos = _cameraNamespace getVariable [QGVAR(lastMovedGroundPos), [0, 0, 0]]; - if !((_movingCameraX || _movingCameraY) || true) then { + if !((_movingCameraX || _movingCameraY) || true) then { // If we designate a target set the current tracking point to the current ground point to avoid unwanted behavior from static cameras if (_designating && !_designatedLastFrame) then { _designatedLastFrame = true; @@ -107,7 +107,7 @@ if (_hasGimbal) then { _expectedPos = _directionToGround vectorMultiply GIMBAL_LOGIC_OFFSET; }; - } else { + } else { private _speedModifier = 1; if (_gimbalZoomSpeedModifiers isNotEqualTo []) then { _speedModifier = (_gimbalZoomSpeedModifiers select (_cameraNamespace getVariable [QGVAR(currentZoomIndex), 0])); @@ -238,5 +238,3 @@ _cameraArray set [8, _viewData]; _camera camCommit 0; [_cameraNamespace, _cameraArray] call FUNC(camera_updateTargetingGate); - - \ No newline at end of file diff --git a/addons/spike/functions/fnc_camera_updateTargetingGate.sqf b/addons/spike/functions/fnc_camera_updateTargetingGate.sqf index 42e0980510..22680e398a 100644 --- a/addons/spike/functions/fnc_camera_updateTargetingGate.sqf +++ b/addons/spike/functions/fnc_camera_updateTargetingGate.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Switches away from the currently controlled camera @@ -21,7 +21,7 @@ _viewData params ["_lookDir", "_groundPos", "_pointPos", "_movingCameraX", "_mov _gimbalData params ["_hasGimbal", "_maxGimbalX", "_maxGimbalY", "_gimbalSpeedX", "_gimbalSpeedY", "", "", "_gimbalZoomSpeedModifiers"]; _reticleData params ["", "", "", "", "", "", "", "", "", "_reticleMovesWithTrack"]; -if !(([_cameraNamespace] call FUNC(camera_userInCamera))) exitWith {}; +if !([_cameraNamespace] call FUNC(camera_userInCamera)) exitWith {}; private _seekerTargetPos = _cameraNamespace getVariable [QGVAR(seekerTargetPos), [0, 0, 0]]; private _seekerTargetInfo = _cameraNamespace getVariable [QGVAR(seekerTargetInfo), [false, [0, 0], [0, 0]]]; @@ -45,7 +45,7 @@ if (_seekerTargetPos isEqualTo [0, 0, 0]) then { { _x ctrlShow false; } forEach (_cameraNamespace getVariable QGVAR(disappearOnLock)); - + if (_reticleMovesWithTrack) then { _seekerPositionScreen = worldToScreen ASLtoAGL _seekerTargetPos; if (_seekerPositionScreen isEqualTo []) then { @@ -66,7 +66,7 @@ if (_locked) then { _seekerTargetInfo params ["_lockedObject", "_boundsTL", "_boundsBR"]; if (_lockedObject) then { private _missile = _cameraNamespace getVariable QGVAR(missile); - + private _avgDistance = (_boundsTL#1 + _boundsBR#1) / 2; private _topCenter = [((_boundsTL#0) + (_boundsBR#0)) / 2, _avgDistance, _boundsBR#2]; @@ -80,21 +80,21 @@ if (_locked) then { _ctrlPos set [1, 0.5]; }; (_cameraNamespace getVariable QGVAR(reticleLeft)) ctrlSetPosition [(_ctrlPos#0 - _seekerPositionScreen#0) - 0.5, (_ctrlPos#1 - _seekerPositionScreen#1) - 0.5]; - + _ctrlPos = worldToScreen (_missile modelToWorldVisual _rightCenter); if (_ctrlPos isEqualTo []) then { _ctrlPos set [0, 0.5]; _ctrlPos set [1, 0.5]; }; (_cameraNamespace getVariable QGVAR(reticleRight)) ctrlSetPosition [(_ctrlPos#0 - _seekerPositionScreen#0) - 0.5, (_ctrlPos#1 - _seekerPositionScreen#1) - 0.5]; - + _ctrlPos = worldToScreen (_missile modelToWorldVisual _topCenter); if (_ctrlPos isEqualTo []) then { _ctrlPos set [0, 0.5]; _ctrlPos set [1, 0.5]; }; (_cameraNamespace getVariable QGVAR(reticleTop)) ctrlSetPosition [(_ctrlPos#0 - _seekerPositionScreen#0) - 0.5, (_ctrlPos#1 - _seekerPositionScreen#1) - 0.5]; - + _ctrlPos = worldToScreen (_missile modelToWorldVisual _bottomCenter); if (_ctrlPos isEqualTo []) then { _ctrlPos set [0, 0.5]; diff --git a/addons/spike/functions/fnc_camera_userInCamera.sqf b/addons/spike/functions/fnc_camera_userInCamera.sqf index f3c285b3e0..571dd63930 100644 --- a/addons/spike/functions/fnc_camera_userInCamera.sqf +++ b/addons/spike/functions/fnc_camera_userInCamera.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Switches away from the currently controlled camera @@ -19,5 +19,4 @@ params [["_cameraNamespace", objNull]]; if (isNil QGVAR(activeCamera)) exitWith { false }; -(GVAR(activeCamera) isNotEqualTo objNull) && { (_cameraNamespace isEqualTo objNull) || (_cameraNamespace isEqualTo GVAR(activeCamera)) }; - +(!isNull GVAR(activeCamera)) && { isNull _cameraNamespace || (_cameraNamespace isEqualTo GVAR(activeCamera)) }; diff --git a/addons/spike/functions/fnc_getTargetPosition.sqf b/addons/spike/functions/fnc_getTargetPosition.sqf index 53e31d3c96..025a243605 100644 --- a/addons/spike/functions/fnc_getTargetPosition.sqf +++ b/addons/spike/functions/fnc_getTargetPosition.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Return the position of a potential EO target via a "edge detection" algorithm. Compares object bounding boxes to see what we are most likely hitting @@ -65,7 +65,7 @@ if (_nearObjects isNotEqualTo []) then { // I want to prefer the designated position on the object moreso than the bounds of the object private _averagePosition = _seekerTargetPos vectorMultiply SEEKER_BIAS; private _averagePositionCounter = SEEKER_BIAS; - + private _bestScore = 0; private _bestObject = objNull; @@ -122,4 +122,3 @@ if (_nearObjects isNotEqualTo []) then { }; _seekerTargetPos - diff --git a/addons/spike/functions/fnc_keyDown.sqf b/addons/spike/functions/fnc_keyDown.sqf index 2e2d8c94af..27395848b0 100644 --- a/addons/spike/functions/fnc_keyDown.sqf +++ b/addons/spike/functions/fnc_keyDown.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Handle key presses @@ -17,7 +17,7 @@ */ params ["_key", "_down"]; -if ((currentWeapon ACE_PLAYER) != QGVAR(launcher)) exitWith {}; +if ((currentWeapon ACE_player) != QGVAR(launcher)) exitWith {}; if (_key == SPIKE_KEY_DESIGNATE) then { if (cameraView == "GUNNER") then { diff --git a/addons/spike/functions/fnc_mapHelperDraw.sqf b/addons/spike/functions/fnc_mapHelperDraw.sqf index 987dde1eb2..11780a4517 100644 --- a/addons/spike/functions/fnc_mapHelperDraw.sqf +++ b/addons/spike/functions/fnc_mapHelperDraw.sqf @@ -1,9 +1,8 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Handles the map helper's draw event - * Resets arguments if not run recently - * And starts a watchdog to detect when weapon display unloaded + * Resets arguments if not run recently and starts a watchdog to detect when weapon display unloaded * * Arguments: * None @@ -21,7 +20,7 @@ private _currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player}; if (isNil QGVAR(arguments)) then { - TRACE_1("Starting optic draw", _this); + TRACE_1("Starting optic draw",_this); // reset shooter var: _currentShooter setVariable ["ace_missileguidance_target", nil, false]; @@ -64,7 +63,7 @@ if (cameraView isEqualTo "GUNNER") then { } else { if (_targetPosition isEqualTo [0, 0, 0]) then { __SPIKE_RETICLE ctrlSetPosition [0, 0]; - + (__SPIKE_DISPLAY displayCtrl 243101) ctrlShow false; (__SPIKE_DISPLAY displayCtrl 243201) ctrlShow false; (__SPIKE_DISPLAY displayCtrl 243301) ctrlShow false; @@ -98,4 +97,3 @@ if (cameraView isEqualTo "GUNNER") then { __SPIKE_RETICLE ctrlShow false; (__SPIKE_DISPLAY displayCtrl 241000) ctrlShow false; }; - diff --git a/addons/spike/functions/fnc_midCourseTransition.sqf b/addons/spike/functions/fnc_midCourseTransition.sqf index 95ded0a71b..f6434129cf 100644 --- a/addons/spike/functions/fnc_midCourseTransition.sqf +++ b/addons/spike/functions/fnc_midCourseTransition.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Condition to switch to next navigation profile @@ -19,4 +19,3 @@ _stateParams params ["", "", "", "","_navigationParams"]; _navigationParams params ["_state"]; _state isEqualTo STAGE_TERMINAL - diff --git a/addons/spike/functions/fnc_navigation.sqf b/addons/spike/functions/fnc_navigation.sqf index 32a12b247a..d3b84d53ef 100644 --- a/addons/spike/functions/fnc_navigation.sqf +++ b/addons/spike/functions/fnc_navigation.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Sets up a top-attack profile. If we don't have a target: coast @@ -113,4 +113,3 @@ drawIcon3D ["\a3\ui_f\data\IGUI\Cfg\Cursors\selectover_ca.paa", [1,1,0,1], (ASLt #endif _projectile vectorModelToWorldVisual _cmdAccel - diff --git a/addons/spike/functions/fnc_onFired.sqf b/addons/spike/functions/fnc_onFired.sqf index d2c3cd17b8..e53ea95ada 100644 --- a/addons/spike/functions/fnc_onFired.sqf +++ b/addons/spike/functions/fnc_onFired.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Initialises SPIKE camera @@ -22,21 +22,21 @@ private _missileGuidanceConfig = (configOf _projectile) >> "ace_missileguidance" // Setup camera array private _cameraConfig = _missileGuidanceConfig >> "camera"; private _cameraArray = [false]; -if (!(_cameraConfig isEqualTo configNull) && { (getNumber (_cameraConfig >> "enabled")) == 1 }) then { +if (!isNull _cameraConfig && { (getNumber (_cameraConfig >> "enabled")) == 1 }) then { _cameraArray set [0, true]; _cameraArray set [1, getArray (_cameraConfig >> "fovLevels")]; _cameraArray set [2, getNumber (_cameraConfig >> "initialFOV")]; - + _cameraArray set [3, getArray (_cameraConfig >> "enabledThermalTypes")]; _cameraArray set [4, getText (_cameraConfig >> "initialThermalType")]; - + _cameraArray set [5, (getNumber (_cameraConfig >> "switchOnFire")) == 1]; - + _cameraArray set [6, getNumber (_cameraConfig >> "lerpFOV")]; _cameraArray set [7, getNumber (_cameraConfig >> "fovChangeTime")]; - + _cameraArray set [8, [[0, 0, 0], [0, 0, 0], [0, 0, 0], false, false]]; // camera view data. [look direction, ground pos, point pos, moving camera x, moving camera y] - + _cameraArray set [9, [ getNumber (_cameraConfig >> "gimbal" >> "enabled") == 1, getNumber (_cameraConfig >> "gimbal" >> "gimbalAngleX"), @@ -50,7 +50,7 @@ if (!(_cameraConfig isEqualTo configNull) && { (getNumber (_cameraConfig >> "ena getNumber (_cameraConfig >> "gimbal" >> "designateWhenStationary") == 1, getNumber (_cameraConfig >> "gimbal" >> "trackLockedPosition") == 1 ]]; - + _cameraArray set [10, [ getText (_cameraConfig >> "reticle" >> "titleRsc"), getNumber (_cameraConfig >> "reticle" >> "centerReticle"), @@ -63,13 +63,13 @@ if (!(_cameraConfig isEqualTo configNull) && { (getNumber (_cameraConfig >> "ena getText (_cameraConfig >> "reticle" >> "uiNamespaceDialogVariable"), getNumber (_cameraConfig >> "reticle" >> "reticleMovesWithTrack") == 1 ]]; - + _cameraArray set [11, (getNumber (_cameraConfig >> "alwaysDesignate")) == 1]; _cameraArray set [12, (getNumber (_cameraConfig >> "canStopDesignating")) == 1]; }; -private _preTarget = +(ACE_PLAYER getVariable [QGVAR(target), [0, 0, 0]]); -ACE_PLAYER setVariable [QGVAR(target), [0, 0, 0]]; +private _preTarget = +(ACE_player getVariable [QGVAR(target), [0, 0, 0]]); +ACE_player setVariable [QGVAR(target), [0, 0, 0]]; private _camera = [_projectile, _cameraArray, _shooter, _preTarget isEqualTo [0, 0, 0]] call FUNC(camera_init); GVAR(projectileHashMap) set [hashValue _projectile, [_camera, _preTarget]]; [{ diff --git a/addons/spike/functions/fnc_seeker.sqf b/addons/spike/functions/fnc_seeker.sqf index 9798a46ade..6d375b1b90 100644 --- a/addons/spike/functions/fnc_seeker.sqf +++ b/addons/spike/functions/fnc_seeker.sqf @@ -1,4 +1,4 @@ -#include "script_component.hpp" +#include "..\script_component.hpp" /* * Author: Dani (TCVM) * Seeker Type: Spike Optical @@ -74,4 +74,3 @@ _seekerStateParams set [0, _lastPositions]; _seekerStateParams set [2, _velocity]; _seekerTargetPos - diff --git a/addons/spike/functions/script_component.hpp b/addons/spike/functions/script_component.hpp deleted file mode 100644 index f655f70ddd..0000000000 --- a/addons/spike/functions/script_component.hpp +++ /dev/null @@ -1 +0,0 @@ -#include "\z\ace\addons\spike\script_component.hpp" \ No newline at end of file