Skip to content
This repository has been archived by the owner on Jul 22, 2021. It is now read-only.

Commit

Permalink
createpilotmarker fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nomisum committed Aug 7, 2016
1 parent 46b8486 commit b8592db
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions player/createPilotMarker.sqf
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
_pos = _this select 0;
_trackingPrecision = _this select 1;
// _pos = _this select 0;
// _trackingPrecision = _this select 1;

_pos = CURRENT_PILOTS_POSITION select 1;
_trackingPrecision = CURRENT_PILOTS_POSITION select 2;
_markerSize = CURRENT_PILOTS_POSITION select 2;
_trackingPrecision = 250;

randomize_coord = {
_this + random(trackingPrecision * 2) - trackingPrecision
params ["_coord","_precision"];
_coord + random(_precision * 2) - _precision
};

randomize_pos =
{
params ["_pos","_precision"];
private ["_randomizedPos", "_trueX", "_trueY"];
_trueX = _this select 0;
_trueY = _this select 1;
_trueX = _pos select 0;
_trueY = _pos select 1;
_randomizedPos = [
_trueX call randomize_coord,
_trueY call randomize_coord,
_this select 2
[_trueX,_precision] call randomize_coord,
[_trueY,_precision] call randomize_coord,
_pos select 2
];
_randomizedPos
};


_markerPos = _pos;
_markerPos = _pos call randomize_pos;
_markerPos = [_pos,_trackingPrecision] call randomize_pos;

_marker = createMarkerLocal [format ["pilotmarker_%1", _markerPos],_markerPos];
_marker setMarkerTypeLocal "mil_unknown";
_marker setMarkerColorLocal "ColorBlufor";
_marker setMarkerShapeLocal "ELLIPSE";
_marker setMarkerSizeLocal [_trackingPrecision, _trackingPrecision];
_marker setMarkerSizeLocal [_markerSize, _markerSize];
_marker setMarkerBrushLocal "Solid";
_marker setMarkerAlphaLocal 0.5;

Expand Down

0 comments on commit b8592db

Please sign in to comment.