mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-04 12:39:55 +00:00
Issue #256: Force update after building the player character
This commit is contained in:
parent
e1997b7f04
commit
79055e281d
@ -32,9 +32,6 @@ namespace MWMechanics
|
|||||||
creatureStats.mDynamic[1].setBase (static_cast<int> (intelligence +
|
creatureStats.mDynamic[1].setBase (static_cast<int> (intelligence +
|
||||||
magickaFactor * intelligence));
|
magickaFactor * intelligence));
|
||||||
creatureStats.mDynamic[2].setBase (strength+willpower+agility+endurance);
|
creatureStats.mDynamic[2].setBase (strength+willpower+agility+endurance);
|
||||||
|
|
||||||
for (int i=0; i<3; ++i)
|
|
||||||
creatureStats.mDynamic[i].setCurrent (creatureStats.mDynamic[i].getModified());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Actors::updateNpc (const MWWorld::Ptr& ptr, float duration, bool paused)
|
void Actors::updateNpc (const MWWorld::Ptr& ptr, float duration, bool paused)
|
||||||
|
@ -19,8 +19,6 @@ namespace MWMechanics
|
|||||||
std::set<MWWorld::Ptr> mActors;
|
std::set<MWWorld::Ptr> mActors;
|
||||||
float mDuration;
|
float mDuration;
|
||||||
|
|
||||||
void updateActor (const MWWorld::Ptr& ptr, float duration);
|
|
||||||
|
|
||||||
void updateNpc (const MWWorld::Ptr& ptr, float duration, bool paused);
|
void updateNpc (const MWWorld::Ptr& ptr, float duration, bool paused);
|
||||||
|
|
||||||
void adjustMagicEffects (const MWWorld::Ptr& creature);
|
void adjustMagicEffects (const MWWorld::Ptr& creature);
|
||||||
@ -41,6 +39,11 @@ namespace MWMechanics
|
|||||||
void update (std::vector<std::pair<std::string, Ogre::Vector3> >& movement,
|
void update (std::vector<std::pair<std::string, Ogre::Vector3> >& movement,
|
||||||
float duration, bool paused);
|
float duration, bool paused);
|
||||||
///< Update actor stats and store desired velocity vectors in \a movement
|
///< Update actor stats and store desired velocity vectors in \a movement
|
||||||
|
|
||||||
|
void updateActor (const MWWorld::Ptr& ptr, float duration);
|
||||||
|
///< This function is normally called automatically during the update process, but it can
|
||||||
|
/// also be called explicitly at any time to force an update.
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,6 +138,12 @@ namespace MWMechanics
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// forced update and current value adjustments
|
||||||
|
mActors.updateActor (ptr, 0);
|
||||||
|
|
||||||
|
for (int i=0; i<3; ++i)
|
||||||
|
creatureStats.mDynamic[i].setCurrent (creatureStats.mDynamic[i].getModified());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user