mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Disabled by default - Safe FOV Check
This commit is contained in:
parent
c6f21f48a4
commit
0b9d1fb05d
@ -1,6 +1,6 @@
|
||||
class ACE_Settings {
|
||||
class GVAR(enabled) {
|
||||
value = 1;
|
||||
value = 0;
|
||||
typeName = "BOOL";
|
||||
displayName = CSTRING(enabled_displayName);
|
||||
};
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private["_drawColor", "_fovCorrection", "_iconSize", "_timeLeftToShow"];
|
||||
private["_drawColor", "_fovCorrection", "_iconSize", "_timeLeftToShow", "_cameraOffset"];
|
||||
|
||||
if (!alive ACE_player) then {GVAR(fingersHash) = HASH_CREATE;};
|
||||
// Conditions: canInteract
|
||||
@ -23,7 +23,9 @@ if !([ACE_player, ACE_player, ["isNotInside"]] call EFUNC(common,canInteractWith
|
||||
//make sure player is dismounted or in a static weapon:
|
||||
if ((ACE_player != vehicle ACE_player) && {!((vehicle ACE_player) isKindOf "StaticWeapon")}) then {GVAR(fingersHash) = HASH_CREATE;};
|
||||
|
||||
_fovCorrection = ((worldToScreen (positionCameraToWorld [1000, 0, 10000])) select 0) - 0.5;
|
||||
_cameraOffset = worldToScreen (positionCameraToWorld [1000, 0, 10000]);
|
||||
_fovCorrection = 0;
|
||||
if (count _cameraOffset > 0) then {_fovCorrection = (_cameraOffset select 0) - 0.5;};
|
||||
_iconSize = BASE_SIZE * _fovCorrection;
|
||||
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user