mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #3965 from acemod/fixDogtagRespawn
Fix issue with dogtag respawn/setVariable
This commit is contained in:
commit
09fd2c4895
@ -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]}
|
||||
|
@ -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]}
|
||||
|
@ -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;
|
||||
|
@ -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];
|
||||
|
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user