mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 20:53:50 +00:00
Issue #256: Force update after building the player character
This commit is contained in:
parent
e1997b7f04
commit
79055e281d
3 changed files with 11 additions and 5 deletions
|
@ -32,9 +32,6 @@ namespace MWMechanics
|
|||
creatureStats.mDynamic[1].setBase (static_cast<int> (intelligence +
|
||||
magickaFactor * intelligence));
|
||||
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)
|
||||
|
|
|
@ -19,8 +19,6 @@ namespace MWMechanics
|
|||
std::set<MWWorld::Ptr> mActors;
|
||||
float mDuration;
|
||||
|
||||
void updateActor (const MWWorld::Ptr& ptr, float duration);
|
||||
|
||||
void updateNpc (const MWWorld::Ptr& ptr, float duration, bool paused);
|
||||
|
||||
void adjustMagicEffects (const MWWorld::Ptr& creature);
|
||||
|
@ -41,6 +39,11 @@ namespace MWMechanics
|
|||
void update (std::vector<std::pair<std::string, Ogre::Vector3> >& movement,
|
||||
float duration, bool paused);
|
||||
///< 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…
Reference in a new issue