- Sync scriptbranch with trunk.

SVN r2269 (scripting)
This commit is contained in:
Randy Heit 2010-04-04 04:09:24 +00:00
commit 42ac75e894
127 changed files with 2532 additions and 958 deletions

View file

@ -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;
}
@ -1178,11 +1178,11 @@ bool P_LookForMonsters (AActor *actor)
{ // Stop searching
return false;
}
if (mo->IsKindOf (actor->GetClass()) || actor->IsKindOf (mo->GetClass()))
if (mo->GetSpecies() == actor->GetSpecies())
{ // [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;
}
@ -1765,7 +1765,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
@ -1933,7 +1933,7 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_LookEx)
if (self->flags & MF_AMBUSH)
{
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))
{
@ -2070,7 +2070,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;
@ -2745,7 +2745,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_MonsterRail)
self->target->x,
self->target->y);
self->pitch = P_AimLineAttack (self, self->angle, MISSILERANGE, &linetarget, ANGLE_1*60, false, false, false, self->target);
self->pitch = P_AimLineAttack (self, self->angle, MISSILERANGE, &linetarget, ANGLE_1*60, 0, self->target);
if (linetarget == NULL)
{
// We probably won't hit the target, but aim at it anyway so we don't look stupid.