1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-03-04 07:19:43 +00:00

Don't use bitwise AND

This commit is contained in:
Capostrophic 2018-11-07 19:41:28 +03:00
parent 39f8637e95
commit 4cb4f82431

View file

@ -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 any of the above conditions turned actor1 aggressive towards actor2, do an awareness check. If it passes, start combat with actor2.
if (aggressive) if (aggressive)
{ {
bool LOS = MWBase::Environment::get().getWorld()->getLOS(actor1, actor2); bool LOS = MWBase::Environment::get().getWorld()->getLOS(actor1, actor2)
LOS &= MWBase::Environment::get().getMechanicsManager()->awarenessCheck(actor2, actor1); && MWBase::Environment::get().getMechanicsManager()->awarenessCheck(actor2, actor1);
if (LOS) if (LOS)
MWBase::Environment::get().getMechanicsManager()->startCombat(actor1, actor2); MWBase::Environment::get().getMechanicsManager()->startCombat(actor1, actor2);
@ -1205,8 +1205,8 @@ namespace MWMechanics
if (neighbor == actor) if (neighbor == actor)
continue; continue;
bool result = MWBase::Environment::get().getWorld()->getLOS(neighbor, actor); bool result = MWBase::Environment::get().getWorld()->getLOS(neighbor, actor)
result &= MWBase::Environment::get().getMechanicsManager()->awarenessCheck(actor, neighbor); && MWBase::Environment::get().getMechanicsManager()->awarenessCheck(actor, neighbor);
if (result) if (result)
return true; return true;