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

Plugin - Add Mumble support #980

Open
wants to merge 133 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
e114b11
Mumble preparation. Base class refactoring
TheMagnetar Apr 28, 2020
db5ff3d
Merge pull request #1 from IDI-Systems/mumble_plugin
TheMagnetar Apr 28, 2020
7353c72
Dump of initial work, very much WIP.
NouberNou May 2, 2020
db8d563
Most of the plugin translated, minus channel stuff
NouberNou May 4, 2020
8a891a6
Compilable version of Mumble plugin
NouberNou May 4, 2020
88874aa
small modifications
TheMagnetar May 4, 2020
c661bc8
Add moving functionality
TheMagnetar May 4, 2020
95dec23
Fix warning
TheMagnetar May 4, 2020
e88ed24
Free memory
TheMagnetar May 4, 2020
f900e68
Channel events. muting is not supported
TheMagnetar May 4, 2020
322a7aa
Fix TS3 build
TheMagnetar May 4, 2020
a7efc30
Code pass
TheMagnetar May 5, 2020
a7fabb4
Mumble test plugin.
NouberNou May 10, 2020
9f082c0
Tweaks and fixes to Mumble plugin.
NouberNou May 10, 2020
64c71fb
Merge branch 'feature/mumble_plugin' of https://github.com/IDI-System…
NouberNou May 11, 2020
b987578
Scale samples correctly, fix inverted logic in speaking status.
NouberNou May 12, 2020
426dc87
Rewrite auto-plugin copy
TheMagnetar May 14, 2020
e23c0d8
Fix paths
TheMagnetar May 14, 2020
55b61e4
Use more c++17
TheMagnetar May 14, 2020
d437636
Renamed classes
TheMagnetar May 15, 2020
edcd4dd
Channel moving
TheMagnetar May 15, 2020
d5e7ad8
Merge pull request #3 from IDI-Systems/feature/plugin_copy
TheMagnetar May 15, 2020
2e7302f
Arma3 RPC functions adjustments
TheMagnetar May 15, 2020
b87312f
Additional TS strings
TheMagnetar May 16, 2020
4ac2938
Fix RPCs
TheMagnetar May 16, 2020
8205137
Enahnce stability of findChannelByNames function
TheMagnetar May 16, 2020
435cb3f
Merge branch 'feature/mumble_plugin' of https://github.com/IDI-System…
TheMagnetar May 16, 2020
15c783f
Investigate plugins not copying when launching x32 arma
TheMagnetar May 16, 2020
4129885
Change Mumble/TS references to VOIP
TheMagnetar May 18, 2020
a6531c3
Merge pull request #4 from IDI-Systems/fix/arma3_rpcs
TheMagnetar May 18, 2020
8e47b58
Merge remote-tracking branch 'forked-repo/master' into feature/mumble…
NouberNou May 19, 2020
802c3c5
For the sake of ease when building both plugins archs manually.
NouberNou May 19, 2020
71895c9
Adapt release build tool for Mumble plugin and new plugin build paths
jonpas May 20, 2020
f89ba63
v2.7.3.1025
jonpas May 20, 2020
c313866
Place Mumble PDB next to other symbols (no name clash)
jonpas May 20, 2020
784c684
Remove folder I didn't need.
NouberNou May 21, 2020
f47eef7
Fix duplicate paths in mumble. Fix Try Again
TheMagnetar May 23, 2020
ac41693
Delete all locations instead of only the first match
TheMagnetar May 23, 2020
ae51ac5
Overhaul options system for auto-plugin copy
TheMagnetar May 24, 2020
97480d0
Do not use deprecated functions to convert wide char string to utf-8 …
TheMagnetar May 28, 2020
3ad9960
Parallel check of the plugins
TheMagnetar Jun 3, 2020
b859418
Mumble registry finding
TheMagnetar Jun 3, 2020
c49b4b0
Fix empty mumble path. Fix duplicate entries
TheMagnetar Jun 3, 2020
dfa68bf
Merge pull request #5 from IDI-Systems/tools/make_mumble
jonpas Jun 7, 2020
d098555
Merge pull request #6 from IDI-Systems/tools/mumble_symbols_folder
jonpas Jun 7, 2020
9b85339
Pass on ACRE2Steam
TheMagnetar Jun 9, 2020
88c397a
Code cleanup. Static functions. Nothrow
TheMagnetar Jun 9, 2020
0eca5f8
Fix possible overflow
TheMagnetar Jun 9, 2020
7512de6
Use constexpr
TheMagnetar Jun 9, 2020
b07fc74
Futher improvements. Code clarity
TheMagnetar Jun 9, 2020
ff3d45f
Fix missing variable
TheMagnetar Jun 9, 2020
81a4fb0
Compile fixes
TheMagnetar Jun 9, 2020
90eedf0
Minor formatting
TheMagnetar Jun 10, 2020
09c88bb
Forgotten string
TheMagnetar Jun 10, 2020
a7f6e06
Mix multichannel user audio to mono and expand back after processing.
NouberNou Jun 15, 2020
093ca21
Merge remote-tracking branch 'upstream/master' into sync/acre2
jonpas Jun 15, 2020
588a563
Cleanup ACRE2Steam parameters parsing
jonpas Jun 15, 2020
4bd4d7b
Merge pull request #7 from IDI-Systems/sync/acre2
jonpas Jun 15, 2020
2800b1e
v2.7.4.1028
jonpas Jun 15, 2020
9509684
Force channel count being 1 into ACRE sound engine.
NouberNou Jun 15, 2020
f55914f
Comment
NouberNou Jun 15, 2020
77c5cf9
v2.7.4.1029
jonpas Jun 15, 2020
df44576
Fix string duplication when retrying
TheMagnetar Jun 22, 2020
fc7d601
Merge pull request #2 from IDI-Systems/feature/mumble_plugin
jonpas Jun 27, 2020
3208d4a
Really add fix for deduplication
TheMagnetar Jun 28, 2020
5c84c31
Update to latest API changes
TheMagnetar Jun 28, 2020
40a0881
Do not format mumble plugins
TheMagnetar Jun 28, 2020
17ff04a
Adjust to new API
TheMagnetar Jun 28, 2020
0f2bfd2
Remove MumbleTest plugin and rename generalised file
jonpas Jul 13, 2020
0ec16c7
Fix function example
jonpas Jul 13, 2020
bbf60d1
Merge branch 'master' into cleanup-mumble-plugin
jonpas Jul 13, 2020
f9cc7d7
Revert "Adjust to new API"
jonpas Jul 14, 2020
301659d
Revert "Do not format mumble plugins"
jonpas Jul 14, 2020
a4d3f34
Revert "Update to latest API changes"
jonpas Jul 14, 2020
79c8338
Add missing zeus functionality
TheMagnetar Jul 15, 2020
3ce84d4
LOG to TRACE
TheMagnetar Jul 15, 2020
69c1779
Merge branch 'cleanup-mumble-plugin' into mumble-plugin
jonpas Jul 16, 2020
f3975b8
v2.7.4.1031
jonpas Jul 16, 2020
e048fdc
Cleanup
TheMagnetar Jul 16, 2020
a023131
Temporarily disable Zeus PTT functionality (workaround 'stuck PTT' bug)
jonpas Aug 3, 2020
53de40d
Merge branch 'master' into mumble-plugin
jonpas Aug 4, 2020
98e6e0a
Fix stuck PTT bug properly (new speaking type 'god')
jonpas Aug 4, 2020
2f5d53c
v2.7.4.1033
jonpas Aug 4, 2020
157e3ff
Fix Zeus speaking using wrong speaking type
jonpas Aug 5, 2020
7a4bfc2
Merge branch 'master' into mumble-plugin
jonpas Aug 13, 2020
2512ad6
Newer ts3id to voipId
jonpas Aug 13, 2020
5cd75f5
Bring Mumble plugin up-to-date
jonpas Aug 13, 2020
6ef852d
Merge branch 'master' into mumble-plugin
jonpas Aug 13, 2020
3dd18aa
Merge branch 'master' into mumble-plugin
jonpas Aug 17, 2020
f5ad9b1
v2.7.4.1035
jonpas Aug 17, 2020
733fa12
Merge branch 'master' into mumble-plugin
jonpas Sep 1, 2020
a861444
Merge branch 'master' into mumble-plugin
jonpas Sep 9, 2020
5b34458
Merge branch 'master' into mumble-plugin
jonpas Sep 10, 2020
a0572a4
Merge branch 'master' into mumble-plugin
jonpas Sep 17, 2020
29f9684
WIP: Update to latest Mumble API spec
Krzmbrzl May 23, 2021
2e54145
Actually make it compile
Krzmbrzl May 27, 2021
0c0df7f
Query active connection at plugin init
Krzmbrzl May 27, 2021
408ea60
Use new API headers with prefixed names
Krzmbrzl Jun 9, 2021
1cfde54
Init ACRE in init function instead of in registerAPI function
Krzmbrzl Jun 9, 2021
e7bdea3
Implemented missing mandatory function
Krzmbrzl Jun 9, 2021
ff89535
Use correct variable name in TRACE statement
Krzmbrzl Jun 12, 2021
169ae75
Make event processing async by introducing event queue
Krzmbrzl Jul 4, 2021
b72aca6
Fix deadlock in plugin
Krzmbrzl Nov 7, 2021
698b500
Fix crash due to double-join
Krzmbrzl Dec 18, 2021
1fcf1d8
Removed unneeded todo notes
Krzmbrzl Dec 19, 2021
d38608e
Added some status logs for start/stop
Krzmbrzl Dec 19, 2021
513d54d
Fix API call for freeing memory
Krzmbrzl Dec 19, 2021
376829c
Fix deadlock caused by not releasing lock on early return
Krzmbrzl Dec 19, 2021
b71299a
Improved error logging
Krzmbrzl Dec 19, 2021
63f0e6e
Update to latest API headers
Krzmbrzl Dec 19, 2021
c61270b
Add additional error log
Krzmbrzl Dec 19, 2021
11c67b9
Explicitly start event loop on plugin init
Krzmbrzl Dec 19, 2021
f4b3f87
Fix potential endless wait on end of plugin event queue
Krzmbrzl Dec 19, 2021
4e54964
Added missing static plugin info functions
Krzmbrzl Dec 19, 2021
1bf13fd
Use proper macros for author & description
Krzmbrzl Dec 20, 2021
3e7743c
Fix indentation
jonpas Dec 21, 2021
9c8e9da
Merge pull request #1108 from Krzmbrzl/mumble-plugin
jonpas Dec 21, 2021
0c816a7
Merge branch 'master' into mumble-plugin
jonpas Dec 21, 2021
495e1d1
Add docs for event loop
Krzmbrzl Dec 23, 2021
b16676a
Merge pull request #1177 from Krzmbrzl/mumble-plugin
jonpas Jan 1, 2022
d6cb2d5
Update extensions/src/ACRE2Steam/CallExt_DllMain.cpp
jonpas Apr 19, 2022
128f7de
Merge branch 'master' into mumble-plugin
jonpas Apr 19, 2022
29e80d6
Build Mumble plugin in CI
jonpas Apr 19, 2022
3cbcd5b
Update documentation for Mumble
jonpas Apr 20, 2022
9e76d3f
Update Mumble plugin auto-copy
jonpas Apr 20, 2022
ff2be64
Print Plugin version to Mumble log
jonpas Apr 20, 2022
ecfa039
Merge branch 'master' into mumble-plugin
jonpas Apr 20, 2022
b87c913
Merge branch 'master' into mumble-plugin
jonpas Apr 20, 2022
421b7a7
v2.9.1.1049 - Mumble
jonpas Apr 20, 2022
f4edbe8
Merge branch 'master' into mumble-plugin
jonpas Apr 21, 2022
3a6eacc
Cleanup some extension code
jonpas Apr 21, 2022
064aedc
Merge branch 'master' into mumble-plugin
jonpas May 25, 2022
bd90476
v2.10.0.1051 - Mumble
jonpas May 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ jobs:
run: |
cd extensions\\vcproj
cmake .. -A Win32
msbuild ACRE.sln /m '/t:ACRE2Arma\acre;ACRE2Arma\arma2ts;ACRE2\ACRE2Steam;ACRE2\ACRE2TS;Extras\Wav2B64' /p:Configuration=RelWithDebInfo
msbuild ACRE.sln /m '/t:ACRE2Arma\acre;ACRE2Arma\arma2ts;ACRE2\ACRE2Mumble;ACRE2\ACRE2Steam;ACRE2\ACRE2TS;Extras\Wav2B64' /p:Configuration=RelWithDebInfo
- name: Build Extensions (x64)
if: matrix.arch == 'x64'
run: |
cd extensions\\vcproj64
cmake .. -A x64
msbuild ACRE.sln /m '/t:ACRE2Arma\acre;ACRE2Arma\arma2ts;ACRE2\ACRE2Steam;ACRE2\ACRE2TS' /p:Configuration=RelWithDebInfo
msbuild ACRE.sln /m '/t:ACRE2Arma\acre;ACRE2Arma\arma2ts;ACRE2\ACRE2Mumble;ACRE2\ACRE2Steam;ACRE2\ACRE2TS' /p:Configuration=RelWithDebInfo
- name: Sign (BattlEye)
run: |
.\ci\battleye\signtool.exe sign /f .\ci\battleye\idi-systems.pfx /p ${{ secrets.BE_CRED_PASSWORD }} /t http://timestamp.digicert.com *.dll
Expand Down
2 changes: 1 addition & 1 deletion addons/main/script_macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ SQF equivalent of extensions/src/ACRE2Shared/Types.h
#define SCRATCH_GET(radioId, key) ([radioId, key] call EFUNC(sys_data,getScratchData))
#define SCRATCH_GET_DEF(radioId, key, defaultVal) ([radioId, key, defaultVal] call EFUNC(sys_data,getScratchData))

#define GET_TS3ID(object) (object call { private _ret = (_this getVariable [QGVAR(ts3id), -1]); if (_ret == -1) then { WARNING_1("%1 has no TS3 ID",_this); }; _ret })
#define GET_VOIPID(object) (object call { private _ret = (_this getVariable [QGVAR(voipId), -1]); if (_ret == -1) then { WARNING_1("%1 has no VOIP ID",_this); }; _ret })

#define IS_HASH(hash) (hash isEqualType locationNull && {(type hash) isEqualTo "ACRE_FastHashNamespaceDummy"})

Expand Down
2 changes: 1 addition & 1 deletion addons/main/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MAJOR 2
#define MINOR 10
#define PATCHLVL 0
#define BUILD 1050
#define BUILD 1051
4 changes: 2 additions & 2 deletions addons/sys_core/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

if (!hasInterface) exitWith {};

// Ensure the TeamSpeak plugin handler code is initialized first
// Ensure the VOIP plugin handler code is initialized first
[] call EFUNC(sys_io,startServer);

["handleGetClientID", FUNC(handleGetClientID)] call EFUNC(sys_rpc,addProcedure);
Expand Down Expand Up @@ -145,7 +145,7 @@ if (getClientStateNumber < 10) then { // Check before game has started (in brief
["setSoundSystemMasterOverride", [0]] call EFUNC(sys_rpc,callRemoteProcedure);
[_this select 1] call CBA_fnc_removePerFrameHandler;
} else {
// Keep calling incase ACRE is not connected to TeamSpeak
// Keep calling incase ACRE is not connected to VOIP solution
["setSoundSystemMasterOverride", [1]] call EFUNC(sys_rpc,callRemoteProcedure);
};
}, 0, []] call CBA_fnc_addPerFrameHandler;
Expand Down
4 changes: 2 additions & 2 deletions addons/sys_core/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ DGVAR(lowered) = false;
DGVAR(muting) = [];
DGVAR(speakers) = [];
DGVAR(enableDistanceMuting) = true;
DGVAR(ts3id) = -1;
DGVAR(voipId) = -1;
DGVAR(keyedMicRadios) = [];
DGVAR(keyedRadioIds) = HASH_CREATE;
DGVAR(globalVolume) = 1.0;
DGVAR(maxVolume) = 1.0;
DGVAR(playerList) = []; // Paired array: [TS_ID, Object]
//DGVAR(ts3IdPlayerList) = [];
//DGVAR(voipIdPlayerList) = [];
DGVAR(isDeaf) = false;
//DGVAR(playerListHash) = HASH_CREATE;
DGVAR(spectatorSpeakers) = [];
Expand Down
4 changes: 2 additions & 2 deletions addons/sys_core/fnc_coreInitPFH.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
if (isNull player) exitWith {};
acre_player = player;

if (!ACRE_MAP_LOADED || {!ACRE_DATA_SYNCED} || {GVAR(ts3id) == -1}) exitWith {};
if (!ACRE_MAP_LOADED || {!ACRE_DATA_SYNCED} || {GVAR(voipId) == -1}) exitWith {};

TRACE_1("GOT TS3 ID", GVAR(ts3id));
TRACE_1("GOT VOIP ID", GVAR(voipId));

[] call FUNC(utilityFunction); // OK
[] call FUNC(muting);
Expand Down
2 changes: 1 addition & 1 deletion addons/sys_core/fnc_cycleLanguage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ if (_numSpokenLanguages > 1) then {
["acre_cycleLanguage", _languageName, "Now speaking", "", 1, EGVAR(sys_list,LanguageColor)] call EFUNC(sys_list,displayHint);
[] call FUNC(updateSelf);
if (ACRE_LOCAL_SPEAKING) then {
//@TODO: This is an uber hack, should probably be set up as a TS event.
//@TODO: This is an uber hack, should probably be set up as a Mumble/TS event.
//Basically we update globally a locally set object variable from the
//start speaking event when they cycle languages while talking.
acre_player setVariable [QGVAR(languageId), _languageId, true];
Expand Down
4 changes: 2 additions & 2 deletions addons/sys_core/fnc_getAlive.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ if (_unit isEqualTo acre_player) then {
};
} else {
if (!isNull _unit) then {
private _ts3id = GET_TS3ID(_unit);
if ((alive _unit && {!(_ts3id in ACRE_SPECTATORS_LIST)}) || {(ACRE_IS_SPECTATOR && {!ACRE_MUTE_SPECTATORS} && {_ts3id in ACRE_SPECTATORS_LIST})}) then {
private _voipId = GET_VOIPID(_unit);
if ((alive _unit && {!(_voipId in ACRE_SPECTATORS_LIST)}) || {(ACRE_IS_SPECTATOR && {!ACRE_MUTE_SPECTATORS} && {_voipId in ACRE_SPECTATORS_LIST})}) then {
_ret = 1;
};
};
Expand Down
2 changes: 1 addition & 1 deletion addons/sys_core/fnc_getClientIdLoop.sqf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "script_component.hpp"
/*
* Author: ACRE2Team
* This function exists to setup the process for sending our object and player ID to other clients to associate with our TeamSpeak ID.
* This function exists to setup the process for sending our object and player ID to other clients to associate with our VOIP ID.
*
* Arguments:
* None
Expand Down
34 changes: 17 additions & 17 deletions addons/sys_core/fnc_handleGetClientID.sqf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#include "script_component.hpp"
/*
* Author: ACRE2Team
* Handles receipt of TS client ID alongside its objects network ID.
* Handles receipt of Mumble/TS client ID alongside its objects network ID.
*
* Arguments:
* 0: TS client ID <STRING>
* 1: Net ID of object for TS client ID <STRING>
* 0: Mumble/TS client ID <STRING>
* 1: Net ID of object for Mumble/TS client ID <STRING>
*
* Return Value:
* Handled <BOOL>
Expand All @@ -16,48 +16,48 @@
* Public: No
*/

params ["_newTs3Id","_netId"];
params ["_newVoipId", "_netId"];

_newTs3Id = parseNumber _newTs3Id;
_newVoipId = parseNumber _newVoipId;

private _playerObject = objectFromNetId _netId;
TRACE_1("got client ID", _this);
if (_playerObject == acre_player) then {
private _resendSpectator = false;
if (_newTs3Id != GVAR(ts3id)) then {
if (_newVoipId != GVAR(voipId)) then {
if (ACRE_IS_SPECTATOR) then {
[] call FUNC(spectatorOff);
_resendSpectator = true;
};
};
GVAR(ts3id) = _newTs3Id;
GVAR(voipId) = _newVoipId;
if (_resendSpectator) then {
[] call FUNC(spectatorOn)
};
TRACE_1("SETTING TS3ID",GVAR(ts3id));
TRACE_1("SETTING VOIPID",GVAR(voipId));
} else {
_playerObject setVariable [QGVAR(ts3id), _newTs3Id, false];
_playerObject setVariable [QGVAR(voipId), _newVoipId, false];
};

//Ensure the incoming TS ID is pointing to the correct unit.
// Ensure the incoming Mumble/TS ID is pointing to the correct unit.
private _found = false;
{
_x params ["_remoteTs3Id","_remoteUser"];
if (_remoteTs3Id == _newTs3Id) exitWith {
_x params ["_remoteVoipId", "_remoteUser"];
if (_remoteVoipId == _newVoipId) exitWith {
_found = true;
if (_playerObject != _remoteUser) then {
GVAR(playerList) set [_forEachIndex, [_newTs3Id, _playerObject]];
GVAR(playerList) set [_forEachIndex, [_newVoipId, _playerObject]];
//If changed remove.
REM(GVAR(speakers),_remoteUser);
REM(GVAR(spectatorSpeakers),_remoteTs3Id);
REM(GVAR(godSpeakers),_remoteTs3Id);
REM(GVAR(spectatorSpeakers),_remoteVoipId);
REM(GVAR(godSpeakers),_remoteVoipId);
REM(GVAR(keyedMicRadios),_remoteUser);
};
// Case where objects dont match but we found our TS ID.
// Case where objects dont match but we found our Mumble/TS ID.
};
} forEach (GVAR(playerList));
if (!_found) then {
GVAR(playerList) pushBack [_newTs3Id,_playerObject];
GVAR(playerList) pushBack [_newVoipId,_playerObject];
};

true
2 changes: 1 addition & 1 deletion addons/sys_core/fnc_handleGetHeadVector.sqf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "script_component.hpp"
/*
* Author: ACRE2Team
* Sends the current head direction vector to the TeamSpeak plugin.
* Sends the current head direction vector to the VOIP plugin.
*
* Arguments:
* None
Expand Down
6 changes: 3 additions & 3 deletions addons/sys_core/fnc_handleGetPluginVersion.sqf
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#include "script_component.hpp"
/*
* Author: ACRE2Team
* Handles the return of the current plugin version from TeamSpeak. Displays messages to the player if any of the versions do not match.
* Handles the return of the current plugin version from VOIP. Displays messages to the player if any of the versions do not match.
*
* Arguments:
* 0: TeamSpeak plugin version <STRING>
* 0: VOIP plugin version <STRING>
*
* Return Value:
* Handled <BOOL>
Expand Down Expand Up @@ -35,7 +35,7 @@ if (!ACRE_SPIT_VERSION && {!isNil "ACRE_FULL_SERVER_VERSION"}) then {

if (_warn) then {
ACRE_HAS_WARNED = true;
ERROR_WITH_TITLE_3("Mismatched TeamSpeak plugin or mod versions!","\nTeamSpeak plugin version: %1\nYour version: %2\nServer version: %3",GVAR(pluginVersion),QUOTE(VERSION_STR),ACRE_FULL_SERVER_VERSION);
ERROR_WITH_TITLE_3("Mismatched VOIP plugin or mod versions!","\nVOIP plugin version: %1\nYour version: %2\nServer version: %3",GVAR(pluginVersion),QUOTE(VERSION_STR),ACRE_FULL_SERVER_VERSION);
} else {
if (ACRE_HAS_WARNED) then {
ACRE_HAS_WARNED = false;
Expand Down
2 changes: 1 addition & 1 deletion addons/sys_core/fnc_isMuted.sqf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "script_component.hpp"
/*
* Author: ACRE2Team
* This function determines is used to check if the unit should be muted on TeamSpeak or not.
* This function determines is used to check if the unit should be muted on VOIP or not.
*
* Arguments:
* 0: unit <OBJECT>
Expand Down
2 changes: 1 addition & 1 deletion addons/sys_core/fnc_localStartSpeaking.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if (!GVAR(fullDuplex) && {ACRE_BROADCASTING_RADIOID != ""}) then {
private _unit = _x select 0;
if (!isNull _unit && {_unit != acre_player}) then {
private _canUnderstand = [_unit] call FUNC(canUnderstand);
["updateSpeakingData", ["r", GET_TS3ID(_unit), !_canUnderstand, 1, 0, 1, 0, false, [0, 0, 0]]] call EFUNC(sys_rpc,callRemoteProcedure);
["updateSpeakingData", ["r", GET_VOIPID(_unit), !_canUnderstand, 1, 0, 1, 0, false, [0, 0, 0]]] call EFUNC(sys_rpc,callRemoteProcedure);
};
} forEach (_sources select _forEachIndex);
};
Expand Down
2 changes: 1 addition & 1 deletion addons/sys_core/fnc_localStopSpeaking.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ if (isNil "ACRE_CustomVolumeControl") then {
EGVAR(sys_gui,volumeLevel) call EFUNC(sys_gui,setVoiceCurveLevel);
};

//[str GVAR(ts3id), netId acre_player] call FUNC(remoteStopSpeaking);
//[str GVAR(voipId), netId acre_player] call FUNC(remoteStopSpeaking);

true
23 changes: 12 additions & 11 deletions addons/sys_core/fnc_muting.sqf
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#include "script_component.hpp"
/*
* Author: ACRE2Team
* Sets up the per frame event handler to mute and unmute clients on TeamSpeak. The muting occurs to optimize TeamSpeak bandwidth as voice data is not sent for muted clients.
* Sets up the per frame event handler to mute and unmute clients on ^VOIP. The muting occurs to optimize VOIP
* bandwidth as voice data is not sent for muted clients.
*
* Arguments:
* None
Expand Down Expand Up @@ -39,15 +40,15 @@ DFUNC(mutingPFHLoop) = {
_dynamicPos = positionCameraToWorld [0, 0, 0];
};
{
_x params ["_remoteTs3Id","_remoteUser"];
_x params ["_remoteVoipId", "_remoteUser"];
if (_remoteUser != acre_player) then {
private _muted = 0;
//private _remoteTs3Id = (_remoteUser getVariable QGVAR(ts3id));
//if (!(isNil "_remoteTs3Id")) then {
if !(_remoteTs3Id in ACRE_SPECTATORS_LIST) then {
//private _remoteVoipId = (_remoteUser getVariable QGVAR(voipId));
//if (!(isNil "_remoteVoipId")) then {
if !(_remoteVoipId in ACRE_SPECTATORS_LIST) then {
private _isRemotePlayerAlive = [_remoteUser] call FUNC(getAlive);
if (_isRemotePlayerAlive == 1) then {
//_playerIdList pushBack _remoteTs3Id;
//_playerIdList pushBack _remoteVoipId;

// private _radioListRemote = [_remoteUser] call EFUNC(sys_data,getRemoteRadioList);
// private _radioListLocal = [] call EFUNC(sys_data,getPlayerRadioList);
Expand All @@ -61,10 +62,10 @@ DFUNC(mutingPFHLoop) = {
};

if (GVAR(fullListTime)) then {
_mutingParams = _mutingParams + format ["%1,%2,", _remoteTs3Id, _muted];
_mutingParams = _mutingParams + format ["%1,%2,", _remoteVoipId, _muted];
} else {
if ((_muted == 0 && {_remoteUser in GVAR(muting)}) || {(_muted == 1 && {!(_remoteUser in GVAR(muting))})}) then {
_mutingParams = _mutingParams + format ["%1,%2,", _remoteTs3Id, _muted];
_mutingParams = _mutingParams + format ["%1,%2,", _remoteVoipId, _muted];
};
};
};
Expand All @@ -82,7 +83,7 @@ DFUNC(mutingPFHLoop) = {
};
if (_newSpectators isNotEqualTo []) then {
{
if (_x != GVAR(ts3id)) then {
if (_x != GVAR(voipId)) then {
_mutingParams = _mutingParams + format ["%1,1,", _x];
};
} forEach _newSpectators;
Expand All @@ -94,7 +95,7 @@ DFUNC(mutingPFHLoop) = {
if ((str ACRE_IS_SPECTATOR) != (str GVAR(lastSpectate))) then {
if (ACRE_IS_SPECTATOR) then {
{
if (_x != GVAR(ts3id)) then {
if (_x != GVAR(voipId)) then {
_mutingParams = _mutingParams + format ["%1,0,", _x];
};
} forEach ACRE_SPECTATORS_LIST;
Expand All @@ -105,7 +106,7 @@ DFUNC(mutingPFHLoop) = {

if (ACRE_IS_SPECTATOR && {GVAR(fullListTime)}) then {
{
if (_x != GVAR(ts3id)) then {
if (_x != GVAR(voipId)) then {
_mutingParams = _mutingParams + format ["%1,0,", _x];
};
} forEach ACRE_SPECTATORS_LIST;
Expand Down
3 changes: 2 additions & 1 deletion addons/sys_core/fnc_pong.sqf
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#include "script_component.hpp"
/*
* Author: ACRE2Team
* Handler for recieving pong messages from the TeamSpeak plugin. This is called periodically as it provides a simple check to make sure TeamSpeak isis still connected to the game.
* Handler for recieving pong messages from the VOIP plugin. This is called periodically as it provides a
* simple check to make sure VOIP is still connected to the game.
*
* Arguments:
* None
Expand Down
6 changes: 3 additions & 3 deletions addons/sys_core/fnc_processDirectSpeaker.sqf
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#include "script_component.hpp"
/*
* Author: ACRE2Team
* Calculates the information required by TeamSpeak for a direct speech speaker.
* Calculates the information required by VOIP for a direct speech speaker.
*
* Arguments:
* 0: Unit <OBJECT>
*
* Return Value:
* Parameters to send to TeamSpeak <ARRAY>
* Parameters to send to VOIP <ARRAY>
*
* Example:
* [unit] call acre_sys_core_fnc_processDirectSpeaker
Expand All @@ -18,7 +18,7 @@
private ["_emitterPos", "_emitterDir"];
params ["_unit"];

private _id = GET_TS3ID(_unit);
private _id = GET_VOIPID(_unit);

private _bothSpectating = false;
private _isIntercomAttenuate = false;
Expand Down
4 changes: 2 additions & 2 deletions addons/sys_core/fnc_processRadioSpeaker.sqf
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#include "script_component.hpp"
/*
* Author: ACRE2Team
* Calculates the information required by TeamSpeak for a radio speaker.
* Calculates the information required by VOIP for a radio speaker.
*
* Arguments:
* 0: Unit to process <OBJECT>
* 1: List of radio classnames <ARRAY>
*
* Return Value:
* Parameters to send to TeamSpeak <ARRAY>
* Parameters to send to VOIP <ARRAY>
*
* Example:
* [unit,["ACRE_PRC343_ID_1"]] call acre_sys_core_fnc_processRadioSpeaker
Expand Down
Loading