mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
use eventhandlers instead of PFH
This commit is contained in:
17
addons/dragging/functions/fnc_handlePlayerChanged.sqf
Normal file
17
addons/dragging/functions/fnc_handlePlayerChanged.sqf
Normal file
@ -0,0 +1,17 @@
|
||||
// by commy2
|
||||
#include "script_component.hpp"
|
||||
|
||||
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);
|
||||
};
|
||||
|
||||
if (_x getVariable [QGVAR(isCarrying), false]) then {
|
||||
[_x, _x getVariable [QGVAR(carriedObject), objNull]] call FUNC(dropObject_carry);
|
||||
};
|
||||
} forEach [_newPlayer, _oldPlayer];
|
Reference in New Issue
Block a user