Commit Graph

277 Commits

Author SHA1 Message Date
commy2
a9ebcf8543 fix setVariable and getVariable capitalization 2015-11-30 17:27:09 +01:00
commy2
34d351c652 fix exitWith capitalization 2015-11-30 17:14:05 +01:00
commy2
e5c4d35969 1.55 use new selectRandom command 2015-11-29 16:33:25 +01:00
SilentSpike
d2538c6ff2 Add spectator text chat
Turns out custom radio channels are kind of a pain to work with. However this should work fine assuming the radioChannelAdd commands will work on client machines.
2015-11-22 20:03:10 +00:00
SilentSpike
f8e293d04d Localise spectator hotkeys in help window 2015-11-18 15:18:21 +00:00
SilentSpike
0567d1c2a1 Fix spectator unit list key press handling
By setting maxHistroyDelay really high, the unit list shouldn't be messed with via key press very often.
2015-11-18 15:02:17 +00:00
SilentSpike
23e110d7ce Remove depreciated spectator hotkey 2015-11-17 15:26:34 +00:00
SilentSpike
cf368f240f Remove ear ringing upon spectator entry
Volume updating was disabled, however any existing ringing would persist. Setting the volume to 0 should make the hearing PFH stop playing sound.
2015-11-13 13:00:04 +00:00
SilentSpike
b6dd7b941f Reduce overhead of spectator map icons
Fixes #2514 by only rendering individual unit icons when zoomed in and only rendering the units currently within the screen bounds.

Behaves as expected, but whether or not it has a significant performance increase under scaled up testing conditions remains to be seen.
2015-10-17 13:23:51 +01:00
SilentSpike
780e0aa270 Add vision mode support to spectator external cam
Since external view is actually another camera, vision modes should also apply to it too.
2015-10-04 19:26:53 +01:00
SilentSpike
4079ca354e Update spectator function headers 2015-10-04 18:30:07 +01:00
SilentSpike
c1dc8a6493 Fix spectator 3D icons not rendering
Fixes #2676 as per voiperr's suggestion (working with camera can be really strange, I swear this worked before)
2015-10-04 18:17:07 +01:00
SilentSpike
52d703c2eb Improve spectator seagull handling
Previously they were only hidden, but this didn't account for the annoying audio they play so now they're entirely staged like a spectator unit would be.
2015-10-04 18:17:02 +01:00
SilentSpike
f0f822b4bc Decrease default spectator camera speed 2015-10-04 18:17:01 +01:00
SilentSpike
b1dda86cb2 End spectator interface when the mission ends
Fixes #2592 (in theory) by forcing spectator closed on mission end
2015-10-04 18:17:01 +01:00
SilentSpike
0beaa40fbc Add API parameter to allow for unforced spectator
Adds an optional boolean paremeter to the setSpectator function for forcing the interface. It is forced by default, so if `false` is passed as the value the spectator will be able to close the interface with the escape button.
2015-10-04 13:52:54 +01:00
Cuel
dcbf977d6d fix spectator view if called instantly
If you call setSpectator directly from init.sqf you'll be put into some
weird limbo mode with borders and spectator not working. This should fix
it
2015-09-25 12:51:13 +02:00
PabstMirror
5555eb195a Also search for missing stringtable entries 2015-09-20 17:46:43 -05:00
esteldunedain
a621a0c693 Fixes to spanish translations 2015-09-18 13:36:57 -03:00
Ivan Navarro Cabello
463e21dd91 330 2015-09-16 12:40:30 +02:00
Glowbal
7e5ab07e32 Merge pull request #2387 from acemod/FixHCPPE
Fix that PPEffects Throw a error on HC
2015-09-15 21:04:37 +02:00
SilentSpike
e6c2916a14 Fix spectator template for negligible respawnDelay
When the value of respawn delay is 0 the timing of the killed and respawn events can be a little strange and result in spectator being entered but never exited. The respawn template should just do nothing when the delay is so small.
2015-09-12 14:02:42 +01:00
jokoho48
b7e02da1cc remove if (!hasInterface) from PFH
move ! in ()
2015-09-11 16:58:26 +02:00
SilentSpike
aa7b6cf39f Improve angular behaviour of spectator camera
Changes the position calculation of the external spectator camera to correctly retain the pan and tilt of the free camera. Makes transitioning between the two less disorienting for the user.
2015-09-11 14:46:21 +01:00
SilentSpike
77c2b99ee5 Change spectator external camera behaviour
Using the "external" view is limited by the server difficulty setting. Instead the spectator external camera has been replaced with an oribtal camera as was originally planned to be added alongside the default views.
2015-09-11 14:46:21 +01:00
KoffeinFlummi
63c2712360 Merge branch 'release' into portuguese 2015-09-10 21:59:30 +02:00
KoffeinFlummi
c2ffe7cad0 Merge branch 'release' into russian 2015-09-10 21:05:32 +02:00
Jonathan Pereira
7147891710 Added latest ACE3 PT-BR translations 2015-09-05 15:12:31 -03:00
kaban
08b7110e58 Russian Translations - Update 2015-09-03 04:54:52 +03:00
kaban
91cae690c0 Russian Translations - Update 2015-09-03 03:36:15 +03:00
ProfessorCZ
44fa520bdd Czech Translations - Update 2015-09-03 01:20:24 +02:00
SilentSpike
200f44d963 Adjust spectator camera speed based on height
Slows the camera movement close to the ground as it feels more natural when spectating units up close and such
2015-08-29 16:05:04 +01:00
SilentSpike
ffcf0ecf7d Merge pull request #2253 from gienkov/spectator-pl-translation
Translate spectator strings to polish
2015-08-25 16:25:14 +01:00
Grzegorz
288457d366 fix 2015-08-24 17:43:02 +02:00
gienkov
0fa10045d2 pl translation of spectator 2015-08-24 14:35:15 +02:00
SilentSpike
152faf6388 Improve spectator interface entry and exit
- Use a display rather than a dialog (contextually makes more sense).
- Move the entry/exit functionality to the setSpectator function. Preserves the handleInterface function for purely display related events and makes more sense.
- Fix missing semi-colon
2015-08-24 00:43:20 +01:00
SilentSpike
21b0ee087a Add spectator UI interrupt system
A public API system to allow external systems to interrupt and resume the spectator interface. Also made use of it for the escape menu and zeus support.
2015-08-22 00:26:43 +01:00
SilentSpike
95aa9f604b Fix manual pre-setting of spectator camera unit
If the spectator camera unit was set before the camera had ever opened then the unit list wouldn't be populated and as such the camera would automatically abort to free mode since the unit wasn't available to spectate.

So now I'm running the updateUnits function before opening the camera to pre-populate the list.
2015-08-11 13:53:55 +01:00
SilentSpike
c30cb45bd6 Optimize spectator UI held key prevention system 2015-08-09 20:59:57 +01:00
SilentSpike
182eef39de Adjust spectator camera pan and tilt with zoom 2015-08-08 18:41:38 +01:00
SilentSpike
213deeffb4 Add keys to adjust spectator camera speed and zoom
Allows for finer control of the speed and zoom, as well as a quick way to reset either.
2015-08-08 18:31:37 +01:00
SilentSpike
d7730103c9 Update ace_spectator readme 2015-08-08 17:22:04 +01:00
SilentSpike
be7b156c49 Add "focus on unit" to spectator free camera
Pressing F will move the free camera to a position viewing the unit currently selected in the list. Fixes map teleporting functionality also.
2015-08-08 15:49:07 +01:00
SilentSpike
5b881224c5 Allow admins to use chat in the spectator UI 2015-08-08 13:31:10 +01:00
SilentSpike
e59f0ce822 Fix spectator respawn template for types 0 and 1
Type 0 worked, but the mission didn't end when all players were killed.
Type 1 didn't work because isPlayer isn't true for seagulls. So spectator virtual state is now entirely unassociated from objects in the game.
2015-08-08 12:33:34 +01:00
SilentSpike
57bda372f0 Adjust spectator free camera speed with zoom 2015-08-07 19:00:31 +01:00
SilentSpike
c5d9ec5d50 Add speed boost button to spectator free camera
Sometimes you just want a burst of speed rather than to adjust it and then adjust it back. Also swapped the speed/zoom scrolling modifier around.
2015-08-07 18:59:48 +01:00
SilentSpike
1c79c8fa45 Update spectator UI styling
Adds a title to the unit tree to match the help list and enters the title text.
2015-08-07 15:15:04 +01:00
SilentSpike
702e50b731 Improve spectator UI respawn counter blending
When the BI respawn counter is blended with the spectator UI its colours are also updated to match
2015-08-07 12:30:50 +01:00
SilentSpike
f143db7fc0 Draw player names on spectator map 2015-08-07 12:20:39 +01:00
SilentSpike
485f9438bb Change spectator UI toggle to include help window
With new layout of help window the toggle UX also changes. User expects help window to toggle as part of overall UI.
2015-08-07 01:51:46 +01:00
SilentSpike
043c5c47c5 Improve spectator help window layout
Having the help window in the centre of the screen blocked too much of the users view and also clashed with the MPTable element (the table that appears on death, aka "respawnDialog"). It was moved to the right of the screen and now mirrors the unit list. To save screen space, the action keys are given as tooltips for the listbox entries so users must mouse over for more info.
2015-08-07 01:44:32 +01:00
SilentSpike
f59536b5a3 Remove legacy spectator settings module argument 2015-08-07 00:28:54 +01:00
SilentSpike
4c9b6e94cf Overhaul and improve spectator unit tree UX
The old method of refreshing the tree on each update would reset all expanded/collapsed nodes. Now the code will cull any units/groups/sides no longer spectatable from the list and cache the ones that are still valid. The cached data is then used to populate the list with new units.

Add coloured unit icons beside units in the list for quick user reference of side and type.

Store group netIDs in respective nodes for possible use in code.
2015-08-07 00:06:22 +01:00
SilentSpike
bcb21b782e Overhaul spectator icon handling and rendering
- Optimize and improve 3D icon drawing
- Combine 2D and 3D PFHs into 1
- Render group icons outside of 200m, unit icons within
- Store list of groups on units update to cut down on what needs to be done each frame
- Change map control type to 100 to remove all default unit icons
- Improve colour caching, group colours don't change, unit colours do
- Remove icon setting, toggling should be at users discretion
2015-08-06 16:03:32 +01:00
SilentSpike
92ef0bfe99 Whitelist spectator free camera boom keys
Now that booming the free camera is influenced by the camera speed, the keys should be whitelisted from the held-key prevention system to allow the speed to be adjusted on the move. Also includes a failed attempt to fix the free camera map teleporting functionality.
2015-08-06 11:39:32 +01:00
SilentSpike
d6cc14a39d Add zeus support to spectator UI
Can only use zeus while alive, so it won't work using the respawn template. However it's useful for communities usign custom frameworks
2015-08-06 00:53:49 +01:00
SilentSpike
d1975a593d Improve spectator pause menu emulation
Makes the fake pause menu closer to the real thing for UX purposes
2015-08-06 00:53:48 +01:00
SilentSpike
c808021c7c Tweak spectator interface layout
- Swap the FOV and vision mode tools into a more logical order.
- Shorten the unit list to prevent overlay with main UI
- Fix name tool on dead units
2015-08-05 21:11:39 +01:00
SilentSpike
42b5abae11 Add support for respawn counter to spectator UI
Rather than hiding the BI respawn counter, it should be "integrated" into the UI via code if present.
2015-08-05 20:35:48 +01:00
SilentSpike
5200fd6a02 Add new option to spectator unit filter setting
Adds an option to use playableUnits for scenarios where AI playable units are enabled.
2015-08-05 14:55:02 +01:00
SilentSpike
07e09b60fa Stop spectator camera unit changing on corpses
Previously the camera would be automatically moved away from corpses (when the unit currently being watched dies). This changes it to stay on them until the view is manually switched as users might want to stick around and watch whatever was going on at the time of death.
2015-08-05 14:55:02 +01:00
SilentSpike
1b12d37284 Replace spectator respawn changes with a template
Hacking the BI respawn framework to support a spectator setting was intrusive and limiting. Instead of using a setting, I've opted to introduce a new respawn template that can be used within BI's respawn framework. The benefits of this approach are:
- Compatibility isn't a concern, that responsibility is shifted onto mission designers.
- Mission designers can use the functionality of the BI framework alongside the spectator system (combining templates, using different templates for different sides, etc.).
- If a custom respawn framework is used, then this doesn't change anything. Custom frameworks are still fully supported via the public functions provided.
- Remains simple to set up, just requires a description.ext edit
2015-08-04 23:21:10 +01:00
SilentSpike
7e9500f2ca Enable ace_spectator respawn framework integration
Seamlessly integrates the spectator system with the vanilla respawn framework when the onDeath setting is enabled. This commit makes a lot of changes:
- Edit BI functions used by the vanilla respawn framework to enable support for ace_spectator.
- Set spectator state is now tracked using a GVAR for the local player since using a unit won't be reliable all of the time. However unit is still marked for any filtering purposes.
- Instead of NV being used based on the sun to moon transition state by default, that functionality only takes place in the integrated system so that custom frameworks can do what they want.
- Seagull units are hidden when using framework integration since they're spawned by the engine with respawn type 1 and they just hang around undesirably
2015-08-04 22:03:46 +01:00
SilentSpike
5bfa4e5971 Improve spectator camera vision mode on start
The spectator camera should start in night vision mode if the sun to moon transition state is appropriate
2015-08-03 15:18:09 +01:00
SilentSpike
f5e7185aec Fix spectator camera exiting mechanism
When using ACE_Player the camera would return to the dead body. It makes sense to simply pass the reset unit by reference to the camera exit code.
2015-08-03 13:04:36 +01:00
SilentSpike
98b088f26f Fix pre-spectator position saving
When staging a spectator (physically applying the spectator state) the unit position is saved for potential later restoration. This shouldn't be done multiple times since the function can be called again to reset staged units.
2015-08-03 00:24:36 +01:00
SilentSpike
b87b4ea16a Improve spectator GUI reopening prevention
Using boolean instead of simply checking for the display. Checking for diplay was unreliable since it can be technically closed while theoretically open during the escape menu and such.
2015-08-03 00:22:50 +01:00
SilentSpike
9b764bbba4 Preserve Polish translations from master branch
Since spectator was pushed back to a feature branch from the release branch these translations from a PR were also lost (as the commits were prior to the removal commit) when it was merged after the fact.
2015-08-02 17:27:32 +01:00
SilentSpike
52460182c9 Enable spectator on death system
New spectator on death system should enter spectator mode upon dying and exit upon respawning. Only virtual spectator state is suitable for this system since the body should remain as is.
2015-08-02 16:42:24 +01:00
SilentSpike
63c034e348 Differentiate between staged and set spectators
Existing variable "ace_spectator_isSpectator" split into counterparts "ace_spectator_isSet" and "ace_spectator_isStaged" in order to better manage spectator events
2015-08-02 12:51:42 +01:00
SilentSpike
38e08d513a Clear spectator display variable at preInit
uiNamespace persists between missions and should be reset on mission start
2015-08-02 12:34:35 +01:00
SilentSpike
612aa2d679 Separate spectator physical and virtual states
With the changes planned to allow spectator in the true death state, physical changes aren't applicable in all of the possible usage cases. This separates the physical process into new function ace_spectator_fnc_stageSpectator
2015-08-01 18:10:11 +01:00
SilentSpike
33314f8a9e Adjust spectator camera boom speed
Vertical camera movement (boom) was previously at a constant speed. However this felt too slow at times, half the horizontal (dolly) speed should improve this.
2015-07-31 23:32:25 +01:00
SilentSpike
47d96835c6 Fix arrayIntersect oversight 2015-07-27 18:32:21 +01:00
SilentSpike
e6f016f195 GVAR typo 2015-07-26 13:13:46 +01:00
SilentSpike
e431365586 Spectate on death setting 2015-07-26 13:12:58 +01:00
SilentSpike
ec6a0da01c Adjust camera speed while moving 2015-07-26 12:23:01 +01:00
SilentSpike
b0adf2e2ee Fix 3D icons not rendering 2015-07-26 12:13:05 +01:00
SilentSpike
efbd5189ce Close all dialogs when exiting 2015-07-26 12:05:41 +01:00
SilentSpike
f0f6edb549 Transition camera post-escape menu 2015-07-26 11:28:14 +01:00
SilentSpike
5cfe180d3b Fix camPan normalization 2015-07-26 02:17:09 +01:00
SilentSpike
697997ca8f Escape menu 2015-07-26 02:17:08 +01:00
SilentSpike
878bcf819e Fix map double click event 2015-07-26 00:25:31 +01:00
SilentSpike
21ce877115 Handle unit icons and provide setting 2015-07-25 14:13:37 +01:00
SilentSpike
2f1639822c Fix incorrect variable 2015-07-25 13:24:50 +01:00
SilentSpike
7107514b05 New function to precisely control spectatable sides 2015-07-25 13:24:49 +01:00
SilentSpike
69d1db2872 String updates 2015-07-25 11:41:31 +01:00
SilentSpike
5ac77fa996 Corrected default param value 2015-07-24 22:31:51 +01:00
SilentSpike
c9750919a4 PFHs only as needed 2015-07-24 20:29:43 +01:00
SilentSpike
e2e6091c1f Close dialogs before open 2015-07-24 17:55:33 +01:00
SilentSpike
e4aee1da2c Add categories to help splash 2015-07-24 17:50:33 +01:00
SilentSpike
bafb261c01 Adding icon toggle 2015-07-24 17:37:07 +01:00
SilentSpike
e413cb3d91 Cache unit information 2015-07-24 17:17:00 +01:00
SilentSpike
8ef6364b59 Use localized side strings 2015-07-24 16:40:29 +01:00
SilentSpike
eaeda2667c Map icons 2015-07-24 16:40:28 +01:00
SilentSpike
fa306a0fb8 Further populate help splash 2015-07-24 11:39:41 +01:00
SilentSpike
9b3b5e9750 Prevent repeating key down events 2015-07-24 11:39:40 +01:00
SilentSpike
53a0a9343b Populating help splash 2015-07-22 15:21:36 +01:00
SilentSpike
3d290977e5 Preserve unit name in toolbar 2015-07-22 15:21:33 +01:00