1
0
Fork 1
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:
Marc Zinnschlag 2012-05-18 13:54:07 +02:00
parent e1997b7f04
commit 79055e281d
3 changed files with 11 additions and 5 deletions

View file

@ -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)

View file

@ -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.
};
}

View file

@ -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());
}