rework PFH to client module, triageIcons and vehicleFlags point there
This commit is contained in:
17
framework/client/functions/fn_addGetNearMenPFH.sqf
Normal file
17
framework/client/functions/fn_addGetNearMenPFH.sqf
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "..\script_component.hpp"
|
||||
|
||||
// subroutine to gather nearest 50 units every 5 seconds and store in GVAR(nearMen)
|
||||
// cleanup
|
||||
if (!isNil QGVAR(getNearMenPFH)) then {
|
||||
[GVAR(getNearMenPFH)] call CBA_fnc_removePerFrameHandler;
|
||||
};
|
||||
// add pfh
|
||||
GVAR(getNearMenPFH) = [{
|
||||
localNamespace setVariable [
|
||||
QGVAR(nearMen),
|
||||
(nearestObjects [player,["Man"],50,false]) select {
|
||||
!isNull _x &&
|
||||
player isNotEqualTo _x
|
||||
}
|
||||
];
|
||||
}, 1] call CBA_fnc_addPerFrameHandler;
|
||||
Reference in New Issue
Block a user