Skip to content

Commit

Permalink
Added visible staging zone for non vehicle zones (#1060)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasBrostrom authored Nov 4, 2023
1 parent c930788 commit 04ef271
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions cScripts/functions/mission/fn_addStagingZone.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,25 @@ params [
["_size", 12, [0]]
];

private _stagingZones = missionNamespace getVariable [QEGVAR(Staging,Zones), []];
private _stagingZones = GETMVAR(EGVAR(Staging,Zones), []);

// Check if zone is marker
if (_zone isEqualType "") then {
private _markerPos = getMarkerPos _zone;
_zone = "UserTexture1m_F" createVehicle _markerPos;
};

_stagingZones pushBack [_zone, _size];

missionNamespace setVariable [QEGVAR(Staging,Zones), _stagingZones];
SETMVAR(EGVAR(Staging,Zones), _stagingZones)

#ifdef DEBUG_MODE
private _debugMarker = createMarkerLocal [format["DebugStadgeingMarker_%1", count _stagingZones], _zone];
_debugMarker setMarkerShapeLocal "ELLIPSE";
_debugMarker setMarkerSizeLocal [_size, _size];
_debugMarker setMarkerColorLocal "colorCivilian";
INFO_1("Staging", "Staging zone %1 created.", count _stagingZones);
#endif
INFO_2("Staging", "Staging zone %1 (%2) created.", count _stagingZones, _zone);

// Vehicles dont paint out the zone
if (_zone isKindOf "AllVehicles") exitWith {};
INFO_2("Staging", "Revlealing staging zone %1 (%2)", count _stagingZones, _zone);

private _visibleZone = createMarkerLocal [format["VisibleStadgeingMarker_%1", count _stagingZones], _zone];
_visibleZone setMarkerShapeLocal "ELLIPSE";
_visibleZone setMarkerSizeLocal [_size, _size];
_visibleZone setMarkerColorLocal "ColorYellow";

0 comments on commit 04ef271

Please sign in to comment.