ACE3/addons/trenches/functions/fnc_handlePlayerChanged.sqf

28 lines
529 B
Plaintext
Raw Normal View History

/*
* Author: commy2
* Handle player changes.
*
* Arguments:
* 0: New Player Unit <OBJECT>
* 1: Old Player Unit <OBJECT>
*
* Return Value:
* None
*
* Example:
* [bob, kevin] call ace_trenches_fnc_handlePlayerChanged
*
* Public: No
*/
#include "script_component.hpp"
params ["_newPlayer", "_oldPlayer"];
2016-02-04 20:42:12 +00:00
if (_newPlayer getVariable [QGVAR(isPlacing), false]) then {
[_newPlayer] call FUNC(placeCancel);
};
2016-02-04 20:42:12 +00:00
if (_oldPlayer getVariable [QGVAR(isPlacing), false]) then {
[_oldPlayer] call FUNC(placeCancel);
};