Merge pull request #2312 from acemod/322opendoor3rdperson

increase reach in 3rd person for opening doors, fix #2301
This commit is contained in:
commy2 2015-08-31 21:32:34 +02:00
commit e7d9e8c0dc
3 changed files with 6 additions and 4 deletions

View File

@ -35,7 +35,7 @@ private ["_team"];
// Conditions: canInteract
if !([ACE_player, objNull, []] call EFUNC(common,canInteractWith)) exitWith {false};
// Conditions: specific
if (GVAR(isOpeningDoor) || {[2] call FUNC(getDoor) select 1 == ''}) exitWith {false};
if (GVAR(isOpeningDoor) || {[MACRO_DOOR_REACH_DISTANCE] call FUNC(getDoor) select 1 == ''}) exitWith {false};
// Statement
call EFUNC(interaction,openDoor);

View File

@ -18,7 +18,7 @@
private ["_info", "_phase", "_position", "_time", "_usedMouseWheel", "_getDoorAnimations"];
_info = [2] call FUNC(getDoor);
_info = [MACRO_DOOR_REACH_DISTANCE] call FUNC(getDoor);
EXPLODE_2_PVT(_info,_house,_door);
@ -36,7 +36,7 @@ if (_house animationPhase (_animations select 0) <= 0 && {_house getVariable [_l
};
GVAR(isOpeningDoor) = true;
playSound "ACE_Sound_Click";
playSound "ACE_Sound_Click"; //@todo replace with smth. more fitting
[_house, _animations] spawn {
private ["_house", "_animations", "_phase", "_position", "_time", "_usedMouseWheel"];

View File

@ -9,4 +9,6 @@
#define DEBUG_SETTINGS DEBUG_SETTINGS_INTERACTION
#endif
#include "\z\ace\addons\main\script_macros.hpp"
#include "\z\ace\addons\main\script_macros.hpp"
#define MACRO_DOOR_REACH_DISTANCE (AGLToASL positionCameraToWorld [0,0,0] vectorDistance AGLToASL (ACE_player modelToWorld (ACE_player selectionPosition "Head"))) + 2