Merge pull request #3634 from acemod/fixerrornoname

fix FUNC(setName) for Zeus and alive spawned units
This commit is contained in:
commy2 2016-03-29 15:48:19 +02:00
commit 49f6904f9e
2 changed files with 2 additions and 8 deletions

View File

@ -33,7 +33,7 @@ class Extended_InitPost_EventHandlers {
};
class CAManBase {
class GVAR(setName) {
init = QUOTE(if (local (_this select 0)) then {_this call FUNC(setName)};);
init = QUOTE(if (local (_this select 0)) then {[ARR_2(FUNC(setName),_this)] call FUNC(execNextFrame)};);
};
class GVAR(muteUnit) {
init = QUOTE(_this call FUNC(muteUnitHandleInitPost));

View File

@ -19,13 +19,7 @@ if (isNull _unit || {!alive _unit}) exitWith {};
if (_unit isKindOf "CAManBase") then {
private _sanitizedName = [name _unit, true] call FUNC(sanitizeString);
private _rawName = [name _unit, false] call FUNC(sanitizeString);
//Debug Testing Code (with html tags):
// private _sanitizedName = ["<TAG>Name", true] call FUNC(sanitizeString);
// private _rawName = ["<TAG>Name", false] call FUNC(sanitizeString);
//if (_name != _unit getVariable ["ACE_Name", ""]) then {
_unit setVariable ["ACE_Name", _sanitizedName, true];
_unit setVariable ["ACE_NameRaw", _rawName, true];
//};
};