mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-21 19:51:27 +00:00
fix kill count management in CopyFriendliness when used on corpses.
This commit is contained in:
parent
5b1f0fdc86
commit
ccbebfcf34
1 changed files with 2 additions and 2 deletions
|
@ -803,7 +803,7 @@ DEFINE_ACTION_FUNCTION(AActor, GiveInventoryType)
|
|||
|
||||
void AActor::CopyFriendliness (AActor *other, bool changeTarget, bool resetHealth)
|
||||
{
|
||||
Level->total_monsters -= CountsAsKill();
|
||||
if (health > 0) Level->total_monsters -= CountsAsKill();
|
||||
TIDtoHate = other->TIDtoHate;
|
||||
LastLookActor = other->LastLookActor;
|
||||
LastLookPlayerNumber = other->LastLookPlayerNumber;
|
||||
|
@ -818,7 +818,7 @@ void AActor::CopyFriendliness (AActor *other, bool changeTarget, bool resetHealt
|
|||
LastHeard = target = other->target;
|
||||
}
|
||||
if (resetHealth) health = SpawnHealth();
|
||||
Level->total_monsters += CountsAsKill();
|
||||
if (health > 0) Level->total_monsters += CountsAsKill();
|
||||
}
|
||||
|
||||
DEFINE_ACTION_FUNCTION(AActor, CopyFriendliness)
|
||||
|
|
Loading…
Reference in a new issue