acemod / ACE3

Open-source realism mod for Arma 3
https://ace3.acemod.org
Other
1k stars 735 forks source link

Markers - Marker UI resets active channel back to group #9382

Closed MildlyInterested closed 1 year ago

MildlyInterested commented 1 year ago

Mods (complete and add to the following information):

Description: A clear and concise description of what the bug is.

Steps to reproduce:

  1. Create custom channel
    //initServer.sqf
    l6AA_AirCommandChannelID = radioChannelCreate [[0.3, 0.3, 0.5, 1], "Air Command", "%UNIT_NAME", [], true];

    and add players to it

    //initPlayerLocal.sqf
    l6AA_AirCommandChannelID radioChannelAdd [player];
    [{setCurrentChannel (l6AA_AirCommandChannelID + 5);},nil,3] call CBA_fnc_waitAndExecute;
  2. Open map, current active channel is Air Command.
  3. Double click on map to create marker, channel gets reverted to Group chat.

Expected behavior: Use currently active channel, do not modify.

Where did the issue occur?

Log Files: Arma3_x64_2023-09-09_21-47-58.rpt.txt

Screenshots: https://imgur.com/VSZr9Te

LinkIsGrim commented 1 year ago

Relevant block: https://github.com/acemod/ACE3/blob/master/addons/markers/functions/fnc_initInsertMarker.sqf#L207

LinkIsGrim commented 1 year ago

Can fix it by utilizing https://community.bistudio.com/wiki/radioChannelInfo and https://community.bistudio.com/wiki/channelEnabled in fnc_getEnabledChannels