task-force-arma-3-radio
task-force-arma-3-radio copied to clipboard
Same SR frequencies per group
When merged this pull request will:
- Implement https://github.com/michail-nikolaev/task-force-arma-3-radio/issues/1468
There is quite big chance of collisions so may be it is necessary to add uniqueness test for first element in array, or instead of TFAR_FREQ_ROUND_POWER
value should be set to 100.
or instead of TFAR_FREQ_ROUND_POWER value should be set to 100
Would be a compatibility breaker.
I don't care much about uniqeness, we already don't care for the "same frequencies per side" feature.
Fixes #1468
I like this and this also works fine. But this only runs on serverInit, which runs once. If any player JIPs and while doing that creates a new group, this won't execute on his group. We'd need some kind of playerJoined/groupCreated eventhandler, to run this then.
Added event. Will it work now?
I don't like the 0 delay PFH, but if there is no better alternative.. Then I guess it has to be.
There is no native BIS EH for group creation. So I think that is only one option. Delay can be increased but then there can be collisions when some groups deleted and some created during delay.
There is no native BIS EH for group creation.
https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers#GroupCreated https://community.bistudio.com/wiki/Arma_3:_Mission_Event_Handlers#GroupDeleted
Do you want to update the PR with it or shall I merge this now and upgrade later?
I will take a look at this week.
Couple questions:
- "GroupCreated" fires for 33 groups even if only 1 exist.
- Old feature "group freqs" from group attributes does not work. Seems like attribute expression called before group is fully populated and values are not broadcasted.
- If "same per group" and "same for side" are selected, what we should take in favor?
- I think there is something in vanilla code that creates bogus groups. But that was fixed recently-ish in a game update.
- Mh maybe we can just execNextFrame
- Closest wins, so group