mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-25 13:31:07 +00:00
- Monsters no longer search for players who are unfriendly.
This commit is contained in:
parent
93a6e4bc94
commit
786c4f01c8
2 changed files with 10 additions and 1 deletions
|
@ -250,6 +250,9 @@ void P_NoiseAlert (AActor *target, AActor *emitter, bool splash, double maxdist)
|
|||
if (emitter == NULL)
|
||||
return;
|
||||
|
||||
/*if (target != NULL && target->player && !(target->flags & MF_FRIENDLY))
|
||||
return;*/
|
||||
|
||||
if (target != NULL && target->player && (target->player->cheats & CF_NOTARGET))
|
||||
return;
|
||||
|
||||
|
@ -1883,6 +1886,9 @@ bool P_LookForPlayers (AActor *actor, INTBOOL allaround, FLookExParams *params)
|
|||
if (!(player->mo->flags & MF_SHOOTABLE))
|
||||
continue; // not shootable (observer or dead)
|
||||
|
||||
if (!((actor->flags ^ player->mo->flags) & MF_FRIENDLY))
|
||||
continue; // same +MF_FRIENDLY, ignore
|
||||
|
||||
if (player->cheats & CF_NOTARGET)
|
||||
continue; // no target
|
||||
|
||||
|
@ -1982,7 +1988,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Look)
|
|||
targ = NULL;
|
||||
}
|
||||
|
||||
if (targ && targ->player && (targ->player->cheats & CF_NOTARGET))
|
||||
if (targ && targ->player && ((targ->player->cheats & CF_NOTARGET) || !(targ->flags & MF_FRIENDLY)))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -7354,6 +7354,9 @@ bool AActor::IsFriend (AActor *other)
|
|||
other->FriendPlayer == 0 ||
|
||||
players[FriendPlayer-1].mo->IsTeammate(players[other->FriendPlayer-1].mo);
|
||||
}
|
||||
// [SP] If friendly flags match, then they are on the same team.
|
||||
/*if (!((flags ^ other->flags) & MF_FRIENDLY))
|
||||
return true;*/
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue