From e6c333bff4baeda7664be651d089d787829813e9 Mon Sep 17 00:00:00 2001 From: esteldunedain Date: Sat, 2 May 2015 14:54:57 -0300 Subject: [PATCH] Fix oclusion when self-interacting --- addons/interact_menu/functions/fnc_renderBaseMenu.sqf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf index 913a361941..36685a72eb 100644 --- a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf @@ -96,7 +96,11 @@ if (count _activeActionTree == 0) exitWith {false}; BEGIN_COUNTER(fnc_renderMenus); // IGNORE_PRIVATE_WARNING(_cameraPos,_cameraDir); -_sPos pushBack (((_pos call EFUNC(common,positionToASL)) vectorDiff _cameraPos) vectorDotProduct _cameraDir); +if (count _pos > 2) then { + _sPos pushBack (((_pos call EFUNC(common,positionToASL)) vectorDiff _cameraPos) vectorDotProduct _cameraDir); +} else { + _sPos pushBack 0; +}; // Add action point for oclusion and rendering GVAR(collectedActionPoints) pushBack [_sPos select 2, _sPos, _activeActionTree];