1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-31 22:15:33 +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 (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;