Commit Graph

41 Commits

Author SHA1 Message Date
jonpas
26fbc36cab Merge branch 'master' into cbaEventSystem 2016-05-31 22:36:08 +02:00
SilentSpike
c4b75160a4 Run event renaming script 2016-05-24 14:13:11 +01:00
SilentSpike
108ff4f644 Replace ACE event system calls with CBA counterparts
Regex used:

\[(.+?),(.+?),(.+?)\]\s+call\s+E?FUNC\((common,)?(target|object)Event\)
[$1,$3,$2] call CBA_fnc_targetEvent

E?FUNC\((common,)?(server|global|local)Event\)
CBA_fnc_$2Event

E?FUNC\((common,)?(add|remove)EventHandler\)
CBA_fnc_$2EventHandler
2016-05-22 16:47:39 +01:00
jonpas
e7dbcd7b58 Replace delayed execution functions with new CBA counterparts 2016-05-22 15:29:01 +02:00
commy2
4a8e727ba5 end spectator by global mission end event from server (#3659)
* end spectator by global mission end event from server

* add ;
2016-05-07 22:17:21 +02:00
SilentSpike
dbcf94153d Merge pull request #3155 from acemod/spectatorFix
Fix some spectator errors
2016-01-15 15:43:45 +00:00
SilentSpike
49c814ccb3 Merge branch 'master' into spectatorUpdates 2016-01-13 19:19:00 +00:00
SilentSpike
d870a1f448 Fix nil spectator Draw3D event handler index
Minor oversight introduced in pabst's fix for #2989, the icon handler is a mission event handler that isn't self terminating so the index needs to be preserved until after it is removed via `removeMissionEventHandler`. It is safe to let the `onUnload` event take care of that (and preferable so that icons disappear while temporarily closed).
2016-01-13 19:03:24 +00:00
SilentSpike
65e981373b Store spectator display in a uiNamespace variable
This allows me to explicitly close the right display and hopefully fix the interface staying open upon mission end.

@Commy2's theory is that perhaps the main display `46` is killed upon mission end, meaning that `findDisplay` can't find the spectator display to close it because the game thinks it doesn't exist.
2016-01-13 18:38:51 +00:00
PabstMirror
79a7bb54aa Kill Spectator PFEH when exiting spectator
Should fix #2989
There is a race condition between these 4 PFEH and the "onUnload" event
in handleInterface.
If the PFEHs run first they will use nil variables and throw a script
error.
This sets them to nil immediately when exiting spectator
2016-01-01 00:14:48 -06:00
commy2
34d351c652 fix exitWith capitalization 2015-11-30 17:14:05 +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
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
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
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
jokoho48
b7e02da1cc remove if (!hasInterface) from PFH
move ! in ()
2015-09-11 16:58:26 +02: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
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
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
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
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
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
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
e431365586 Spectate on death setting 2015-07-26 13:12:58 +01:00
SilentSpike
7091ac21e9 Function cleanup 2015-07-18 18:53:30 +01:00
SilentSpike
359b81f2ef Spectator position fix 2015-07-18 13:04:23 +01:00
SilentSpike
81f87ee13c params for public functions 2015-07-17 02:05:24 +01:00
SilentSpike
90b6fd3d8b Initalize interface 2015-07-15 12:09:28 +01:00
SilentSpike
d7cc309591 setSpectator correct group handling, disable user input 2015-07-15 11:48:49 +01:00
SilentSpike
1e13758ad8 Better group handling, more functional function 2015-07-09 21:20:09 +01:00
SilentSpike
877d4e7cd9 Using common defines, further cleanup 2015-07-09 17:53:22 +01:00
SilentSpike
98e9245ed9 Basic respawning support 2015-07-05 21:53:09 +01:00
SilentSpike
788c23c940 Allow resetting existing spectators 2015-07-05 21:30:19 +01:00
SilentSpike
950aec38b7 Fixed macro 2015-07-05 01:04:07 +01:00
SilentSpike
01a5ab619e handleKilled and handleRespawn 2015-07-05 00:49:47 +01:00
SilentSpike
5e7c094c98 Cache details on respawn (not at postInit) 2015-07-05 00:09:43 +01:00
SilentSpike
c09314027f "isNotSpectator" canInteractWith condition 2015-07-04 19:41:18 +01:00
SilentSpike
58b1c0f3a9 Solve crashing caused by off map position and disableSimulation to stop underwater issues 2015-07-03 18:44:40 +01:00
SilentSpike
ff4fce3950 Initial enter/exit function implementation 2015-07-03 02:16:23 +01:00