mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
28 lines
988 B
Plaintext
28 lines
988 B
Plaintext
// by PabstMirror, commy2
|
|
#include "script_component.hpp"
|
|
|
|
GVAR(currentHeightChange) = 0;
|
|
|
|
//[{_this call DFUNC(handleScrollWheel)}] call FUNC(common,addScrollWheelEventHandler);
|
|
|
|
if (isNil QGVAR(maxWeight)) then {
|
|
GVAR(maxWeight) = 800;
|
|
};
|
|
|
|
["isNotDragging", {!((_this select 0) getVariable [QGVAR(isDragging), false])}] call EFUNC(common,addCanInteractWithCondition);
|
|
["isNotCarrying", {!((_this select 0) getVariable [QGVAR(isCarrying), false])}] call EFUNC(common,addCanInteractWithCondition);
|
|
|
|
// release object on player change. This does work when returning to lobby, but not when hard disconnecting.
|
|
["playerChanged", {
|
|
private ["_newPlayer", "_oldPlayer"];
|
|
|
|
_newPlayer = _this select 0;
|
|
_oldPlayer = _this select 1;
|
|
|
|
{
|
|
if (_x getVariable [QGVAR(isDragging), false]) then {
|
|
[_x, _x getVariable [QGVAR(draggedObject), objNull]] call FUNC(dropObject);
|
|
};
|
|
} forEach [_newPlayer, _oldPlayer];
|
|
}] call EFUNC(common,addEventhandler);
|