|
|
@ -1232,13 +1232,17 @@ namespace MWMechanics
|
|
|
|
float sqrHeadTrackDistance = std::numeric_limits<float>::max();
|
|
|
|
float sqrHeadTrackDistance = std::numeric_limits<float>::max();
|
|
|
|
MWWorld::Ptr headTrackTarget;
|
|
|
|
MWWorld::Ptr headTrackTarget;
|
|
|
|
|
|
|
|
|
|
|
|
for(PtrActorMap::iterator it(mActors.begin()); it != mActors.end(); ++it)
|
|
|
|
// Unconsious actor can not track target
|
|
|
|
|
|
|
|
if (!iter->first.getClass().getCreatureStats(iter->first).getKnockedDown())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (it->first == iter->first)
|
|
|
|
for(PtrActorMap::iterator it(mActors.begin()); it != mActors.end(); ++it)
|
|
|
|
continue;
|
|
|
|
{
|
|
|
|
updateHeadTracking(iter->first, it->first, headTrackTarget, sqrHeadTrackDistance);
|
|
|
|
if (it->first == iter->first)
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
updateHeadTracking(iter->first, it->first, headTrackTarget, sqrHeadTrackDistance);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
iter->second->getCharacterController()->setHeadTrackTarget(headTrackTarget);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
iter->second->getCharacterController()->setHeadTrackTarget(headTrackTarget);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (iter->first.getClass().isNpc() && iter->first != player)
|
|
|
|
if (iter->first.getClass().isNpc() && iter->first != player)
|
|
|
|