ACE3/addons
SilentSpike 51a61653f4 Update spectator docs (#5362)
* Add player initilization safety to setSpectator

Public function which should wait for player unit to exist before running.
With this change an additional variable is now set on the player unit which
can be used to check whether players are spectators or not (part of
grander plans).

* Add UI initalization safety to setSpectator

Should make it so that calling the public function before the main display
has initalized will correctly wait until it has before starting spectator

* Overhaul spectator

Initial WIP overhaul of spectator component. Based on BI's End Game
Spectator and AACO's work on POTATO spectate. The essential functionality
is in place, but some things are broken and some are still to be
transferred.

* Remove redundant canInteract condition

Spectator UI will be open anyway so this is pointless.

* Fix follow camera controls

Also ensure unit camera modes have a target more consistently

* Fix widget weapon icon for unarmed

* Fix follow camera zooming

* Fix entity list not updating correctly

* Remove redundant conditions

* Fix list click behaviour

* Remove a bunch of old debug

* Alter behaviour of camera speed

* Restructure the spectator addon

* Fix camera tracking behaviour

* Fix very fast camera toggle

* Fix initial camera mode

* Fix double click behaviour

* Make AI name display consistent

* Add UI toggle

* Fix current camera mode button highlighting

* Fix focus info widget when clicked on in 3D world

* Improve key handling

Use of `inputAction` could result in weirdness when multiple keys pressed
at the same time. Hardcoded for now.

* Implement dynamic help UI element

* Remove some redundant code

* Fix follow camera jitter

* Add projectile drawing

Technically the capability to draw projectiles has been in since the
start. However it took me a bit of time to figure out how best to
add/remove the required event handlers.

I decided to add them during the process of finding things to draw, since
I'm iterating over the list of spectatable entities here anyway. With an
additional GVAR containing up to date entities, the fired EHs can remove
themselves when applicable. This avoids any granularity issues with adding
EHs en masse.

* Improve naming convention related to drawing

* Remove outdated unit and side settings

Also re-add unit whitelisting/blacklisting support

* Rename public function for consistency

Adds a deprecated warning to the old function name.

* Update stringtable

Some entries are replaced with BI translations, others are no longer
needed. I pieced together one of the camera mode settings by combining the
BI translations of the individual versions.

* Add location public functions and list population

Just need to take care of drawing and then camera interaction now

* Add location 2D and 3D drawing

* Respect whitelist and blacklist correctly

* Add location camera focus capability

* Fix local helicopters follow mode bug

* Add compatibility with `counter` template

Simply repositions the counter UI to the top of the screen out of the way

* Update respawn template

This template is only compatible with respawn types 2 & 3

* Rename compatibility function

* Add compatibility for respawn types 1,4 and 5

* Update setCameraAttributes function

* Fix draw3D for respawn types 1,4 and 5

* Fix screeching seagulls #4265

* Fix script command typo

* SQF Linter Pass

* Add obsolete warning for public func params

* Deprecate interrupt function

* Fix incorrect function call

* Make playable virtual spectator work

* Improve focus handling in public function

- User might want to reset focus for free cam, in which case objNull
  cannot be reserved for random
- Focus is still required for unit camera
- Update some function headers

* Note explicitly the use of `player`

* Remove unused base classes

* Improve seagull culling

* Add projectile drawing to vehicles

* Fix same tab selection clearing list

* Make projectile lines last 1 frame longer

* Add true zeus compatibility

- Re-opens spectator when zeus closes
- Transfers the curator module over in the respawn template
- Only handle uiForced in setSpectator to avoid issues with esc key
- Add safety to setFocus so that it only updates the UI when applicable

* Fix player moving in FPP

* Fix zeus transfer and re-opening

* Consolidate icon definitions

* Fix AI setting for player groups

* Improve handling of alive spectators

Instead of disabling simulation, just stage them automatically if alive.

* Fix respawn template for types 2 & 3

* Fix pre-set camera mode with no focus

- Improve handling of UI updates in camera related functions
- More explicit UI initalisation
- Find a focus if one wasn't pre-set for a camera mode which requires a
  focus

* Localise key names

* Fix camera mode and vision settings on init

When spectator starts the available camera modes and vision modes should
be consulted to ensure they are respected upon opening.

* Fix key localisation

* Add next/prev entity keys

* Fix vision modes update while camera active

- Updates the camera vision mode in case the current was removed

* Add public getCameraAttributes function

* Fix spectator zeus compatibility

- Camera control wasn't returned on exit due to change in fnc_ui

* Improve vision mode handling

- Curator now resets vision mode on entry
- First person also reset vision mode so that it is consistent between
  camera changes

* Improve location handling

- It makes more sense to specifiy the position ATL since the text is going
  to be rendered there and a z of 0 is then ground height.
- Updates the ui immediately if the list is already on locations

* Disable list keyboard search

* Fix handling of forced camera mode with no focus

* Fix handling of free mode removal while no target

* Fix locations respecting available modes

* Fix list entry removal code

- Replace getTargetGroups with getTargetEntities for consolidated
  filtering.
- Fix the step of the removal loops and make them go to index 0 instead of
  1

* Improve side handling of unit list

- Accounts for possibly of whitelisted random objects that belong to other
  sides
- Move the index decrement to loop, not within every loop

* Add linter ignore directive

* Fix list code

* Improve entity fetching

- Change whitelist/blacklist application to optimize the code

* Include dead units in the list

- Allow getTargetEntities to return dead units too
- Iterate over allGroups in list updates to reduce overhead

* Take care of TODOs

* Mark stageSpectator as non-public

* Fix updating list focus

* Adjust default camera speed

* Include the function file

* Generalise camera button UI

- Makes it easier to extend with future camera mode buttons
- Removes potential error when display doesn't exist

* Remove obsolete staged event

- Add vision toggle to help
- Restructure some function PREP

* Add public function to return all spectators

* Change default briefing name used on map display

* Fix the order of 4 main sides in list

* Restore non-toggle behaviour of camera speed

* Fix UI gap between list and tabs

* Force update UI list when player is staged

Hopefully this fixes any issues related to the player appearing in the
list

* Update controls strings

* Fix entity tooltips showing short name

- Also revert changes to common function and just handle in this component

* Include dead in unit switching

* Show rank and vehicle icon in list

- Rank is shown in tooltip
- Vehicle icon is used to see which units in the list are mounted

* Change default vehicle icon

* Show whether medic/engineer in tooltip

* Improve list double click behaviour

* Improve group icon handling

* Use dynamic group icons for drawing

* Fix EFUNC call

* Update all function headers

* All the changes I had staged before arma broke git

Arma managed to crash my whole system again, breaking my git repo and I
resorted to nuking it and pasting the changes I had comitted locally back
in. From memory:

- Fix icon paths
- use distanceSqr for minor speed boost
- Add setting to show map locations in the UI
- Limit location rendering based on distance
- Probably some other crap

* Fix squared comparisons

* Remove unnecessary variable publicity

* Deprecate fnc_stageSpectator

The function was a source of confusion alongside fnc_setSpectator and so
it is replaced by an additional parameter to hide the unit as part of
fnc_setSpectator. No longer is the unit moved either, to reduce complexity
and give more control to mission maker.

* Fix undefined variable

* Update spectator framework doc

* Update spectator feature doc

* Fix typos and grammar

* Revent version introduced number

* Update with new changes
2017-10-17 20:19:10 +02:00
..
advanced_ballistics Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
advanced_fatigue German stringtable updates (#5539) 2017-10-07 13:37:59 +02:00
advanced_throwing Add Advanced Throwing torque (rotation) (#5621) 2017-10-15 20:06:18 +02:00
ai Italian Translation Update (#5627) 2017-10-16 20:30:38 +02:00
aircraft Replace Helicopter eject configs with universal scripted action (#5384) 2017-09-18 00:24:14 +02:00
apl Replace UI icons with vanilla/common ones (#5532) 2017-09-21 16:22:28 +02:00
atragmx Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
attach Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
backpacks Conform function headers to coding guidelines (#5255) 2017-06-08 15:31:51 +02:00
ballistics AB : same values for the both 127x108 bullets (#5588) 2017-10-11 14:07:13 -05:00
captives Update the Jpn translation (#5612) 2017-10-12 16:15:56 +02:00
cargo German stringtable updates (#5539) 2017-10-07 13:37:59 +02:00
chemlights Cleanup optional argument headers (#5543) 2017-09-22 17:33:08 +02:00
common Add Pylons Component (#5517) 2017-10-11 14:05:54 -05:00
concertina_wire Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
cookoff Cookoff - Filter bad ammo, use new rearm config (#5618) 2017-10-14 15:12:32 +02:00
dagr Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
disarming Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
disposable Replace UI icons with vanilla/common ones (#5532) 2017-09-21 16:22:28 +02:00
dogtags Use CBA Misc Items (#5502) 2017-09-12 23:23:45 -05:00
dragging Fix Underwater interactions (magrepack, loading, refuel, medical legs, dragging) (#5521) 2017-10-01 13:38:11 -05:00
explosives Fix defused UXOs being able to be defused again and detected by mine detector (#5623) 2017-10-15 13:13:16 +02:00
fastroping Prevent fastroping teleport serverside (#5629) 2017-10-16 23:20:50 +02:00
fcs Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
finger Underwater actions support (#4984) 2017-08-22 13:30:56 -05:00
flashlights Update the Jpn translation (#5586) 2017-10-04 16:30:11 +02:00
flashsuppressors Correct new Chinese stringtable identifiers (#5334) 2017-07-10 16:47:26 +02:00
fonts Cleanup (#5463) 2017-08-29 17:47:01 -05:00
frag Merge remote-tracking branch 'sbng/master' 2017-09-27 18:57:24 +02:00
gestures Underwater actions support (#4984) 2017-08-22 13:30:56 -05:00
gforces Correct new Chinese stringtable identifiers (#5334) 2017-07-10 16:47:26 +02:00
goggles Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
grenades Update the Jpn translation (#5586) 2017-10-04 16:30:11 +02:00
gunbag Correct new Chinese stringtable identifiers (#5334) 2017-07-10 16:47:26 +02:00
hearing Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
hellfire Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
hitreactions Conform function headers to coding guidelines (#5255) 2017-06-08 15:31:51 +02:00
huntir Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
interact_menu Add function to add curator actions (#5620) 2017-10-14 12:01:07 -05:00
interaction Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
inventory Update the Jpn translation (#5586) 2017-10-04 16:30:11 +02:00
javelin Correct new Chinese stringtable identifiers (#5334) 2017-07-10 16:47:26 +02:00
kestrel4500 Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
laser Cleanup optional argument headers (#5543) 2017-09-22 17:33:08 +02:00
laserpointer Correct new Chinese stringtable identifiers (#5334) 2017-07-10 16:47:26 +02:00
logistics_uavbattery Merge remote-tracking branch 'sbng/master' 2017-09-27 18:57:24 +02:00
logistics_wirecutter Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
magazinerepack Fix Underwater interactions (magrepack, loading, refuel, medical legs, dragging) (#5521) 2017-10-01 13:38:11 -05:00
main Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
map Update the Jpn translation (#5586) 2017-10-04 16:30:11 +02:00
map_gestures Correct new Chinese stringtable identifiers (#5334) 2017-07-10 16:47:26 +02:00
maptools Use CBA Misc Items (#5502) 2017-09-12 23:23:45 -05:00
markers Italian translation update (#5531) 2017-09-19 16:22:11 +02:00
maverick Update the Jpn translation (#5536) 2017-09-20 14:59:46 +02:00
medical Remove legacy medical settings (#5609) 2017-10-11 22:23:12 +02:00
medical_ai Made AI medic use epipen on unconscious patients (#5433) 2017-10-14 20:43:53 +02:00
medical_blood Merge remote-tracking branch 'sbng/master' 2017-09-27 18:57:24 +02:00
medical_menu Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
microdagr Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
minedetector Fix defused UXOs being able to be defused again and detected by mine detector (#5623) 2017-10-15 13:13:16 +02:00
missileguidance Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
missionmodules Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
mk6mortar Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
modules Add XEH to ace_module (#5304) 2017-07-10 16:46:02 +02:00
movement Merge remote-tracking branch 'sbng/master' 2017-09-27 18:57:24 +02:00
mx2a Correct new Chinese stringtable identifiers (#5334) 2017-07-10 16:47:26 +02:00
nametags Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
nightvision Update the Jpn translation (#5612) 2017-10-12 16:15:56 +02:00
nlaw German stringtable updates (#5539) 2017-10-07 13:37:59 +02:00
noidle Cleanup (#5463) 2017-08-29 17:47:01 -05:00
noradio Cleanup (#5463) 2017-08-29 17:47:01 -05:00
norearm Cleanup (#5463) 2017-08-29 17:47:01 -05:00
optics Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
optionsmenu Fix options menu (#5617) 2017-10-13 23:50:12 +02:00
overheating Disable checking weapon temp on fakeWeapon (#5600) 2017-10-11 23:36:48 +02:00
overpressure German stringtable updates (#5539) 2017-10-07 13:37:59 +02:00
parachute Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
pylons Italian Translation Update (#5627) 2017-10-16 20:30:38 +02:00
quickmount QuickMount - fix locked seats, getIn EH (#5626) 2017-10-15 17:59:34 +02:00
rangecard Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
realisticnames Update the Jpn translation (#5586) 2017-10-04 16:30:11 +02:00
realisticweights Update SMG_02 base class for 1.66 (#4718) 2016-12-12 19:31:52 +01:00
rearm Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
recoil Conform function headers to coding guidelines (#5255) 2017-06-08 15:31:51 +02:00
refuel Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
reload Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
reloadlaunchers Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
repair Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
respawn Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
safemode Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
sandbag Use CBA Misc Items (#5502) 2017-09-12 23:23:45 -05:00
scopes Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
slideshow German stringtable updates (#5539) 2017-10-07 13:37:59 +02:00
smallarms Update SMG_02 base class for 1.66 (#4718) 2016-12-12 19:31:52 +01:00
spectator Update spectator docs (#5362) 2017-10-17 20:19:10 +02:00
spottingscope Use CBA Misc Items (#5502) 2017-09-12 23:23:45 -05:00
switchunits Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
tacticalladder Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
tagging Use CBA Misc Items (#5502) 2017-09-12 23:23:45 -05:00
thermals Cleanup (#5463) 2017-08-29 17:47:01 -05:00
trenches Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
tripod Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
ui Update the Jpn translation (#5586) 2017-10-04 16:30:11 +02:00
vector Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
vehiclelock Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
vehicles Underwater actions support (#4984) 2017-08-22 13:30:56 -05:00
viewdistance Fixed viewdistance error while controlling UAV (#5308) 2017-09-10 14:42:19 -05:00
weaponselect Update the Jpn translation (#5586) 2017-10-04 16:30:11 +02:00
weather Advanced Ballistics - Drag model revamp & Spin drift correction (#5566) 2017-10-06 13:05:20 -05:00
winddeflection Update the Jpn translation (#5586) 2017-10-04 16:30:11 +02:00
yardage450 Refactor private ARRAY to private keyword (#5598) 2017-10-10 09:39:59 -05:00
zeus Fix garrison header and use showMessage (#5628) 2017-10-16 15:23:39 -05:00