-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
area markers with configurable visibility by side
- Loading branch information
1 parent
8eff435
commit fea8d01
Showing
9 changed files
with
203 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: Fusselwurm | ||
* Set the alpha of a marker depending on the player's side | ||
* | ||
* Arguments: | ||
* 0: Marker <STRING> | ||
* 1: Sides that may see the marker <ARRAY> | ||
* 2: Alpha value to use for players of passed `sides` | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* ["marker_0", [west,civilian], 0.7] call zen_area_markers_fnc_updateAlpha | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_marker", "_sides", "_alpha"]; | ||
|
||
if (isServer) exitWith { | ||
[GVAR(markerVisibilities), _marker, _sides] call CBA_fnc_hashSet; | ||
publicVariable QGVAR(markerVisibilities); | ||
}; | ||
|
||
if (!hasInterface) exitWith {}; // ignore HCs | ||
|
||
private _localAlpha = if ( | ||
(playerSide in _sides) || | ||
(!isNull (getAssignedCuratorLogic player)) // ZEUS should always see the markers! | ||
) then { _alpha } else { 0 }; | ||
|
||
_marker setMarkerAlphaLocal _localAlpha; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: Fusselwurm | ||
* Set the marker position locally | ||
* | ||
* Arguments: | ||
* 0: Marker <STRING> | ||
* 1: Marker position | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* ["marker_0", [3265.59,853.12]] call zen_area_markers_fnc_updatePos | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_marker", "_pos"]; | ||
|
||
_marker setMarkerPosLocal _pos; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters