adds drawicon3d wrapper from Hizumi and status for vflag use
This commit is contained in:
@@ -4,37 +4,21 @@
|
||||
|
||||
// adds codeblock to common array to be processed per frame
|
||||
private _code = {
|
||||
{
|
||||
private _unit = _x;
|
||||
|
||||
// color based on triage level
|
||||
private _color = [0.9, 0.9, 0.9, 1]; // default color
|
||||
// draw position, slightly above the prone unit
|
||||
private _drawPos = (visiblePosition _unit) vectorAdd [0, 0, 0.5];
|
||||
// draw icon
|
||||
drawIcon3D [
|
||||
"", // icon texture
|
||||
_color, // color
|
||||
_drawPos, // position AGL
|
||||
1, // width
|
||||
1, // height
|
||||
0, // angle
|
||||
"Setting vehicle flag...", // text
|
||||
true // outline
|
||||
// further params optional, omitted
|
||||
];
|
||||
true;
|
||||
} count (
|
||||
(localNamespace getVariable [QEGVAR(client,nearMen), []]) select {
|
||||
(_x getVariable [QGVAR(inFlagMenu), false]) && {
|
||||
// distance within X meters
|
||||
player distance _x <= 10 ||
|
||||
// check unit not in a vehicle
|
||||
isNull (objectParent _x)
|
||||
}
|
||||
private _unitsToDraw = (localNamespace getVariable [QEGVAR(client,nearMen), []]) select {
|
||||
(_x getVariable [QGVAR(inFlagMenu), false]) && {
|
||||
// distance within X meters
|
||||
player distance _x <= 15 ||
|
||||
// check unit not in a vehicle
|
||||
isNull (objectParent _x)
|
||||
}
|
||||
);
|
||||
};
|
||||
[
|
||||
_unitsToDraw,
|
||||
"",
|
||||
"Setting vehicle flag...",
|
||||
[0.9, 0.9, 0.9, 1]
|
||||
] call EFUNC(common,draw3dIconStatus);
|
||||
};
|
||||
|
||||
// add codeblock to common array
|
||||
[_code] call EFUNC(client,addPFHCode);
|
||||
[_code] call EFUNC(client,registerPFHCode);
|
||||
Reference in New Issue
Block a user