mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-17 10:21:11 +00:00
Merge branch 'undead_intelligence' into 'master'
Make GetCurrentAIPackage return -1 for non-actors and dead actors Closes #6283 See merge request OpenMW/openmw!1221
This commit is contained in:
commit
378b0eefeb
@ -38,6 +38,7 @@
|
|||||||
Bug #6197: Infinite Casting Loop
|
Bug #6197: Infinite Casting Loop
|
||||||
Bug #6273: Respawning NPCs rotation is inconsistent
|
Bug #6273: Respawning NPCs rotation is inconsistent
|
||||||
Bug #6282: Laura craft doesn't follow the player character
|
Bug #6282: Laura craft doesn't follow the player character
|
||||||
|
Bug #6283: Avis Dorsey follows you after her death
|
||||||
Bug #6289: Keyword search in dialogues expected the text to be all ASCII characters
|
Bug #6289: Keyword search in dialogues expected the text to be all ASCII characters
|
||||||
Feature #890: OpenMW-CS: Column filtering
|
Feature #890: OpenMW-CS: Column filtering
|
||||||
Feature #2554: Modifying an object triggers the instances table to scroll to the corresponding record
|
Feature #2554: Modifying an object triggers the instances table to scroll to the corresponding record
|
||||||
|
@ -362,7 +362,15 @@ namespace MWScript
|
|||||||
{
|
{
|
||||||
MWWorld::Ptr ptr = R()(runtime);
|
MWWorld::Ptr ptr = R()(runtime);
|
||||||
|
|
||||||
const auto value = static_cast<Interpreter::Type_Integer>(ptr.getClass().getCreatureStats (ptr).getAiSequence().getLastRunTypeId());
|
Interpreter::Type_Integer value = -1;
|
||||||
|
if(ptr.getClass().isActor())
|
||||||
|
{
|
||||||
|
const auto& stats = ptr.getClass().getCreatureStats(ptr);
|
||||||
|
if(!stats.isDead() || !stats.isDeathAnimationFinished())
|
||||||
|
{
|
||||||
|
value = static_cast<Interpreter::Type_Integer>(stats.getAiSequence().getLastRunTypeId());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
runtime.push (value);
|
runtime.push (value);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user