-
-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow CA & EAM to intercom (with channels), but not across Coalition #724
Closed
TaeruAlethea
wants to merge
14
commits into
ciribob:master
from
TaeruAlethea:Allow-CA-&-EAM-to-Intercom-(with-channels)
Closed
Allow CA & EAM to intercom (with channels), but not across Coalition #724
TaeruAlethea
wants to merge
14
commits into
ciribob:master
from
TaeruAlethea:Allow-CA-&-EAM-to-Intercom-(with-channels)
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unit ID is not deterministic based on Unit ID's. If testing finds that this ignores Coalition, Add it here.
This means spectators are locked to a single intercom channel, but its not a big minus, because Combined Arms Slots gain that capability.
Fix for CA controlled vehicles not keeping the full set of 10 awacs radios.
adjusted checks so that Combined Arms slots retain their Full panel of radios when controlling a vehicle. |
I've been thinking about it and want to break this up into 2 or 3 parts. I've also learned some new things since writing it originally. |
Step 1: #742 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding some more context.
Currently:
island A
. Intercom channels work on this island.island B
.island B
. Intercom channels DO NOT WORK.Note: Gamemaster/observer are, functionally, the same as Commander/JTAC. The difference is that Commander/JTAC have coalition vision and fog of war behavior like the jets do.
What does this PR do:
This PR makes the SRS-Client aware of what actual slot the player is in. It then sets a deterministic UnitID, with offsets for different things, to group special slot cases together.
Preparatory Changes
Slot Awareness is achieved using the changes in SRSGameGUI.lua. The
get_player_info
call was already being done there and contains the rich data needed to determine more complex slot types. The exact parsing uses code currently deployed by SpecialK's Bot for the same purpose.The export lua,
DCS-SimpleRadioStandalone.lua
, notes the Slot using the existing mechanism used for determining Seats in multi-crew vehicles. It then uses the additional context to parse valid Unit Data, along with verifying if we are in a Special Slot case. The Default option has been amended to beingSpectator
.DCSPlayerSideInfo.cs
- defined the new data available from theSRS-GameGUI.lua
DCSPlayerRadioInfo.cs
- Defaults and UnitID Offsets are defined so that they can be referenced else where.Primary Change
The major functionality change is in the
SR-Client
itself. inDCSRadioSyncHandler.cs
, a switch case is used to customize what each of the Special Slot cases and default case should do.A Special Slot UnitID is built from various offsets, allowing for trimming/tweaking later. The
message.unit
is then parsed. If it matches any of the known special cases, including EAM's existing definition and the Init case?
, the Special Slot UnitID is assigned. The Default case passes the Unit and UnitID provided be the Export Lua with out modification.Due to some quirks with how Artillery Commander and Ground unit slots work, the old UnitID based 'slot change' detection no longer works. A new Switch case is added to only update the aircraft/vehicle definition when a Slot change is detected.
Integration changes
DCSRadioSyncManager.cs
- EAM definition amended to match how Aircraft/Export slots will look now.AwacsIntercomControlGroup.xaml.cs
- UnitID references now point at the CombinedArms variant.Original Post:
Similar to #720 but this should be more coherent and less scattered. It centralizes all of the case switching in the Sync Handler.
The following cases were tested between two clients with these changes on an existing server.
Cases to test:
1: ✅ Blue EAM <-> Spectator, Exp: No Comms
2: ✅ Blue EAM <-> Blue Controller, Exp: Working Comms
3: ✅ Blue EAM, Intercom Ch1 <-> Blue Controller, Intercom Ch2, Exp: No Comms
4: ✅ Blue EAM, Intercom Ch2 <-> Blue Controller, Intercom Ch1, Exp: No Comms
5: ✅ Blue EAM <-> Red Controller, Exp: No Comms
5.5 ✅Blue EAM <-> Red EAM, Exp: No Comms.