Add 'BF_ONLYVISIBLETHINGS' Flag to A_Blast

Adds 'BF_ONLYVISIBLETHINGS' flag to A_Blast, and enables A_Blast to only affect actors that have a line of sight to calling actor.
This commit is contained in:
Kaelan 2021-07-20 22:56:41 -06:00 committed by Rachael Alexanderson
parent 1eeee98b65
commit 65d9d83ddd
2 changed files with 6 additions and 0 deletions

View file

@ -148,6 +148,11 @@ extend class Actor
// in another region and cannot be seen.
continue;
}
if ((blastflags & BF_ONLYVISIBLETHINGS) && !isVisible(mo, true))
{
//only blast if target can bee seen by calling actor
continue;
}
BlastActor (mo, strength, speed, blasteffect, !!(blastflags & BF_NOIMPACTDAMAGE));
}
}

View file

@ -285,6 +285,7 @@ enum EBlastFlags
BF_DONTWARN = 2,
BF_AFFECTBOSSES = 4,
BF_NOIMPACTDAMAGE = 8,
BF_ONLYVISIBLETHINGS = 16;
};
// Flags for A_SeekerMissile