From 4475240da8ff04a4b71af54f2e5e9cc9181b7c97 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Wed, 15 Feb 2023 11:51:48 -0500 Subject: [PATCH] - rename the flags MNOTVISIBLE and VISALWAYSFAIL to MINVISIBLE and MVISBLOCKED respectively, to reflect what they really do --- src/playsim/actor.h | 4 ++-- src/playsim/p_enemy.cpp | 4 ++-- src/playsim/p_mobj.cpp | 2 +- src/playsim/p_sight.cpp | 4 ++-- src/scripting/thingdef_data.cpp | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/playsim/actor.h b/src/playsim/actor.h index f8f0056100..5db2754df0 100644 --- a/src/playsim/actor.h +++ b/src/playsim/actor.h @@ -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. diff --git a/src/playsim/p_enemy.cpp b/src/playsim/p_enemy.cpp index e85b0687fe..89ac8e2104 100644 --- a/src/playsim/p_enemy.cpp +++ b/src/playsim/p_enemy.cpp @@ -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; diff --git a/src/playsim/p_mobj.cpp b/src/playsim/p_mobj.cpp index af416f1949..e6321139a1 100644 --- a/src/playsim/p_mobj.cpp +++ b/src/playsim/p_mobj.cpp @@ -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; diff --git a/src/playsim/p_sight.cpp b/src/playsim/p_sight.cpp index 9855c6ce72..b5564346ae 100644 --- a/src/playsim/p_sight.cpp +++ b/src/playsim/p_sight.cpp @@ -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) diff --git a/src/scripting/thingdef_data.cpp b/src/scripting/thingdef_data.cpp index a276cb2bd0..6ef9fa9ccd 100644 --- a/src/scripting/thingdef_data.cpp +++ b/src/scripting/thingdef_data.cpp @@ -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),