From ff3d3f13c8ada898d5dd344474c9006c47dfa157 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Fri, 10 Mar 2017 14:00:58 -0500 Subject: [PATCH] - Implement hostile coop for -FRIENDLY players. --- src/p_enemy.cpp | 3 --- src/p_mobj.cpp | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/p_enemy.cpp b/src/p_enemy.cpp index cd986b5f2..aca2d8bb0 100644 --- a/src/p_enemy.cpp +++ b/src/p_enemy.cpp @@ -250,9 +250,6 @@ 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; diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 5c7b0ce7b..870b0a8df 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -7273,7 +7273,7 @@ bool AActor::IsTeammate (AActor *other) } else if (!deathmatch && player && other->player) { - return true; + return (!((flags ^ other->flags) & MF_FRIENDLY)); } else if (teamplay) {