2015-09-26 01:16:55 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
* Handle player changes.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: New Player Unit <OBJECT>
|
|
|
|
* 1: Old Player Unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Example:
|
|
|
|
* [bob, kevin] call ace_tacticalladder_fnc_handlePlayerChanged
|
|
|
|
*
|
2015-09-26 01:16:55 +00:00
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2017-12-30 13:38:45 +00:00
|
|
|
if (isNull GETGVAR(ladder,objNull)) exitWith {};
|
2015-09-26 01:16:55 +00:00
|
|
|
|
|
|
|
params ["_newPlayer", "_oldPlayer"];
|
|
|
|
|
|
|
|
if (GVAR(ladder) in attachedObjects _newPlayer) then {
|
|
|
|
[_newPlayer, GVAR(ladder)] call FUNC(cancelTLdeploy);
|
|
|
|
};
|
|
|
|
|
|
|
|
if (GVAR(ladder) in attachedObjects _oldPlayer) then {
|
|
|
|
[_oldPlayer, GVAR(ladder)] call FUNC(cancelTLdeploy);
|
|
|
|
};
|