- added SEEINVISIBLE submission.
SVN r3215 (trunk)
This commit is contained in:
parent
81ae38c072
commit
3277b508cd
4 changed files with 26 additions and 18 deletions
|
|
@ -1667,19 +1667,24 @@ bool P_LookForPlayers (AActor *actor, INTBOOL allaround, FLookExParams *params)
|
|||
continue;
|
||||
}
|
||||
|
||||
if ((player->mo->flags & MF_SHADOW && !(i_compatflags & COMPATF_INVISIBILITY)) ||
|
||||
player->mo->flags3 & MF3_GHOST)
|
||||
// [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 ((P_AproxDistance (player->mo->x - actor->x,
|
||||
player->mo->y - actor->y) > 2*MELEERANGE)
|
||||
&& P_AproxDistance (player->mo->velx, player->mo->vely)
|
||||
< 5*FRACUNIT)
|
||||
{ // Player is sneaking - can't detect
|
||||
return false;
|
||||
}
|
||||
if (pr_lookforplayers() < 225)
|
||||
{ // Player isn't sneaking, but still didn't detect
|
||||
return false;
|
||||
if ((player->mo->flags & MF_SHADOW && !(i_compatflags & COMPATF_INVISIBILITY)) ||
|
||||
player->mo->flags3 & MF3_GHOST)
|
||||
{
|
||||
if ((P_AproxDistance (player->mo->x - actor->x,
|
||||
player->mo->y - actor->y) > 2*MELEERANGE)
|
||||
&& P_AproxDistance (player->mo->velx, player->mo->vely)
|
||||
< 5*FRACUNIT)
|
||||
{ // Player is sneaking - can't detect
|
||||
return false;
|
||||
}
|
||||
if (pr_lookforplayers() < 225)
|
||||
{ // Player isn't sneaking, but still didn't detect
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -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.
|
||||
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;
|
||||
}
|
||||
|
|
@ -2846,10 +2851,10 @@ DEFINE_ACTION_FUNCTION(AActor, A_MonsterRail)
|
|||
self->target->x - self->target->velx * 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;
|
||||
}
|
||||
}
|
||||
|
||||
P_RailAttack (self, self->GetMissileDamage (0, 1), 0);
|
||||
self->pitch = saved_pitch;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue