mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 15:15:31 +00:00
Use correct direction multipliers during awareness check
This commit is contained in:
parent
215567c9c3
commit
5b3ac5ff27
1 changed files with 1 additions and 1 deletions
|
@ -1435,7 +1435,7 @@ namespace MWMechanics
|
||||||
osg::Vec3f observerDir = (observer.getRefData().getBaseNode()->getAttitude() * osg::Vec3f(0,1,0));
|
osg::Vec3f observerDir = (observer.getRefData().getBaseNode()->getAttitude() * osg::Vec3f(0,1,0));
|
||||||
|
|
||||||
float angleRadians = std::acos(observerDir * vec / (observerDir.length() * vec.length()));
|
float angleRadians = std::acos(observerDir * vec / (observerDir.length() * vec.length()));
|
||||||
if (angleRadians < osg::DegreesToRadians(90.f))
|
if (angleRadians > osg::DegreesToRadians(90.f))
|
||||||
y = obsTerm * observerStats.getFatigueTerm() * fSneakNoViewMult;
|
y = obsTerm * observerStats.getFatigueTerm() * fSneakNoViewMult;
|
||||||
else
|
else
|
||||||
y = obsTerm * observerStats.getFatigueTerm() * fSneakViewMult;
|
y = obsTerm * observerStats.getFatigueTerm() * fSneakViewMult;
|
||||||
|
|
Loading…
Reference in a new issue