mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #2312 from acemod/322opendoor3rdperson
increase reach in 3rd person for opening doors, fix #2301
This commit is contained in:
commit
e7d9e8c0dc
@ -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);
|
||||
|
@ -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"];
|
||||
|
@ -10,3 +10,5 @@
|
||||
#endif
|
||||
|
||||
#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
|
||||
|
Loading…
Reference in New Issue
Block a user