ACE3/docs/wiki/feature/spectator.md

77 lines
3.9 KiB
Markdown
Raw Normal View History

---
layout: wiki
title: Spectator
component: spectator
description: A flexible spectator system.
group: feature
category: interaction
parent: wiki
mod: ace
version:
major: 3
minor: 2
patch: 0
---
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 18:19:10 +00:00
## 1. Features
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 18:19:10 +00:00
ACE3 spectator is heavily inspired by Bohemia Interactive's [End Game Spectator](https://community.bistudio.com/wiki/EG_Spectator_Mode). The reason for this is to try and keep the spectator user experience relatively consistent and so that ACE3 can focus more on providing additional functionality than reinventing how spectator actually works.
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 18:19:10 +00:00
### 1.1 Camera modes
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 18:19:10 +00:00
There are 3 available camera modes which can be enabled/disabled via the relevant setting and public API:
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 18:19:10 +00:00
- Free Camera
- First Person
- Third Person
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 18:19:10 +00:00
A button dock at the bottom of the UI can be used to switch camera modes as well as <kbd>Spacebar</kbd>.
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 18:19:10 +00:00
### 1.2 Vision modes
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 18:19:10 +00:00
By default, there are 3 available vision modes which can be enabled/disabled via the relevant setting and public API:
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 18:19:10 +00:00
- Normal
- Night Vision
- Thermal (White and Black Hot)
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 18:19:10 +00:00
However, via the public API a range of additional thermal vision modes are also possible. Cycling through available vision modes is currently hard coded to the <kbd>N</kbd> key.
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 18:19:10 +00:00
### 1.3 Unit focusing
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 18:19:10 +00:00
Focusing on a unit changes the active camera view to observe the given unit. In free camera, this means the camera will center on the unit regardless of where you move it (while in 1PP and 3PP the camera behaves as expected). To change the current focus, units can be:
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 18:19:10 +00:00
- Clicked on in the 3D world (their rendered name will become highlighted when moused over)
- Clicked on in the 2D map (their icon will become highlighted when moused over)
- Clicked on in the unit list on the left side of the UI
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 18:19:10 +00:00
Before 1PP and 3PP camera modes can be entered, a unit must be in focus as these camera modes require a unit to observe. To un-focus the free camera, simply click again while no new unit is highlighted.
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 18:19:10 +00:00
### 1.4 Spectator map
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 18:19:10 +00:00
Pressing the <kbd>M</kbd> key will open the spectator map. All spectatable units and locations are rendered on the map as well as the free camera if active. To teleport the free camera simply click on the map at the desired location (with no unit highlighted).
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 18:19:10 +00:00
### 1.5 Camera speeds
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 18:19:10 +00:00
Unlike End Game Spectator, instead of having two levels of fast camera speed, the default camera speed is more responsive and a hotkey is provided to slow the camera speed (for when more fine movement is desired) as well as increase it (for when traveling distance is desired).
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 18:19:10 +00:00
### 1.6 Draw distance
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 18:19:10 +00:00
Upon opening spectator the view distance defaults to 1200m, the <kbd>Page Up</kbd> and <kbd>Page Down</kbd> keys can be used to incrementally increase and decrease this view distance within the range of 500m to 2500m.
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 18:19:10 +00:00
### 1.7 Camera lights
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 18:19:10 +00:00
Pressing the <kbd>L</kbd> hotkey will toggle local camera lights on an off. A light is created at both the cursor position and camera position to assist in viewing night time scenarios without night vision. Nobody else will see these lights since they are created locally.
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 18:19:10 +00:00
### 1.8 Focus info widget
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 18:19:10 +00:00
When a unit is focused on, a small widget will be shown in the center of the UI with details on their loadout and performance. To toggle this UI element on and off the <kbd>I</kbd> hotkey can be used.
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 18:19:10 +00:00
### 1.9 Unit drawing
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 18:19:10 +00:00
The <kbd>O</kbd> hotkey can be used to toggle unit and group drawing on and off. Units will be drawn with a caret icon above their heads and their nametag when in close proximity to the camera. Groups will receive a dynamic (approximate) NATO group icon based on their composition - which is rendered above the group leader.
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 18:19:10 +00:00
### 1.10 Projectile drawing
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 18:19:10 +00:00
The <kbd>P</kbd> hotkey can be used to toggle projectile drawing on and off. Projectiles originating from units listed in the unit list will be drawn in real time and allow fire fights to be observed more clearly. Note that this feature may have a significant performance impact in scenarios with lots of projectiles on screen at once.