mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 07:12:02 +00:00
- added SEEINVISIBLE submission.
SVN r3215 (trunk)
This commit is contained in:
parent
81ae38c072
commit
3277b508cd
4 changed files with 25 additions and 17 deletions
|
@ -326,6 +326,7 @@ enum
|
||||||
MF6_ADDITIVEPOISONDURATION = 0x00200000,
|
MF6_ADDITIVEPOISONDURATION = 0x00200000,
|
||||||
MF6_NOMENU = 0x00400000, // Player class should not appear in the class selection menu.
|
MF6_NOMENU = 0x00400000, // Player class should not appear in the class selection menu.
|
||||||
MF6_BOSSCUBE = 0x00800000, // Actor spawned by A_BrainSpit, flagged for timefreeze reasons.
|
MF6_BOSSCUBE = 0x00800000, // Actor spawned by A_BrainSpit, flagged for timefreeze reasons.
|
||||||
|
MF6_SEEINVISIBLE = 0x01000000, // Monsters can see invisible player.
|
||||||
|
|
||||||
// --- mobj.renderflags ---
|
// --- mobj.renderflags ---
|
||||||
|
|
||||||
|
|
|
@ -1667,6 +1667,10 @@ bool P_LookForPlayers (AActor *actor, INTBOOL allaround, FLookExParams *params)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// [RC] Well, let's let special monsters with this flag active be able to see
|
||||||
|
// the player then, eh?
|
||||||
|
if(!(actor->flags & MF6_SEEINVISIBLE))
|
||||||
|
{
|
||||||
if ((player->mo->flags & MF_SHADOW && !(i_compatflags & COMPATF_INVISIBILITY)) ||
|
if ((player->mo->flags & MF_SHADOW && !(i_compatflags & COMPATF_INVISIBILITY)) ||
|
||||||
player->mo->flags3 & MF3_GHOST)
|
player->mo->flags3 & MF3_GHOST)
|
||||||
{
|
{
|
||||||
|
@ -1682,6 +1686,7 @@ bool P_LookForPlayers (AActor *actor, INTBOOL allaround, FLookExParams *params)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// [RH] Need to be sure the reactiontime is 0 if the monster is
|
// [RH] Need to be sure the reactiontime is 0 if the monster is
|
||||||
// leaving its goal to go after a player.
|
// leaving its goal to go after a player.
|
||||||
|
@ -2757,7 +2762,7 @@ void A_Face (AActor *self, AActor *other, angle_t max_turn)
|
||||||
}
|
}
|
||||||
|
|
||||||
// This will never work well if the turn angle is limited.
|
// This will never work well if the turn angle is limited.
|
||||||
if (max_turn == 0 && (self->angle == other_angle) && other->flags & MF_SHADOW)
|
if (max_turn == 0 && (self->angle == other_angle) && other->flags & MF_SHADOW && !(self->flags6 & MF6_SEEINVISIBLE) )
|
||||||
{
|
{
|
||||||
self->angle += pr_facetarget.Random2() << 21;
|
self->angle += pr_facetarget.Random2() << 21;
|
||||||
}
|
}
|
||||||
|
@ -2846,7 +2851,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MonsterRail)
|
||||||
self->target->x - self->target->velx * 3,
|
self->target->x - self->target->velx * 3,
|
||||||
self->target->y - self->target->vely * 3);
|
self->target->y - self->target->vely * 3);
|
||||||
|
|
||||||
if (self->target->flags & MF_SHADOW)
|
if (self->target->flags & MF_SHADOW && !(self->flags6 & MF6_SEEINVISIBLE))
|
||||||
{
|
{
|
||||||
self->angle += pr_railface.Random2() << 21;
|
self->angle += pr_railface.Random2() << 21;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5071,7 +5071,8 @@ AActor *P_SpawnMissileXYZ (fixed_t x, fixed_t y, fixed_t z,
|
||||||
th->velz = (fixed_t)(velocity.Z);
|
th->velz = (fixed_t)(velocity.Z);
|
||||||
|
|
||||||
// invisible target: rotate velocity vector in 2D
|
// invisible target: rotate velocity vector in 2D
|
||||||
if (dest->flags & MF_SHADOW)
|
// [RC] Now monsters can aim at invisible player as if they were fully visible.
|
||||||
|
if (dest->flags & MF_SHADOW && !(source->flags6 & MF6_SEEINVISIBLE))
|
||||||
{
|
{
|
||||||
angle_t an = pr_spawnmissile.Random2 () << 20;
|
angle_t an = pr_spawnmissile.Random2 () << 20;
|
||||||
an >>= ANGLETOFINESHIFT;
|
an >>= ANGLETOFINESHIFT;
|
||||||
|
|
|
@ -229,6 +229,7 @@ static FFlagDef ActorFlags[]=
|
||||||
DEFINE_FLAG(MF6, ADDITIVEPOISONDURATION, AActor, flags6),
|
DEFINE_FLAG(MF6, ADDITIVEPOISONDURATION, AActor, flags6),
|
||||||
DEFINE_FLAG(MF6, BLOCKEDBYSOLIDACTORS, AActor, flags6),
|
DEFINE_FLAG(MF6, BLOCKEDBYSOLIDACTORS, AActor, flags6),
|
||||||
DEFINE_FLAG(MF6, NOMENU, AActor, flags6),
|
DEFINE_FLAG(MF6, NOMENU, AActor, flags6),
|
||||||
|
DEFINE_FLAG(MF6, SEEINVISIBLE, AActor, flags6),
|
||||||
|
|
||||||
// Effect flags
|
// Effect flags
|
||||||
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
DEFINE_FLAG(FX, VISIBILITYPULSE, AActor, effects),
|
||||||
|
|
Loading…
Reference in a new issue