Skip to content

Commit

Permalink
Punching dead NPCs no longer gives XP
Browse files Browse the repository at this point in the history
  • Loading branch information
colinswrath committed Dec 11, 2021
1 parent cb41810 commit 51cc485
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Events.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace Events
if (!defender || !attackingWeapon || !defender->currentProcess || !defender->currentProcess->high || !attackingWeapon->IsMelee() || !defender->Get3D())
return RE::BSEventNotifyControl::kContinue;

if (defender && attackingWeapon->GetWeaponType() == RE::WEAPON_TYPE::kHandToHandMelee)
if ((defender->ActorState::GetLifeState() != RE::ACTOR_LIFE_STATE::kDead) && attackingWeapon->GetWeaponType() == RE::WEAPON_TYPE::kHandToHandMelee)
{
ApplyHandToHandXP();
}
Expand Down

0 comments on commit 51cc485

Please sign in to comment.