- rename the flags MNOTVISIBLE and VISALWAYSFAIL to MINVISIBLE and MVISBLOCKED respectively, to reflect what they really do

This commit is contained in:
Rachael Alexanderson 2023-02-15 11:51:48 -05:00
parent ee18123f01
commit 4475240da8
5 changed files with 9 additions and 9 deletions

View file

@ -413,8 +413,8 @@ enum ActorFlag8
MF8_STOPRAILS = 0x00000200, // [MC] Prevent rails from going further if an actor has this flag.
MF8_ABSVIEWANGLES = 0x00000400, // [MC] By default view angle/pitch/roll is an offset. This will make it absolute instead.
MF8_FALLDAMAGE = 0x00000800, // Monster will take fall damage regardless of map settings.
MF8_MNOTVISIBLE = 0x00001000, // Actor not visible to monsters
MF8_VISALWAYSFAIL = 0x00002000, // Sight checks to actor always fail
MF8_MINVISIBLE = 0x00001000, // Actor not visible to monsters
MF8_MVISBLOCKED = 0x00002000, // Monster(only) sight checks to actor always fail
MF8_ALLOWTHRUBITS = 0x00008000, // [MC] Enable ThruBits property
MF8_FULLVOLSEE = 0x00010000, // Play see sound at full volume
MF8_E1M8BOSS = 0x00020000, // MBF21 boss death.

View file

@ -1252,7 +1252,7 @@ int P_IsVisible(AActor *lookee, AActor *other, INTBOOL allaround, FLookExParams
double mindist;
DAngle fov;
if (other == nullptr || (other->flags8 & MF8_VISALWAYSFAIL))
if (other == nullptr || (other->flags8 & MF8_MVISBLOCKED))
{
return false;
}
@ -2344,7 +2344,7 @@ void A_DoChase (AActor *actor, bool fastchase, FState *meleestate, FState *missi
// [RH] Don't chase invisible targets
if (actor->target != NULL &&
((actor->target->renderflags & RF_INVISIBLE) || (actor->target->flags8 & MF8_MNOTVISIBLE)) &&
((actor->target->renderflags & RF_INVISIBLE) || (actor->target->flags8 & MF8_MINVISIBLE)) &&
actor->target != actor->goal)
{
actor->target = nullptr;

View file

@ -1681,7 +1681,7 @@ bool AActor::CanSeek(AActor *target) const
if ((flags2 & MF2_DONTSEEKINVISIBLE) &&
((target->flags & MF_SHADOW) ||
(target->renderflags & RF_INVISIBLE) ||
(target->flags8 & MF8_MNOTVISIBLE) ||
(target->flags8 & MF8_MINVISIBLE) ||
!target->RenderStyle.IsVisible(target->Alpha)
)
) return false;

View file

@ -849,7 +849,7 @@ int P_CheckSight (AActor *t1, AActor *t2, int flags)
return false;
}
if ((t2->flags8 & MF8_VISALWAYSFAIL) && !(flags & SF_IGNOREVISIBILITY))
if ((t2->flags8 & MF8_MVISBLOCKED) && !(flags & SF_IGNOREVISIBILITY))
{
return false;
}
@ -873,7 +873,7 @@ sightcounts[0]++;
// Cannot see an invisible object
if ((flags & SF_IGNOREVISIBILITY) == 0 &&
((t2->renderflags & RF_INVISIBLE) ||
(t2->flags8 & MF8_MNOTVISIBLE) ||
(t2->flags8 & MF8_MINVISIBLE) ||
!t2->RenderStyle.IsVisible(t2->Alpha)))
{ // small chance of an attack being made anyway
if ((t1->Level->BotInfo.m_Thinking ? pr_botchecksight() : pr_checksight()) > 50)

View file

@ -326,8 +326,8 @@ static FFlagDef ActorFlagDefs[]=
DEFINE_FLAG(MF8, RETARGETAFTERSLAM, AActor, flags8),
DEFINE_FLAG(MF8, STOPRAILS, AActor, flags8),
DEFINE_FLAG(MF8, FALLDAMAGE, AActor, flags8),
DEFINE_FLAG(MF8, MNOTVISIBLE, AActor, flags8),
DEFINE_FLAG(MF8, VISALWAYSFAIL, AActor, flags8),
DEFINE_FLAG(MF8, MINVISIBLE, AActor, flags8),
DEFINE_FLAG(MF8, MVISBLOCKED, AActor, flags8),
DEFINE_FLAG(MF8, ABSVIEWANGLES, AActor, flags8),
DEFINE_FLAG(MF8, ALLOWTHRUBITS, AActor, flags8),
DEFINE_FLAG(MF8, FULLVOLSEE, AActor, flags8),