2015-06-04 19:13:44 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-09-26 01:16:55 +00:00
|
|
|
if (!hasInterface) exitWith {};
|
|
|
|
|
2015-06-04 19:13:44 +00:00
|
|
|
GVAR(adjustPFH) = -1;
|
|
|
|
|
|
|
|
GVAR(height) = 0;
|
|
|
|
|
|
|
|
// Cancel adjustment if interact menu opens
|
2015-09-26 01:16:55 +00:00
|
|
|
["interactMenuOpened", {[ACE_player] call FUNC(handleInteractMenuOpened)}] call EFUNC(common,addEventHandler);
|
|
|
|
|
|
|
|
[{_this call FUNC(handleScrollWheel)}] call EFUNC(common,addScrollWheelEventHandler);
|
|
|
|
|
|
|
|
// Cancel adjusting on player change.
|
|
|
|
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
|
|
|
|
["playerVehicleChanged", {[ACE_player, objNull] call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventhandler);
|
|
|
|
|
|
|
|
// handle falling unconscious
|
|
|
|
["medical_onUnconscious", {_this call FUNC(handleUnconscious)}] call EFUNC(common,addEventhandler);
|
2015-06-04 19:13:44 +00:00
|
|
|
|
2015-09-26 01:16:55 +00:00
|
|
|
// @todo captivity?
|