Skip to content
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

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

TheCandianVendingMachine
Copy link
Contributor

@TheCandianVendingMachine TheCandianVendingMachine commented Jun 3, 2022

When merged this pull request will:

  • Adds Spike LR ATGM
  • Adds custom camera framework for Spike to use

Requires #10019

@TheCandianVendingMachine TheCandianVendingMachine changed the base branch from master to missile_guidance_rewrite May 28, 2024 03:35
@TheCandianVendingMachine TheCandianVendingMachine changed the title ADD - Missile Guidance - Spike LR ATGM Add - Spike LR ATGM May 28, 2024
@TheCandianVendingMachine
Copy link
Contributor Author

Updated to merge into new missile guidance branch

@PabstMirror PabstMirror deleted the branch acemod:master August 23, 2024 14:21
@PabstMirror
Copy link
Contributor

guess it auto closed because target merged, ugh

@PabstMirror
Copy link
Contributor

reopen test

@PabstMirror PabstMirror reopened this Aug 23, 2024
@PabstMirror PabstMirror changed the base branch from missile_guidance_rewrite to master August 23, 2024 14:42
PabstMirror and others added 8 commits August 23, 2024 09:44
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>
Copy link
Contributor

@johnb432 johnb432 left a 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.

Comment on lines +18 to +21
}/*, {
params ["_target", "_player", "_params"];
// insert children
}*/] call EFUNC(interact_menu,createAction);
Copy link
Contributor

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 {
Copy link
Contributor

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;
Copy link
Contributor

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.

Comment on lines +35 to +38
<English>Designate</English><!-- Check this -->
</Key>
<Key ID="STR_ACE_SPIKE_LeaveCamera">
<English>Leave Camera</English><!-- Check this -->
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define DISABLE_COMPILE_CACHE
// #define DISABLE_COMPILE_CACHE

#include "..\script_component.hpp"
/*
* Author: Dani (TCVM)
* Cycles camera thermal mode (if avaliable)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
private _projectileBounds = (1 boundingBoxReal _projectile);
private _projectileBounds = 1 boundingBoxReal _projectile;

Comment on lines +18 to +20
params ["_cameraNamespace"];

if ([] call FUNC(camera_userInCamera)) exitWith {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if !((_movingCameraX || _movingCameraY) || true) then {
if !(_movingCameraX || _movingCameraY) then {

_cameraNamespace setVariable [QGVAR(lastMovedGroundPos), _lastGroundPos];
};

if (_trackLockedPosition && { (_seekerTargetPos isNotEqualTo [0, 0, 0]) } && _canStopDesignating) then {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (_trackLockedPosition && { (_seekerTargetPos isNotEqualTo [0, 0, 0]) } && _canStopDesignating) then {
if (_trackLockedPosition && _canStopDesignating && { _seekerTargetPos isNotEqualTo [0, 0, 0] }) then {

Comment on lines +18 to +20
params [["_cameraNamespace", objNull]];

if (isNil QGVAR(activeCamera)) exitWith { false };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
params [["_cameraNamespace", objNull]];
if (isNil QGVAR(activeCamera)) exitWith { false };
if (isNil QGVAR(activeCamera)) exitWith { false };
params [["_cameraNamespace", objNull]];

Comment on lines +18 to +20
params ["_key", "_down"];

if ((currentWeapon ACE_player) != QGVAR(launcher)) exitWith {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (cameraView == "GUNNER") then {
if (cameraView isEqualTo "GUNNER") then {

Comment on lines +40 to +51
_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
Copy link
Contributor

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.

Suggested change
_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

Comment on lines +54 to +64
_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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
_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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants