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

Attempted fix for Error: No Object #205

Merged
merged 3 commits into from
Oct 16, 2021
Merged
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions addons/main/stringtable.xml
Original file line number Diff line number Diff line change
@@ -1360,6 +1360,14 @@
<Japanese>並び替えを同期させるにはサーバー側で DUI を動作させている必要があります!</Japanese>
<Russian>DUI должен быть запущен на сервере, чтобы обеспечить синхронность!</Russian>
</Key>
<Key ID="STR_dui_radar_syncGroup">
<English>Sync units in group</English>
<German>Synchronisiere Einheiten in der Gruppe</German>
</Key>
<Key ID="STR_dui_radar_syncGroup_desc">
<English>Will sync the order of units in a player&apos;s group if sort type is set to &quot;None&quot;. Only works in MP, every player must have DUI loaded for this to work properly</English>
<German>Snychronisiert die Anordnung der Einheiten in der Gruppe wenn die Sortierung auf &quot;Kein&quot; gesetzt wurde. Funktioniert nur im Multiplayer und alle Spieler müssen DUI nutzen damit dies korrekt funktioniert</German>
</Key>
<!-- Addon module names -->
<Key ID="STR_dui_addon_main">
<English>Main</English>
2 changes: 0 additions & 2 deletions addons/radar/XEH_PREP.hpp
Original file line number Diff line number Diff line change
@@ -5,8 +5,6 @@ PREP(displayUnitOnCompass);
PREP(getIcon);
PREP(rangeButton);
PREP(setCustomCode);
PREP(syncGroups);
PREP(syncGroupsPFH);
PREP(sortNameList);
PREP(getCompass);
PREP(getGPS);
4 changes: 0 additions & 4 deletions addons/radar/XEH_postInit.sqf
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
#include "script_component.hpp"
if (is3DEN) exitWith {};

if (isMultiplayer && {GVAR(sortType) == "none"}) then {
call FUNC(syncGroups);
};

if !(hasInterface) exitWith {};

GVAR(uiPixels) = DUI_128PX;
16 changes: 16 additions & 0 deletions addons/radar/XEH_preInit.sqf
Original file line number Diff line number Diff line change
@@ -571,6 +571,22 @@ GVAR(sortNamespace) setVariable ["COLONEL", 0];
,true
] call CBA_fnc_addSetting;

[
QGVAR(syncGroup)
,"CHECKBOX"
,[localize "STR_dui_radar_syncGroup", localize "STR_dui_radar_syncGroup_desc"]
,[CBA_SETTINGS_CAT, _curCat]
,false
,true
,{
params ["_value"];
if (_value) exitWith {};
{
_x setVariable [QGVAR(syncGroup), nil];
} forEach allGroups;
}
] call CBA_fnc_addSetting;

[
"diwako_dui_hudScaling"
,"SLIDER"
11 changes: 9 additions & 2 deletions addons/radar/functions/fnc_cacheLoop.sqf
Original file line number Diff line number Diff line change
@@ -3,6 +3,14 @@
// loop
[FUNC(cacheLoop),[],0.5] call CBA_fnc_waitAndExecute;

private _player = [] call CBA_fnc_currentUnit;
private _group = units _player;
if (GVAR(syncGroup) && {isMultiplayer && {GVAR(sortType) isEqualTo "none" && {local (leader _player)}}}) then {
if (_group isNotEqualTo ((group _player) getVariable [QGVAR(syncGroup), []])) then {
(group _player) setVariable [QGVAR(syncGroup), _group, true];
};
};

// if both compass and namelist are not enabled, just remove the controls if there are any
if !(diwako_dui_enable_compass || diwako_dui_namelist) exitWith {
for "_i" from 0 to (count GVAR(namebox_lists)) do {
@@ -11,8 +19,7 @@ if !(diwako_dui_enable_compass || diwako_dui_namelist) exitWith {
"diwako_dui_namebox" cutRsc ["diwako_dui_RscNameBox","PLAIN", 0, true];
};

private _player = [] call CBA_fnc_currentUnit;
private _group = (group _player) getVariable [QGVAR(syncGroup), units _player];
_group = (group _player) getVariable [QGVAR(syncGroup), _group];
if (diwako_dui_compass_hide_blip_alone_group && {(count _group) <= 1}) then {
_group = [];
};
7 changes: 0 additions & 7 deletions addons/radar/functions/fnc_syncGroups.sqf

This file was deleted.

36 changes: 0 additions & 36 deletions addons/radar/functions/fnc_syncGroupsPFH.sqf

This file was deleted.