rework PFH to client module, triageIcons and vehicleFlags point there

This commit is contained in:
2024-02-15 12:32:01 -08:00
parent ef83d41a32
commit 4fb0ea9a15
17 changed files with 250 additions and 165 deletions

View File

@@ -0,0 +1,40 @@
#include "..\script_component.hpp"
// we'll use this to display status if nearby players are in the flag menu
// 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)
}
}
);
};
// add codeblock to common array
[_code] call EFUNC(client,addPFHCode);