rework PFH to client module, triageIcons and vehicleFlags point there
This commit is contained in:
40
framework/vehicleFlags/functions/fn_draw3D.sqf
Normal file
40
framework/vehicleFlags/functions/fn_draw3D.sqf
Normal 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);
|
||||
Reference in New Issue
Block a user