mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-25 19:26:08 +03:00
1.0.6.1 hotfix A
update changelog add mission check add fixes for group icons and nutrition to mission files
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
private ["_bodyCount","_count","_group","_hasGPS","_index","_inGroup","_marker","_markBody","_markGroup","_markSelf","_name","_pos","_self","_vehicle"];
|
||||
|
||||
while {true} do {
|
||||
_group = player call dayz_filterGroup;
|
||||
_inGroup = count _group > 1;
|
||||
|
||||
if (dayz_requireRadio && {_inGroup} && {!("ItemRadio" in items player)}) then {
|
||||
[player] joinSilent grpNull;
|
||||
if (!isNull findDisplay 80000) then {findDisplay 80000 closeDisplay 2;};
|
||||
terminate dayz_groupTags;
|
||||
80000 cutText ["","PLAIN"];
|
||||
localize "STR_EPOCH_LOST_RADIO_CONTACT" call dayz_rollingMessages;
|
||||
} else {
|
||||
if (_inGroup && scriptDone dayz_groupTags) then {
|
||||
dayz_groupTags = execVM "DZE_Hotfix_1.0.6.1A\groups\groupTags.sqf";
|
||||
};
|
||||
|
||||
if (visibleMap or !isNull (uiNamespace getVariable["BIS_RscMiniMap",displayNull])) then {
|
||||
_hasGPS = "ItemGPS" in items player;
|
||||
_markBody = (dayz_markBody == 1 or (dayz_markBody == 2 && _hasGPS));
|
||||
_markGroup = (dayz_markGroup == 1 or (dayz_markGroup == 2 && _hasGPS));
|
||||
_markSelf = (dayz_markSelf == 1 or (dayz_markSelf == 2 && _hasGPS));
|
||||
|
||||
_index = 0;
|
||||
{
|
||||
_self = _x == player;
|
||||
_vehicle = vehicle _x;
|
||||
if ((_self or _markGroup) && (!_self or _markSelf) && (effectiveCommander _vehicle == _x)) then {
|
||||
_pos = [_x] call FNC_GetPos;
|
||||
deleteMarkerLocal format["groupMember%1",_index];
|
||||
_marker = createMarkerLocal [format["groupMember%1",_index],_pos];
|
||||
_marker setMarkerTypeLocal "DestroyedVehicle";
|
||||
_marker setMarkerTextLocal format ["%1",if (_vehicle == _x) then {name _x} else {_vehicle call dayz_getCrew}];
|
||||
_marker setMarkerColorLocal "ColorGreen";
|
||||
} else {
|
||||
deleteMarkerLocal format["groupMember%1",_index];
|
||||
};
|
||||
_index = _index + 1;
|
||||
} count _group;
|
||||
|
||||
// Remove markers for group members that left
|
||||
_count = count _group;
|
||||
if (dayz_oldMemberCount > _count) then {
|
||||
for "_i" from _count to dayz_oldMemberCount do {deleteMarkerLocal format["groupMember%1",_i];};
|
||||
};
|
||||
dayz_oldMemberCount = _count;
|
||||
|
||||
if (_markBody) then {
|
||||
_bodyCount = 0;
|
||||
_name = name player;
|
||||
{
|
||||
if (_x getVariable["bodyName",""] == _name) then {
|
||||
_bodyCount = _bodyCount + 1;
|
||||
_pos = [_x] call FNC_GetPos;
|
||||
deleteMarkerLocal format["MyBody%1",_bodyCount];
|
||||
_marker = createMarkerLocal [format["MyBody%1",_bodyCount],_pos];
|
||||
_marker setMarkerTypeLocal "DestroyedVehicle";
|
||||
_marker setMarkerTextLocal localize "STR_EPOCH_RIP";
|
||||
_marker setMarkerColorLocal "ColorRed";
|
||||
};
|
||||
} count allDead;
|
||||
|
||||
// Remove markers for bodies that were deleted
|
||||
if (dayz_oldBodyCount > _bodyCount) then {
|
||||
for "_i" from _bodyCount to dayz_oldBodyCount do {deleteMarkerLocal format["MyBody%1",_i];};
|
||||
};
|
||||
dayz_oldBodyCount = _bodyCount;
|
||||
} else {
|
||||
for "_i" from 1 to dayz_oldBodyCount do {deleteMarkerLocal format["MyBody%1",_i];};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
uiSleep 1;
|
||||
};
|
||||
@@ -0,0 +1,52 @@
|
||||
#define DRAW_TAGS (!visibleMap && count units group player > 1) //Use && cameraView != "GROUP" if tactical view is allowed (blocked by default)
|
||||
private ["_display","_distance","_group","_icon","_index","_pos","_scale","_screen","_text"];
|
||||
disableSerialization;
|
||||
|
||||
_refresh = {
|
||||
_group = player call dayz_filterGroup;
|
||||
|
||||
_display = uiNamespace getVariable "DZ_GroupTags";
|
||||
_index = 0;
|
||||
{
|
||||
_pos = [_x] call FNC_GetPos;
|
||||
_distance = _pos distance player;
|
||||
_icon = _display displayCtrl (100 + _index);
|
||||
if (_distance > 1 && _distance < 2500 && vehicle _x != vehicle player) then {
|
||||
_pos set [2,(_pos select 2) + 1.5];
|
||||
_screen = worldToScreen _pos;
|
||||
_text = composeText [image "\ca\ui\data\igui_side_unknown_ca.paa"," ",if (dayz_groupNameTags) then {name _x} else {""}];
|
||||
if (count _screen > 1) then {
|
||||
_scale = if (_distance < 200) then {.3} else {1 min ((1 - (_distance - 3) / 15) max .3)};
|
||||
_icon ctrlSetStructuredText _text;
|
||||
_icon ctrlSetPosition [(_screen select 0),(_screen select 1),.99,.65];
|
||||
_icon ctrlSetScale _scale;
|
||||
_icon ctrlSetFade ((1 - _scale) / 2);
|
||||
_icon ctrlCommit 0;
|
||||
_icon ctrlShow true;
|
||||
} else {
|
||||
_icon ctrlShow false;
|
||||
};
|
||||
} else {
|
||||
_icon ctrlShow false;
|
||||
};
|
||||
_index = _index + 1;
|
||||
} count _group;
|
||||
|
||||
if (dayz_oldGroupCount > count _group) then {
|
||||
_display displayCtrl (100 + _index) ctrlShow false;
|
||||
};
|
||||
|
||||
dayz_oldGroupCount = count _group;
|
||||
};
|
||||
|
||||
while {true} do {
|
||||
waitUntil {uiSleep 1; DRAW_TAGS};
|
||||
80000 cutRsc ["DZ_GroupTags","PLAIN"];
|
||||
|
||||
while {DRAW_TAGS} do {
|
||||
call _refresh; //Must be called to finish in current frame
|
||||
uiSleep 0.01;
|
||||
};
|
||||
|
||||
80000 cutText ["","PLAIN"];
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
private ["_leader","_oldGroup","_savedGroup"];
|
||||
|
||||
uiSleep 1;
|
||||
if (count (units group player) > 1) then {
|
||||
[player] joinSilent grpNull;
|
||||
diag_log "Clearing group";
|
||||
};
|
||||
|
||||
_savedGroup = (PVCDZ_plr_Login select 10) - [getPlayerUID player];
|
||||
|
||||
if (count _savedGroup > 0 && {!dayz_requireRadio or {dayz_requireRadio && "ItemRadio" in items player}}) then {
|
||||
{
|
||||
//Only auto join player into group if leader is in their savedGroup
|
||||
_leader = leader _x;
|
||||
if (getPlayerUID _leader in _savedGroup) exitWith {
|
||||
_oldGroup = group player;
|
||||
[player] joinSilent _x;
|
||||
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
|
||||
format[localize "STR_EPOCH_REJOINED_GROUP",name _leader] call dayz_rollingMessages;
|
||||
|
||||
// Update saved group in DB
|
||||
PVDZ_Server_UpdateGroup = [1,player];
|
||||
publicVariableServer "PVDZ_Server_UpdateGroup";
|
||||
};
|
||||
} count allGroups;
|
||||
};
|
||||
|
||||
dayz_oldBodyCount = 0;
|
||||
dayz_oldGroupCount = 0;
|
||||
dayz_oldMemberCount = 0;
|
||||
dayz_disbandGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\disband.sqf";
|
||||
dayz_filterGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\filter.sqf";
|
||||
dayz_getCrew = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\getCrew.sqf";
|
||||
dayz_getPlayer = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\getPlayer.sqf";
|
||||
dayz_inviteToGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\invite.sqf";
|
||||
dayz_joinGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\join.sqf";
|
||||
dayz_kickFromGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\kick.sqf";
|
||||
dayz_leaveGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\leave.sqf";
|
||||
dayz_openGroupDialog = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\open.sqf";
|
||||
dayz_pickGroupMember = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\pickGroupMember.sqf";
|
||||
dayz_pickPlayer = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\pickPlayer.sqf";
|
||||
dayz_promotePlayer = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\promote.sqf";
|
||||
dayz_rejectGroup = compile preprocessFileLineNumbers "\z\addons\dayz_code\groups\reject.sqf";
|
||||
dayz_groupInit = true;
|
||||
|
||||
//Initialize as script data type, no scriptNull in A2
|
||||
dayz_groupDisbandThread = 0 spawn {};
|
||||
dayz_groupLeaveThread = 0 spawn {};
|
||||
dayz_groupTags = 0 spawn {};
|
||||
|
||||
execVM "DZE_Hotfix_1.0.6.1A\groups\groupMarkers.sqf";
|
||||
Reference in New Issue
Block a user