Skip to content

Common - Add support for commander turrets to cba_common_fnc_turretDir#1507

Merged
commy2 merged 1 commit intomasterfrom
cmdTurretDir
Dec 18, 2021
Merged

Common - Add support for commander turrets to cba_common_fnc_turretDir#1507
commy2 merged 1 commit intomasterfrom
cmdTurretDir

Conversation

@PabstMirror
Copy link
Copy Markdown
Contributor

@PabstMirror PabstMirror commented Oct 9, 2021

Some turrets like the blu wheeled IFV don't have gunBeg defined because they don't have any weapons.

https://community.bistudio.com/wiki/eyeDirection

Returns the direction object is watching (eyes, or a vehicle primary observer).

@jonpas jonpas changed the title Common - Add support for commander turrets to cba_common_fnc_turretDir Common - Add support for commander turrets to cba_common_fnc_turretDir Oct 9, 2021
@jonpas jonpas added this to the 3.15.7 milestone Oct 9, 2021
@commy2
Copy link
Copy Markdown
Contributor

commy2 commented Oct 12, 2021

What if the turret has primaryObserver as well as gunBeg and gunEnd?

@PabstMirror
Copy link
Copy Markdown
Contributor Author

this is after the if (_gunEnd isEqualTo _gunBeg) then { check so it's just a fallback, but they should be the same in either case

@PabstMirror
Copy link
Copy Markdown
Contributor Author

Tested on
"B_APC_Wheeled_01_cannon_F"
"B_AFV_Wheeled_01_cannon_F"
"B_MBT_01_cannon_F"
"O_APC_Tracked_02_cannon_F"

All go from just [0,0] to giving actual angles that match the hud dir/elev display

@commy2 commy2 merged commit 45e8d9b into master Dec 18, 2021
@commy2 commy2 deleted the cmdTurretDir branch December 18, 2021 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants