mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-01 03:45:35 +00:00
Disable activation scripts for actors in combat
This commit is contained in:
parent
60aa209144
commit
ed6face4aa
1 changed files with 3 additions and 0 deletions
|
@ -505,6 +505,9 @@ void OMW::Engine::activate()
|
||||||
if (ptr.getClass().getName(ptr) == "") // objects without name presented to user can never be activated
|
if (ptr.getClass().getName(ptr) == "") // objects without name presented to user can never be activated
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (ptr.getClass().isActor() && ptr.getClass().getCreatureStats(ptr).getAiSequence().isInCombat())
|
||||||
|
return;
|
||||||
|
|
||||||
MWBase::Environment::get().getWorld()->activate(ptr, MWBase::Environment::get().getWorld()->getPlayerPtr());
|
MWBase::Environment::get().getWorld()->activate(ptr, MWBase::Environment::get().getWorld()->getPlayerPtr());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue