2015-01-11 16:42:31 +00:00
|
|
|
/*
|
2015-02-02 22:28:27 +00:00
|
|
|
* Author: bux578
|
|
|
|
* Switches back to the original player unit
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: Original player unit <OBJECT>
|
|
|
|
* 1: Respawned unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
2015-08-07 07:18:42 +00:00
|
|
|
* [_originalPlayerUnit, _currentUnit] call ace_switchunits_fnc_switchBack
|
2015-02-02 22:28:27 +00:00
|
|
|
*
|
|
|
|
* Public: Yes
|
|
|
|
*/
|
2015-01-12 14:47:22 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-07 07:18:42 +00:00
|
|
|
params ["_originalPlayerUnit"];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-04-17 20:45:00 +00:00
|
|
|
[_originalPlayerUnit] joinSilent GVAR(OriginalGroup);
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-08-08 11:34:35 +00:00
|
|
|
[{
|
2015-08-07 07:18:42 +00:00
|
|
|
params ["_args", "_pfhId"];
|
|
|
|
_args params ["_originalPlayerUnit", "_currentUnit"];
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-02-02 22:28:27 +00:00
|
|
|
if (local _originalPlayerUnit) exitWith {
|
|
|
|
selectPlayer _originalPlayerUnit;
|
2015-07-26 07:19:29 +00:00
|
|
|
|
2016-01-10 19:58:54 +00:00
|
|
|
// deleteVehicle _currentUnit;
|
|
|
|
|
|
|
|
// private _layer = "BIS_fnc_respawnCounter" call bis_fnc_rscLayer;
|
|
|
|
// _layer cuttext ["","plain"];
|
2015-07-26 07:19:29 +00:00
|
|
|
|
2015-11-30 15:45:20 +00:00
|
|
|
[_pfhId] call CBA_fnc_removePerFrameHandler;
|
2015-02-02 22:28:27 +00:00
|
|
|
};
|
2015-08-08 11:34:35 +00:00
|
|
|
}, 0.2, _this] call CBA_fnc_addPerFrameHandler;
|