Skip to content

Commit

Permalink
Merge pull request #3 from OCAPv2/fk_respawnfix
Browse files Browse the repository at this point in the history
Reset unit after respawn
  • Loading branch information
indig0fox authored Jul 8, 2021
2 parents c8b49ab + 884dfe8 commit 54a782e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions addons/@ocap/addons/ocap/functions/fn_addEventMission.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ addMissionEventHandler ["EntityKilled", {
_this call ocap_fnc_eh_killed;
}];

addMissionEventHandler ["EntityRespawned", {
params ["_entity", "_corpse"];

// Reset unit back to normal
_entity setvariable ["ocapIsKilled", false];

// Stop tracking old unit
if (_corpse getVariable ["ocap_isInitialised", false]) then {
_corpse setVariable ["ocap_exclude", true];
};
}];

call ocap_fnc_trackAceExplPlace;

if (ocap_saveMissionEnded) then {
Expand Down

0 comments on commit 54a782e

Please sign in to comment.