2015-01-11 16:42:31 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
*
|
|
|
|
* Sets the name variable of the object. Used to prevent issues with the name command.
|
|
|
|
*
|
|
|
|
* Argument:
|
|
|
|
* 0: Object (Object)
|
|
|
|
*
|
|
|
|
* Return value:
|
|
|
|
* Nothing.
|
|
|
|
*/
|
2015-01-13 19:56:02 +00:00
|
|
|
#include "script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
private ["_unit", "_name"];
|
|
|
|
|
|
|
|
_unit = _this select 0;
|
|
|
|
|
|
|
|
if (isNull _unit || {!alive _unit}) exitWith {};
|
|
|
|
|
|
|
|
if (_unit isKindOf "CAManBase") then {
|
2015-01-11 18:20:14 +00:00
|
|
|
_name = [name _unit, true] call FUNC(sanitizeString);
|
2015-01-11 16:42:31 +00:00
|
|
|
|
2015-01-12 04:02:33 +00:00
|
|
|
//if (_name != _unit getVariable ["ACE_Name", ""]) then {
|
|
|
|
_unit setVariable ["ACE_Name", _name, true];
|
2015-01-11 16:42:31 +00:00
|
|
|
//};
|
|
|
|
};
|