Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bugfix] - Fixed GRAVESTONES_USE_PRIORITY_LIST being ignored. #150

Merged
merged 1 commit into from
Mar 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions components/gravestones/fn_addToGravestoneManager.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (isNull _unit) exitWith
DEBUG_PRINT_LOG("[Gravestones] Called addToGravestoneManager but the corpse was a null object.")
};

_shouldCache = _unit getVariable ["f_var_allowGravestone", true] and {(group _unit) getVariable ["f_var_allowGravestone", true]};
_shouldCache = (_unit getVariable ["f_var_allowGravestone", true]) and {(group _unit) getVariable ["f_var_allowGravestone", true]};

if !(_shouldCache) exitWith
{
Expand All @@ -32,13 +32,17 @@ _netId = _unit call BIS_fnc_netId;

_cacheEntry = [time, _netId, _name, _obituary];

if (isPlayer _unit) exitWith
{
DEBUG_FORMAT1_LOG("[Gravestones] Adding corpse to the priority cache because it was a player: %1",_unit)
#ifdef GRAVESTONES_USE_PRIORITY_LIST

_cacheEntry pushBack true;
[_cacheEntry, "VIP_CACHE"] call f_fnc_sendUnitToGravestoneCache;
};
if (isPlayer _unit) exitWith
{
DEBUG_FORMAT1_LOG("[Gravestones] Adding corpse to the priority cache because it was a player: %1",_unit)

_cacheEntry pushBack true;
[_cacheEntry, "VIP_CACHE"] call f_fnc_sendUnitToGravestoneCache;
};

#endif

_cacheEntry pushBack false;
[_cacheEntry, "CACHE"] call f_fnc_sendUnitToGravestoneCache;