Merge pull request #3965 from acemod/fixDogtagRespawn

Fix issue with dogtag respawn/setVariable
This commit is contained in:
Nicolás Badano 2016-06-20 17:17:02 -03:00 committed by GitHub
commit 09fd2c4895
5 changed files with 6 additions and 6 deletions

View File

@ -17,4 +17,4 @@ params ["_player", "_target"];
if (isNull _target) exitWith {false};
!alive _target || _target getVariable ["ACE_isUnconscious", false]
(!alive _target) || {_target getVariable ["ACE_isUnconscious", false]}

View File

@ -17,4 +17,4 @@ params ["_player", "_target"];
if (isNull _target) exitWith {false};
!alive _target || _target getVariable ["ACE_isUnconscious", false]
(!alive _target) || {_target getVariable ["ACE_isUnconscious", false]}

View File

@ -15,7 +15,7 @@
params ["_player", "_target"];
private _doubleTags = !(_target getVariable [QGVAR(dogtagTaken), false]);
private _doubleTags = (_target getVariable [QGVAR(dogtagTaken), objNull]) != _target;
private _dogTagData = [_target] call FUNC(getDogTagData);
[QGVAR(showDogtag), [_dogTagData, _doubleTags]] call CBA_fnc_localEvent;

View File

@ -23,7 +23,7 @@ private _allDogtagDatas = missionNamespace getVariable [QGVAR(allDogtagDatas), [
private _nextID = count _allDogtags + 1;
if (_nextID > 999) exitWith {};
if (_nextID > 999) exitWith {ACE_LOGERROR("Ran out of IDs");};
private _dogTagData = [_target] call FUNC(getDogTagData);
private _item = format ["ACE_dogtag_%1", _nextID];

View File

@ -16,9 +16,9 @@
params ["_player", "_target"];
if (_target getVariable [QGVAR(dogtagTaken), false]) then {
if ((_target getVariable [QGVAR(dogtagTaken), objNull]) == _target) then {
[localize LSTRING(dogtagAlreadyTaken)] call EFUNC(common,displayText);
} else {
_target setVariable [QGVAR(dogtagTaken), true, true];
_target setVariable [QGVAR(dogtagTaken), _target, true];
[QGVAR(getDogtagItem), [_player, _target]] call CBA_fnc_serverEvent;
};