mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- add +mnotvisible flag as per feature suggestion: https://forum.zdoom.org/viewtopic.php?t=77277
This commit is contained in:
parent
ea720605d4
commit
8af2f5aaf6
5 changed files with 8 additions and 2 deletions
|
@ -413,6 +413,7 @@ 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_ALLOWTHRUBITS = 0x00008000, // [MC] Enable ThruBits property
|
||||
MF8_FULLVOLSEE = 0x00010000, // Play see sound at full volume
|
||||
MF8_E1M8BOSS = 0x00020000, // MBF21 boss death.
|
||||
|
|
|
@ -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->renderflags & RF_INVISIBLE) || (actor->target->flags8 & MF8_MNOTVISIBLE)) &&
|
||||
actor->target != actor->goal)
|
||||
{
|
||||
actor->target = nullptr;
|
||||
|
|
|
@ -1681,6 +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->RenderStyle.IsVisible(target->Alpha)
|
||||
)
|
||||
) return false;
|
||||
|
|
|
@ -866,7 +866,10 @@ sightcounts[0]++;
|
|||
//
|
||||
// [RH] Andy Baker's stealth monsters:
|
||||
// Cannot see an invisible object
|
||||
if ((flags & SF_IGNOREVISIBILITY) == 0 && ((t2->renderflags & RF_INVISIBLE) || !t2->RenderStyle.IsVisible(t2->Alpha)))
|
||||
if ((flags & SF_IGNOREVISIBILITY) == 0 &&
|
||||
((t2->renderflags & RF_INVISIBLE) ||
|
||||
(t2->flags8 & MF8_MNOTVISIBLE) ||
|
||||
!t2->RenderStyle.IsVisible(t2->Alpha)))
|
||||
{ // small chance of an attack being made anyway
|
||||
if ((t1->Level->BotInfo.m_Thinking ? pr_botchecksight() : pr_checksight()) > 50)
|
||||
{
|
||||
|
|
|
@ -326,6 +326,7 @@ 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, ABSVIEWANGLES, AActor, flags8),
|
||||
DEFINE_FLAG(MF8, ALLOWTHRUBITS, AActor, flags8),
|
||||
DEFINE_FLAG(MF8, FULLVOLSEE, AActor, flags8),
|
||||
|
|
Loading…
Reference in a new issue