- added FDARI's pointer operation submission.

SVN r3167 (trunk)
This commit is contained in:
Christoph Oelckers 2011-03-18 08:02:23 +00:00
commit 820554d636
5 changed files with 348 additions and 23 deletions

View file

@ -770,7 +770,7 @@ bool AActor::GiveAmmo (const PClass *type, int amount)
//
//============================================================================
void AActor::CopyFriendliness (AActor *other, bool changeTarget)
void AActor::CopyFriendliness (AActor *other, bool changeTarget, bool resetHealth)
{
level.total_monsters -= CountsAsKill();
TIDtoHate = other->TIDtoHate;
@ -786,7 +786,7 @@ void AActor::CopyFriendliness (AActor *other, bool changeTarget)
// LastHeard must be set as well so that A_Look can react to the new target if called
LastHeard = target = other->target;
}
health = SpawnHealth();
if (resetHealth) health = SpawnHealth();
level.total_monsters += CountsAsKill();
}