mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- Added PinkSilver's A_LookEx fix.
SVN r1828 (trunk)
This commit is contained in:
parent
4a057c1fdc
commit
923bf08cdc
3 changed files with 36 additions and 27 deletions
|
@ -1,4 +1,5 @@
|
|||
September 14, 2009 (Changes by Graf Zahl)
|
||||
- Added PinkSilver's A_LookEx fix.
|
||||
- added resources needed for MBF support.
|
||||
- removed unused score items from DECORATE file.
|
||||
- Fixed: Argument count for UsePuzzleItem was wrong.
|
||||
|
|
|
@ -782,12 +782,12 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_LookEx)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targ && targ->player && (targ->player->cheats & CF_NOTARGET))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (targ && targ->player && (targ->player->cheats & CF_NOTARGET))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// [RH] Andy Baker's stealth monsters
|
||||
|
@ -811,36 +811,40 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_LookEx)
|
|||
}
|
||||
|
||||
// Let the self wander around aimlessly looking for a fight
|
||||
if (self->SeeState != NULL)
|
||||
{
|
||||
if (!(self->flags & MF_INCHASE))
|
||||
{
|
||||
if (seestate)
|
||||
{
|
||||
self->SetState (seestate);
|
||||
}
|
||||
else
|
||||
{
|
||||
self->SetState (self->SeeState);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CALL_ACTION(A_Wander, self);
|
||||
}
|
||||
if (!(self->flags & MF_INCHASE))
|
||||
{
|
||||
if (seestate)
|
||||
{
|
||||
self->SetState (seestate);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (self->SeeState != NULL)
|
||||
{
|
||||
self->SetState (self->SeeState);
|
||||
}
|
||||
else
|
||||
{
|
||||
CALL_ACTION(A_Wander, self);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
self->target = targ; //We already have a target?
|
||||
|
||||
// [KS] The target can become ourselves in rare circumstances (like
|
||||
// if we committed suicide), so if that's the case, just ignore it.
|
||||
if (self->target == self) self->target = NULL;
|
||||
|
||||
if (targ != NULL)
|
||||
if (self->target != NULL)
|
||||
{
|
||||
if (self->flags & MF_AMBUSH)
|
||||
{
|
||||
dist = P_AproxDistance (targ->x - self->x,
|
||||
targ->y - self->y);
|
||||
dist = P_AproxDistance (self->target->x - self->x,
|
||||
self->target->y - self->y);
|
||||
if (P_CheckSight (self, self->target, 2) &&
|
||||
(!minseedist || dist > minseedist) &&
|
||||
(!maxseedist || dist < maxseedist))
|
||||
|
|
|
@ -2139,6 +2139,10 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Respawn)
|
|||
{
|
||||
AActor *defs = self->GetDefault();
|
||||
self->health = defs->health;
|
||||
|
||||
// [KS] Don't keep target, because it could be self if the monster committed suicide
|
||||
self->target = NULL;
|
||||
self->LastHeard = NULL;
|
||||
|
||||
self->flags = (defs->flags & ~MF_FRIENDLY) | (self->flags & MF_FRIENDLY);
|
||||
self->flags2 = defs->flags2;
|
||||
|
|
Loading…
Reference in a new issue