Skip to content
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

Zeus - Fix remote control breaking Racks and resetting custom PTTs #1305

Merged
merged 5 commits into from
Sep 23, 2024

Conversation

mrschick
Copy link
Contributor

@mrschick mrschick commented Nov 29, 2023

When merged this pull request will:

  • Fix Racks being broken for the Zeus Player when remote controlling AI in vehicles, which resolves Zeus - Exiting remote control while the AI character is inside a vehicle breaks racks and intercom #1267:
    It was caused by the sys_rack/fnc_rackPFH.sqf PFH being started when entering that AI and not terminated when exiting it, resulting in the PFH constantly disconnecting the player from his Racks. My fix works by limiting Rack initialization and PFH launch to only player units entering a vehicle, effectively preventing use of Racks by RCd AI entirely.
  • Fix custom PTT assignments being reset when using a remote controlled unit's radios:
    A minor bug I encountered some time ago, happened because there was only a single DVAR(ACRE_ASSIGNED_PTT_RADIOS) that stored custom PTT assignments, when controlling a unit and using its radios sys_core/fnc_handleMultiPttKeyPress.sqf would check for the custom PTT radios to be present, not find them on the AI and reset the list. Now there are 2 DVARs to remember custom PTT assignments on the player and last controlled AI unit.

Previously, PTT customization would be reset after using a remote controlled AI's radios.
@jonpas jonpas added the bug fix label Jul 2, 2024
@jonpas jonpas added this to the 2.13.0 milestone Jul 2, 2024
@jonpas jonpas requested a review from Mike-MF July 2, 2024 18:45
Copy link
Collaborator

@Mike-MF Mike-MF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works

Copy link
Member

@jonpas jonpas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How does this work when controlling a UAV, as that is also remote control?

My fix works by limiting Rack initialization and PFH launch to only player units entering a vehicle, effectively preventing use of Racks by RCd AI entirely.

It's more of a workaround but it does prevent an issue, so I am fine with accepting this change, but we should add a note in documentation.

addons/sys_core/XEH_preInit.sqf Outdated Show resolved Hide resolved
@jonpas
Copy link
Member

jonpas commented Jul 3, 2024

@BrettMayson Since you authored all of the Zeus compatibility, mind taking a look at this?

@mrschick
Copy link
Contributor Author

mrschick commented Jul 3, 2024

How does this work when controlling a UAV, as that is also remote control?

I did not think of testing that. Unless it also changes acre_player from player, it should not be affected.
Should get around to testing it next week.

It's more of a workaround but it does prevent an issue, so I am fine with accepting this change, but we should add a note in documentation.

Maybe we can figure out an actual fix. Didn't look too much into it due to not seeing a use case in which a RCd AI should have to use Racks.

@mrschick
Copy link
Contributor Author

mrschick commented Jul 7, 2024

How does this work when controlling a UAV, as that is also remote control?

Turns out addons/sys_rack/fnc_enterVehicle.sqf is not called when controlling a drone, only when entering a vehicle, so I can't find any cases in which it would create issues.
Unless a UAV has Racks, though it doesn't seem that is supported ATM.

@mrschick
Copy link
Contributor Author

mrschick commented Jul 7, 2024

Haven't looked too deep into it, but given the lack of apparent use-cases I don't think implementing Racks being accessible by RCd AI is worth the time.

@jonpas jonpas merged commit e5c1bba into IDI-Systems:master Sep 23, 2024
3 checks passed
@mrschick mrschick deleted the fix/zeus-rc-racks-ppts branch September 23, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zeus - Exiting remote control while the AI character is inside a vehicle breaks racks and intercom
4 participants