mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-31 04:20:34 +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)
|
if (emitter == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
/*if (target != NULL && target->player && !(target->flags & MF_FRIENDLY))
|
||||||
|
return;*/
|
||||||
|
|
||||||
if (target != NULL && target->player && (target->player->cheats & CF_NOTARGET))
|
if (target != NULL && target->player && (target->player->cheats & CF_NOTARGET))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1883,6 +1886,9 @@ bool P_LookForPlayers (AActor *actor, INTBOOL allaround, FLookExParams *params)
|
||||||
if (!(player->mo->flags & MF_SHOOTABLE))
|
if (!(player->mo->flags & MF_SHOOTABLE))
|
||||||
continue; // not shootable (observer or dead)
|
continue; // not shootable (observer or dead)
|
||||||
|
|
||||||
|
if (!((actor->flags ^ player->mo->flags) & MF_FRIENDLY))
|
||||||
|
continue; // same +MF_FRIENDLY, ignore
|
||||||
|
|
||||||
if (player->cheats & CF_NOTARGET)
|
if (player->cheats & CF_NOTARGET)
|
||||||
continue; // no target
|
continue; // no target
|
||||||
|
|
||||||
|
@ -1982,7 +1988,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_Look)
|
||||||
targ = NULL;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7354,6 +7354,9 @@ bool AActor::IsFriend (AActor *other)
|
||||||
other->FriendPlayer == 0 ||
|
other->FriendPlayer == 0 ||
|
||||||
players[FriendPlayer-1].mo->IsTeammate(players[other->FriendPlayer-1].mo);
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue