mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-16 21:29:56 +00:00
getActorsFollowing/Fighting no longer returns dead actors
This commit is contained in:
parent
5e7cd806c4
commit
c2b692e124
1 changed files with 2 additions and 2 deletions
|
@ -1029,7 +1029,7 @@ namespace MWMechanics
|
||||||
const MWWorld::Class &cls = MWWorld::Class::get(iter->first);
|
const MWWorld::Class &cls = MWWorld::Class::get(iter->first);
|
||||||
CreatureStats &stats = cls.getCreatureStats(iter->first);
|
CreatureStats &stats = cls.getCreatureStats(iter->first);
|
||||||
|
|
||||||
if(stats.getAiSequence().getTypeId() == AiPackage::TypeIdFollow)
|
if(stats.getAiSequence().getTypeId() == AiPackage::TypeIdFollow && !stats.isDead())
|
||||||
{
|
{
|
||||||
MWMechanics::AiFollow* package = static_cast<MWMechanics::AiFollow*>(stats.getAiSequence().getActivePackage());
|
MWMechanics::AiFollow* package = static_cast<MWMechanics::AiFollow*>(stats.getAiSequence().getActivePackage());
|
||||||
if(package->getFollowedActor() == actor.getCellRef().mRefID)
|
if(package->getFollowedActor() == actor.getCellRef().mRefID)
|
||||||
|
@ -1051,7 +1051,7 @@ namespace MWMechanics
|
||||||
const MWWorld::Class &cls = MWWorld::Class::get(*iter);
|
const MWWorld::Class &cls = MWWorld::Class::get(*iter);
|
||||||
CreatureStats &stats = cls.getCreatureStats(*iter);
|
CreatureStats &stats = cls.getCreatureStats(*iter);
|
||||||
|
|
||||||
if(stats.getAiSequence().getTypeId() == AiPackage::TypeIdCombat)
|
if(stats.getAiSequence().getTypeId() == AiPackage::TypeIdCombat && !stats.isDead())
|
||||||
{
|
{
|
||||||
MWMechanics::AiCombat* package = static_cast<MWMechanics::AiCombat*>(stats.getAiSequence().getActivePackage());
|
MWMechanics::AiCombat* package = static_cast<MWMechanics::AiCombat*>(stats.getAiSequence().getActivePackage());
|
||||||
if(package->getTargetId() == actor.getCellRef().mRefID)
|
if(package->getTargetId() == actor.getCellRef().mRefID)
|
||||||
|
|
Loading…
Reference in a new issue