-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add - Spike LR ATGM #8931
base: master
Are you sure you want to change the base?
Add - Spike LR ATGM #8931
Conversation
Updated to merge into new missile guidance branch |
guess it auto closed because target merged, ugh |
reopen test |
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All headers to camera
functions (and some others) need to be updated with correct examples.
}/*, { | ||
params ["_target", "_player", "_params"]; | ||
// insert children | ||
}*/] call EFUNC(interact_menu,createAction); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't stay commented as it is.
|
||
private _lastGroundPos = _cameraNamespace getVariable [QGVAR(lastMovedGroundPos), [0, 0, 0]]; | ||
|
||
if !((_movingCameraX || _movingCameraY) || true) then { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That true
needs to go.
_cameraNamespace setVariable [QGVAR(logicPos), _relativePos]; | ||
_cameraNamespace setVariable [QGVAR(cameraPos), _cameraPosASL]; | ||
|
||
private _p = _cameraPosASL vectorAdd _relativePos; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_p
should be replaced with a better variable name.
<English>Designate</English><!-- Check this --> | ||
</Key> | ||
<Key ID="STR_ACE_SPIKE_LeaveCamera"> | ||
<English>Leave Camera</English><!-- Check this --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments need to be addressed and removed.
#include "\z\ace\addons\main\script_mod.hpp" | ||
|
||
// #define DEBUG_MODE_FULL | ||
#define DISABLE_COMPILE_CACHE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#define DISABLE_COMPILE_CACHE | |
// #define DISABLE_COMPILE_CACHE |
#include "..\script_component.hpp" | ||
/* | ||
* Author: Dani (TCVM) | ||
* Cycles camera thermal mode (if avaliable) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Cycles camera thermal mode (if avaliable) | |
* Cycles camera thermal mode (if available) |
private _initPosX = (tan _initGimbalAngleX) * GIMBAL_LOGIC_OFFSET; | ||
private _initPosY = (tan _initGimbalAngleY) * GIMBAL_LOGIC_OFFSET; | ||
|
||
private _projectileBounds = (1 boundingBoxReal _projectile); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
private _projectileBounds = (1 boundingBoxReal _projectile); | |
private _projectileBounds = 1 boundingBoxReal _projectile; |
params ["_cameraNamespace"]; | ||
|
||
if ([] call FUNC(camera_userInCamera)) exitWith {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
params ["_cameraNamespace"]; | |
if ([] call FUNC(camera_userInCamera)) exitWith {}; | |
if ([] call FUNC(camera_userInCamera)) exitWith {}; | |
params ["_cameraNamespace"]; |
|
||
private _lastGroundPos = _cameraNamespace getVariable [QGVAR(lastMovedGroundPos), [0, 0, 0]]; | ||
|
||
if !((_movingCameraX || _movingCameraY) || true) then { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if !((_movingCameraX || _movingCameraY) || true) then { | |
if !(_movingCameraX || _movingCameraY) then { |
_cameraNamespace setVariable [QGVAR(lastMovedGroundPos), _lastGroundPos]; | ||
}; | ||
|
||
if (_trackLockedPosition && { (_seekerTargetPos isNotEqualTo [0, 0, 0]) } && _canStopDesignating) then { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (_trackLockedPosition && { (_seekerTargetPos isNotEqualTo [0, 0, 0]) } && _canStopDesignating) then { | |
if (_trackLockedPosition && _canStopDesignating && { _seekerTargetPos isNotEqualTo [0, 0, 0] }) then { |
params [["_cameraNamespace", objNull]]; | ||
|
||
if (isNil QGVAR(activeCamera)) exitWith { false }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
params [["_cameraNamespace", objNull]]; | |
if (isNil QGVAR(activeCamera)) exitWith { false }; | |
if (isNil QGVAR(activeCamera)) exitWith { false }; | |
params [["_cameraNamespace", objNull]]; |
params ["_key", "_down"]; | ||
|
||
if ((currentWeapon ACE_player) != QGVAR(launcher)) exitWith {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
params ["_key", "_down"]; | |
if ((currentWeapon ACE_player) != QGVAR(launcher)) exitWith {}; | |
if ((currentWeapon ACE_player) != QGVAR(launcher)) exitWith {}; | |
params ["_key", "_down"]; |
if ((currentWeapon ACE_player) != QGVAR(launcher)) exitWith {}; | ||
|
||
if (_key == SPIKE_KEY_DESIGNATE) then { | ||
if (cameraView == "GUNNER") then { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (cameraView == "GUNNER") then { | |
if (cameraView isEqualTo "GUNNER") then { |
_cameraArray set [9, [ | ||
getNumber (_cameraConfig >> "gimbal" >> "enabled") == 1, | ||
getNumber (_cameraConfig >> "gimbal" >> "gimbalAngleX"), | ||
getNumber (_cameraConfig >> "gimbal" >> "gimbalAngleY"), | ||
getNumber (_cameraConfig >> "gimbal" >> "gimbalSpeedX"), | ||
getNumber (_cameraConfig >> "gimbal" >> "gimbalSpeedY"), | ||
getNumber (_cameraConfig >> "gimbal" >> "gimbalInitOffsetX"), | ||
getNumber (_cameraConfig >> "gimbal" >> "gimbalInitOffsetY"), | ||
getArray (_cameraConfig >> "gimbal" >> "fovGimbalSpeedModifiers"), | ||
getNumber (_cameraConfig >> "gimbal" >> "stabilizeWhenMoving") == 1, | ||
getNumber (_cameraConfig >> "gimbal" >> "designateWhenStationary") == 1, | ||
getNumber (_cameraConfig >> "gimbal" >> "trackLockedPosition") == 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ouch, this many calls has to be expensive.
_cameraArray set [9, [ | |
getNumber (_cameraConfig >> "gimbal" >> "enabled") == 1, | |
getNumber (_cameraConfig >> "gimbal" >> "gimbalAngleX"), | |
getNumber (_cameraConfig >> "gimbal" >> "gimbalAngleY"), | |
getNumber (_cameraConfig >> "gimbal" >> "gimbalSpeedX"), | |
getNumber (_cameraConfig >> "gimbal" >> "gimbalSpeedY"), | |
getNumber (_cameraConfig >> "gimbal" >> "gimbalInitOffsetX"), | |
getNumber (_cameraConfig >> "gimbal" >> "gimbalInitOffsetY"), | |
getArray (_cameraConfig >> "gimbal" >> "fovGimbalSpeedModifiers"), | |
getNumber (_cameraConfig >> "gimbal" >> "stabilizeWhenMoving") == 1, | |
getNumber (_cameraConfig >> "gimbal" >> "designateWhenStationary") == 1, | |
getNumber (_cameraConfig >> "gimbal" >> "trackLockedPosition") == 1 | |
private _cameraConfigGimbal = _cameraConfig >> "gimbal"; | |
_cameraArray set [9, [ | |
getNumber (_cameraConfigGimbal >> "enabled") == 1, | |
getNumber (_cameraConfigGimbal >> "gimbalAngleX"), | |
getNumber (_cameraConfigGimbal >> "gimbalAngleY"), | |
getNumber (_cameraConfigGimbal >> "gimbalSpeedX"), | |
getNumber (_cameraConfigGimbal >> "gimbalSpeedY"), | |
getNumber (_cameraConfigGimbal >> "gimbalInitOffsetX"), | |
getNumber (_cameraConfigGimbal >> "gimbalInitOffsetY"), | |
getArray (_cameraConfigGimbal >> "fovGimbalSpeedModifiers"), | |
getNumber (_cameraConfigGimbal >> "stabilizeWhenMoving") == 1, | |
getNumber (_cameraConfigGimbal >> "designateWhenStationary") == 1, | |
getNumber (_cameraConfigGimbal >> "trackLockedPosition") == 1 |
_cameraArray set [10, [ | ||
getText (_cameraConfig >> "reticle" >> "titleRsc"), | ||
getNumber (_cameraConfig >> "reticle" >> "centerReticle"), | ||
getArray (_cameraConfig >> "reticle" >> "controlsToDisappearOnLock"), | ||
getArray (_cameraConfig >> "reticle" >> "controlsToAppearOnLock"), | ||
getNumber (_cameraConfig >> "reticle" >> "leftGate"), | ||
getNumber (_cameraConfig >> "reticle" >> "rightGate"), | ||
getNumber (_cameraConfig >> "reticle" >> "topGate"), | ||
getNumber (_cameraConfig >> "reticle" >> "bottomGate"), | ||
getText (_cameraConfig >> "reticle" >> "uiNamespaceDialogVariable"), | ||
getNumber (_cameraConfig >> "reticle" >> "reticleMovesWithTrack") == 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_cameraArray set [10, [ | |
getText (_cameraConfig >> "reticle" >> "titleRsc"), | |
getNumber (_cameraConfig >> "reticle" >> "centerReticle"), | |
getArray (_cameraConfig >> "reticle" >> "controlsToDisappearOnLock"), | |
getArray (_cameraConfig >> "reticle" >> "controlsToAppearOnLock"), | |
getNumber (_cameraConfig >> "reticle" >> "leftGate"), | |
getNumber (_cameraConfig >> "reticle" >> "rightGate"), | |
getNumber (_cameraConfig >> "reticle" >> "topGate"), | |
getNumber (_cameraConfig >> "reticle" >> "bottomGate"), | |
getText (_cameraConfig >> "reticle" >> "uiNamespaceDialogVariable"), | |
getNumber (_cameraConfig >> "reticle" >> "reticleMovesWithTrack") == 1 | |
private _cameraConfigReticle = _cameraConfig >> "reticle"; | |
_cameraArray set [10, [ | |
getText (_cameraConfigReticle >> "titleRsc"), | |
getNumber (_cameraConfigReticle >> "centerReticle"), | |
getArray (_cameraConfigReticle >> "controlsToDisappearOnLock"), | |
getArray (_cameraConfigReticle >> "controlsToAppearOnLock"), | |
getNumber (_cameraConfigReticle >> "leftGate"), | |
getNumber (_cameraConfigReticle >> "rightGate"), | |
getNumber (_cameraConfigReticle >> "topGate"), | |
getNumber (_cameraConfigReticle >> "bottomGate"), | |
getText (_cameraConfigReticle >> "uiNamespaceDialogVariable"), | |
getNumber (_cameraConfigReticle >> "reticleMovesWithTrack") == 1 |
When merged this pull request will:
Requires #10019