- fixed: APROP_Friendly did not manage monster counting correctly.

This commit is contained in:
Christoph Oelckers 2014-08-23 13:24:15 +02:00
parent eebd5c9d4d
commit 5364116354

View file

@ -3747,16 +3747,16 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value)
break;
case APROP_Friendly:
if (actor->CountsAsKill()) level.total_monsters--;
if (value)
{
if (actor->CountsAsKill()) level.total_monsters--;
actor->flags |= MF_FRIENDLY;
}
else
{
actor->flags &= ~MF_FRIENDLY;
if (actor->CountsAsKill()) level.total_monsters++;
}
if (actor->CountsAsKill()) level.total_monsters++;
break;