diff --git a/addons/KP_Ranks/fnc/fn_entityKilled.sqf b/addons/KP_Ranks/fnc/fn_entityKilled.sqf index e57cb32..756a551 100644 --- a/addons/KP_Ranks/fnc/fn_entityKilled.sqf +++ b/addons/KP_Ranks/fnc/fn_entityKilled.sqf @@ -28,6 +28,9 @@ if (isNull _instigator) then {_instigator = _killer}; // Don't do something for AI if !(isPlayer _instigator) exitWith {}; +// Exit when killed and instigator are identical (otherwise players get additional teamkill penalty for respawn/death) +if (_killed isEqualTo _instigator) exitWith {}; + // Exit when unknown, enemy side or ambient life if (side group _killed == sideUnknown || side group _killed == sideEnemy || side group _killed == sideAmbientLife) exitWith {}; diff --git a/addons/KP_Ranks/fnc/fn_playerDeath.sqf b/addons/KP_Ranks/fnc/fn_playerDeath.sqf index 0e04105..918b0c9 100644 --- a/addons/KP_Ranks/fnc/fn_playerDeath.sqf +++ b/addons/KP_Ranks/fnc/fn_playerDeath.sqf @@ -24,7 +24,7 @@ params ["_entity", "_corpse"]; if !(isPlayer _entity) exitWith {}; // Exit, if there is no corpse (e.g. a joining player) -if !(isNull _corpse) exitWith {}; +if (isNull _corpse) exitWith {}; // Get some player date private _playerId = getPlayerUID _entity;