Disabled by default - Safe FOV Check

This commit is contained in:
PabstMirror 2015-07-26 00:48:53 -05:00
parent c6f21f48a4
commit 0b9d1fb05d
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
class ACE_Settings {
class GVAR(enabled) {
value = 1;
value = 0;
typeName = "BOOL";
displayName = CSTRING(enabled_displayName);
};

View File

@ -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;
{