mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +00:00
Head tracking: don't look at dead actors
This commit is contained in:
parent
8a210c49e9
commit
105f0f8716
1 changed files with 3 additions and 0 deletions
|
@ -293,6 +293,9 @@ namespace MWMechanics
|
|||
if (sqrDist > maxDistance*maxDistance)
|
||||
return;
|
||||
|
||||
if (targetActor.getClass().getCreatureStats(targetActor).isDead())
|
||||
return;
|
||||
|
||||
// stop tracking when target is behind the actor
|
||||
Ogre::Vector3 actorDirection (actor.getRefData().getBaseNode()->getOrientation().yAxis());
|
||||
Ogre::Vector3 targetDirection (Ogre::Vector3(actor2Pos.pos) - Ogre::Vector3(actor1Pos.pos));
|
||||
|
|
Loading…
Reference in a new issue