forked from mirror/openmw-tes3mp
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)
|
, mSkipAnim(false)
|
||||||
, mSecondsOfRunning(0)
|
, mSecondsOfRunning(0)
|
||||||
, mSecondsOfSwimming(0)
|
, mSecondsOfSwimming(0)
|
||||||
|
, mUpdateWeapon(true)
|
||||||
{
|
{
|
||||||
if(!mAnimation)
|
if(!mAnimation)
|
||||||
return;
|
return;
|
||||||
|
@ -407,6 +408,13 @@ void CharacterController::update(float duration, Movement &movement)
|
||||||
else
|
else
|
||||||
weapon = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
weapon = inv.getSlot(MWWorld::InventoryStore::Slot_CarriedRight);
|
||||||
|
|
||||||
|
if(mUpdateWeapon)
|
||||||
|
{
|
||||||
|
mWeaponType = weaptype;
|
||||||
|
forceStateUpdate();
|
||||||
|
mUpdateWeapon = false;
|
||||||
|
}
|
||||||
|
|
||||||
if(weaptype != mWeaponType)
|
if(weaptype != mWeaponType)
|
||||||
{
|
{
|
||||||
std::string weapgroup;
|
std::string weapgroup;
|
||||||
|
|
|
@ -104,6 +104,9 @@ class CharacterController
|
||||||
WeaponType mWeaponType;
|
WeaponType mWeaponType;
|
||||||
bool mSkipAnim;
|
bool mSkipAnim;
|
||||||
|
|
||||||
|
// Workaround for playing weapon draw animation and sound when going to new cell
|
||||||
|
bool mUpdateWeapon;
|
||||||
|
|
||||||
// counted for skill increase
|
// counted for skill increase
|
||||||
float mSecondsOfSwimming;
|
float mSecondsOfSwimming;
|
||||||
float mSecondsOfRunning;
|
float mSecondsOfRunning;
|
||||||
|
|
Loading…
Reference in a new issue