From 4cb4f82431df63dc9ee96eae0f8c20aeb5297842 Mon Sep 17 00:00:00 2001 From: Capostrophic Date: Wed, 7 Nov 2018 19:41:28 +0300 Subject: [PATCH] Don't use bitwise AND --- apps/openmw/mwmechanics/actors.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp index 4d87637a5b..87338c9121 100644 --- a/apps/openmw/mwmechanics/actors.cpp +++ b/apps/openmw/mwmechanics/actors.cpp @@ -491,8 +491,8 @@ namespace MWMechanics // If any of the above conditions turned actor1 aggressive towards actor2, do an awareness check. If it passes, start combat with actor2. if (aggressive) { - bool LOS = MWBase::Environment::get().getWorld()->getLOS(actor1, actor2); - LOS &= MWBase::Environment::get().getMechanicsManager()->awarenessCheck(actor2, actor1); + bool LOS = MWBase::Environment::get().getWorld()->getLOS(actor1, actor2) + && MWBase::Environment::get().getMechanicsManager()->awarenessCheck(actor2, actor1); if (LOS) MWBase::Environment::get().getMechanicsManager()->startCombat(actor1, actor2); @@ -1205,8 +1205,8 @@ namespace MWMechanics if (neighbor == actor) continue; - bool result = MWBase::Environment::get().getWorld()->getLOS(neighbor, actor); - result &= MWBase::Environment::get().getMechanicsManager()->awarenessCheck(actor, neighbor); + bool result = MWBase::Environment::get().getWorld()->getLOS(neighbor, actor) + && MWBase::Environment::get().getMechanicsManager()->awarenessCheck(actor, neighbor); if (result) return true;