2015-03-01 09:44:08 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Action for loading an unconscious or dead unit in the nearest vechile
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The medic <OBJECT>
|
|
|
|
* 1: The patient <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
2015-08-22 14:25:10 +00:00
|
|
|
* None
|
2015-03-01 09:44:08 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-22 14:25:10 +00:00
|
|
|
private "_vehicle";
|
|
|
|
params ["_caller", "_target"];
|
2015-03-01 09:44:08 +00:00
|
|
|
|
2015-11-30 16:14:05 +00:00
|
|
|
if ([_target] call EFUNC(common,isAwake)) exitWith {
|
2015-08-29 13:29:02 +00:00
|
|
|
["displayTextStructured", [_caller], [[LSTRING(CanNotLoaded), [_target] call EFUNC(common,getName)], 1.5, _caller]] call EFUNC(common,targetEvent);
|
2015-03-01 09:44:08 +00:00
|
|
|
};
|
2015-04-09 19:23:10 +00:00
|
|
|
if ([_target] call FUNC(isBeingCarried)) then {
|
2015-08-22 19:32:36 +00:00
|
|
|
[_caller, _target] call EFUNC(dragging,dropObject_carry);
|
2015-04-09 19:23:10 +00:00
|
|
|
};
|
|
|
|
if ([_target] call FUNC(isBeingDragged)) then {
|
2015-08-22 19:32:36 +00:00
|
|
|
[_caller, _target] call EFUNC(dragging,dropObject);
|
2015-04-09 19:23:10 +00:00
|
|
|
};
|
2015-03-01 09:44:08 +00:00
|
|
|
|
2015-08-22 19:32:36 +00:00
|
|
|
_vehicle = [_caller, _target] call EFUNC(common,loadPerson);
|