mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
dbe372cb48
* Code cleanup * Moved keybinds to initKeybinds.sqf * Update addons/dragging/initKeybinds.sqf Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Update addons/dragging/functions/fnc_carryObject.sqf Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Update addons/dragging/functions/fnc_getWeight.sqf Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Rephrasing and adjustments for dragging --------- Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
31 lines
716 B
Plaintext
31 lines
716 B
Plaintext
#include "script_component.hpp"
|
|
/*
|
|
* Author: commy2
|
|
* Handles player changes.
|
|
*
|
|
* Arguments:
|
|
* 0: New Player Unit <OBJECT>
|
|
* 1: Old Player Unit <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* None
|
|
*
|
|
* Example:
|
|
* [_newPlayer, _oldPlayer] call ace_dragging_fnc_handlePlayerChanged;
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_newPlayer", "_oldPlayer"];
|
|
TRACE_2("params",_newPlayer,_oldPlayer);
|
|
|
|
{
|
|
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];
|