acre2 icon indicating copy to clipboard operation
acre2 copied to clipboard

Zeus - Fix remote control breaking Racks and resetting custom PTTs

Open mrschick opened this issue 2 years ago • 2 comments

When merged this pull request will:

  • Fix Racks being broken for the Zeus Player when remote controlling AI in vehicles, which resolves #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.

mrschick avatar Nov 29 '23 19:11 mrschick

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

jonpas avatar Jul 03 '24 13:07 jonpas

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 avatar Jul 03 '24 14:07 mrschick

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 avatar Jul 07 '24 15:07 mrschick

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.

mrschick avatar Jul 07 '24 15:07 mrschick