mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:23:52 +00:00
Merge remote-tracking branch 'glorf/master'
This commit is contained in:
commit
e88040662e
2 changed files with 11 additions and 0 deletions
|
@ -179,6 +179,7 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim
|
|||
, mSkipAnim(false)
|
||||
, mSecondsOfRunning(0)
|
||||
, mSecondsOfSwimming(0)
|
||||
, mUpdateWeapon(true)
|
||||
{
|
||||
if(!mAnimation)
|
||||
return;
|
||||
|
@ -407,6 +408,13 @@ void CharacterController::update(float duration, Movement &movement)
|
|||
else
|
||||
weapon = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
||||
|
||||
if(mUpdateWeapon)
|
||||
{
|
||||
mWeaponType = weaptype;
|
||||
forceStateUpdate();
|
||||
mUpdateWeapon = false;
|
||||
}
|
||||
|
||||
if(weaptype != mWeaponType)
|
||||
{
|
||||
std::string weapgroup;
|
||||
|
|
|
@ -104,6 +104,9 @@ class CharacterController
|
|||
WeaponType mWeaponType;
|
||||
bool mSkipAnim;
|
||||
|
||||
// Workaround for playing weapon draw animation and sound when going to new cell
|
||||
bool mUpdateWeapon;
|
||||
|
||||
// counted for skill increase
|
||||
float mSecondsOfSwimming;
|
||||
float mSecondsOfRunning;
|
||||
|
|
Loading…
Reference in a new issue