2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
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
|
|
|
|
*/
|
|
|
|
|
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 {
|
2018-04-19 17:20:18 +00:00
|
|
|
[_newPlayer, 1] call FUNC(cancelTLdeploy);
|
2015-09-26 01:16:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
if (GVAR(ladder) in attachedObjects _oldPlayer) then {
|
2018-04-19 17:20:18 +00:00
|
|
|
[_oldPlayer, 1] call FUNC(cancelTLdeploy);
|
2015-09-26 01:16:55 +00:00
|
|
|
};
|