mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 12:39:55 +00:00
Head tracking: don't look at dead actors
This commit is contained in:
parent
8a210c49e9
commit
105f0f8716
@ -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…
x
Reference in New Issue
Block a user