mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-22 20:09:43 +00:00
Avoid retrieving setting every frame
This commit is contained in:
parent
5caf53b6a3
commit
6f4c03aa32
1 changed files with 2 additions and 1 deletions
|
@ -358,7 +358,8 @@ namespace MWMechanics
|
||||||
}
|
}
|
||||||
|
|
||||||
// If set in the settings file, player followers and escorters will become aggressive toward enemies in combat with them or the player
|
// If set in the settings file, player followers and escorters will become aggressive toward enemies in combat with them or the player
|
||||||
if (!aggressive && isPlayerFollowerOrEscorter && Settings::Manager::getBool("followers attack on sight", "Game"))
|
static const bool followersAttackOnSight = Settings::Manager::getBool("followers attack on sight", "Game");
|
||||||
|
if (!aggressive && isPlayerFollowerOrEscorter && followersAttackOnSight)
|
||||||
{
|
{
|
||||||
if (actor2.getClass().getCreatureStats(actor2).getAiSequence().isInCombat(actor1))
|
if (actor2.getClass().getCreatureStats(actor2).getAiSequence().isInCombat(actor1))
|
||||||
aggressive = true;
|
aggressive = true;
|
||||||
|
|
Loading…
Reference in a new issue