Skip to content

Commit

Permalink
- rename the flags MNOTVISIBLE and VISALWAYSFAIL to MINVISIBLE and MV…
Browse files Browse the repository at this point in the history
…ISBLOCKED respectively, to reflect what they really do
  • Loading branch information
madame-rachelle committed Feb 15, 2023
1 parent ee18123 commit 4475240
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/playsim/actor.h
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions src/playsim/p_enemy.cpp
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/playsim/p_mobj.cpp
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/playsim/p_sight.cpp
Expand Up @@ -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;
}
Expand All @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/scripting/thingdef_data.cpp
Expand Up @@ -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),
Expand Down

0 comments on commit 4475240

Please sign in to comment.