mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- add +VISALWAYSFAIL flag
This commit is contained in:
parent
8af2f5aaf6
commit
45f67bdd50
4 changed files with 8 additions and 1 deletions
|
@ -414,6 +414,7 @@ enum ActorFlag8
|
|||
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_ALLOWTHRUBITS = 0x00008000, // [MC] Enable ThruBits property
|
||||
MF8_FULLVOLSEE = 0x00010000, // Play see sound at full volume
|
||||
MF8_E1M8BOSS = 0x00020000, // MBF21 boss death.
|
||||
|
|
|
@ -1252,7 +1252,7 @@ int P_IsVisible(AActor *lookee, AActor *other, INTBOOL allaround, FLookExParams
|
|||
double mindist;
|
||||
DAngle fov;
|
||||
|
||||
if (other == nullptr)
|
||||
if (other == nullptr || (other->flags8 & MF8_VISALWAYSFAIL))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -849,6 +849,11 @@ int P_CheckSight (AActor *t1, AActor *t2, int flags)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (t2->flags8 & MF8_VISALWAYSFAIL)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
auto s1 = t1->Sector;
|
||||
auto s2 = t2->Sector;
|
||||
//
|
||||
|
|
|
@ -327,6 +327,7 @@ static FFlagDef ActorFlagDefs[]=
|
|||
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, ABSVIEWANGLES, AActor, flags8),
|
||||
DEFINE_FLAG(MF8, ALLOWTHRUBITS, AActor, flags8),
|
||||
DEFINE_FLAG(MF8, FULLVOLSEE, AActor, flags8),
|
||||
|
|
Loading…
Reference in a new issue