- fixed: Explosions directly under a water surface would not hurt any actor directly above this surface.
- cleaned up P_CheckSight flag handling. SVN r2249 (trunk)
This commit is contained in:
parent
e83a9a2a00
commit
a357a70f82
8 changed files with 56 additions and 42 deletions
|
|
@ -198,16 +198,16 @@ void P_RecursiveSound (sector_t *sec, AActor *soundtarget, bool splash, int soun
|
|||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
void P_NoiseAlert (AActor *target, AActor *emmiter, bool splash)
|
||||
void P_NoiseAlert (AActor *target, AActor *emitter, bool splash)
|
||||
{
|
||||
if (emmiter == NULL)
|
||||
if (emitter == NULL)
|
||||
return;
|
||||
|
||||
if (target != NULL && target->player && (target->player->cheats & CF_NOTARGET))
|
||||
return;
|
||||
|
||||
validcount++;
|
||||
P_RecursiveSound (emmiter->Sector, target, splash, 0);
|
||||
P_RecursiveSound (emitter->Sector, target, splash, 0);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -308,7 +308,7 @@ bool P_CheckMissileRange (AActor *actor)
|
|||
{
|
||||
fixed_t dist;
|
||||
|
||||
if (!P_CheckSight (actor, actor->target, 4))
|
||||
if (!P_CheckSight (actor, actor->target, SF_SEEPASTBLOCKEVERYTHING|SF_SEEPASTSHOOTABLELINES))
|
||||
return false;
|
||||
|
||||
if (actor->flags & MF_JUSTHIT)
|
||||
|
|
@ -1136,7 +1136,7 @@ bool P_IsVisible(AActor *lookee, AActor *other, INTBOOL allaround, FLookExParams
|
|||
}
|
||||
|
||||
// P_CheckSight is by far the most expensive operation in here so let's do it last.
|
||||
return P_CheckSight(lookee, other, 2);
|
||||
return P_CheckSight(lookee, other, SF_SEEPASTBLOCKEVERYTHING);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
@ -1154,7 +1154,7 @@ bool P_LookForMonsters (AActor *actor)
|
|||
AActor *mo;
|
||||
TThinkerIterator<AActor> iterator;
|
||||
|
||||
if (!P_CheckSight (players[0].mo, actor, 2))
|
||||
if (!P_CheckSight (players[0].mo, actor, SF_SEEPASTBLOCKEVERYTHING))
|
||||
{ // Player can't see monster
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1183,7 +1183,7 @@ bool P_LookForMonsters (AActor *actor)
|
|||
{ // [RH] Don't go after same species
|
||||
continue;
|
||||
}
|
||||
if (!P_CheckSight (actor, mo, 2))
|
||||
if (!P_CheckSight (actor, mo, SF_SEEPASTBLOCKEVERYTHING))
|
||||
{ // Out of sight
|
||||
continue;
|
||||
}
|
||||
|
|
@ -1764,7 +1764,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Look)
|
|||
|
||||
if (self->flags & MF_AMBUSH)
|
||||
{
|
||||
if (P_CheckSight (self, self->target, 2))
|
||||
if (P_CheckSight (self, self->target, SF_SEEPASTBLOCKEVERYTHING))
|
||||
goto seeyou;
|
||||
}
|
||||
else
|
||||
|
|
@ -1931,7 +1931,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_LookEx)
|
|||
{
|
||||
dist = P_AproxDistance (self->target->x - self->x,
|
||||
self->target->y - self->y);
|
||||
if (P_CheckSight (self, self->target, 2) &&
|
||||
if (P_CheckSight (self, self->target, SF_SEEPASTBLOCKEVERYTHING) &&
|
||||
(!minseedist || dist > minseedist) &&
|
||||
(!maxseedist || dist < maxseedist))
|
||||
{
|
||||
|
|
@ -2062,7 +2062,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Look2)
|
|||
{
|
||||
if (self->flags & MF_AMBUSH)
|
||||
{
|
||||
if (!P_CheckSight (self, targ, 2))
|
||||
if (!P_CheckSight (self, targ, SF_SEEPASTBLOCKEVERYTHING))
|
||||
goto nosee;
|
||||
}
|
||||
self->target = targ;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue