mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-22 02:09:41 +00:00
Fix MSVC warning about possibly uninitialized movestate variable
This commit is contained in:
parent
29ea72ed6c
commit
9c8fc0557a
1 changed files with 24 additions and 23 deletions
|
@ -415,11 +415,13 @@ void CharacterController::refreshJumpAnims(const WeaponInfo* weap, JumpingState
|
||||||
|
|
||||||
void CharacterController::refreshMovementAnims(const WeaponInfo* weap, CharacterState movement, CharacterState& idle, bool force)
|
void CharacterController::refreshMovementAnims(const WeaponInfo* weap, CharacterState movement, CharacterState& idle, bool force)
|
||||||
{
|
{
|
||||||
|
if (movement == mMovementState && idle == mIdleState && !force)
|
||||||
|
return;
|
||||||
|
|
||||||
std::string movementAnimName;
|
std::string movementAnimName;
|
||||||
MWRender::Animation::BlendMask movemask;
|
MWRender::Animation::BlendMask movemask;
|
||||||
const StateInfo *movestate;
|
const StateInfo *movestate;
|
||||||
if(force || movement != mMovementState || idle != mIdleState)
|
|
||||||
{
|
|
||||||
movemask = MWRender::Animation::BlendMask_All;
|
movemask = MWRender::Animation::BlendMask_All;
|
||||||
movestate = std::find_if(sMovementList, sMovementListEnd, FindCharState(movement));
|
movestate = std::find_if(sMovementList, sMovementListEnd, FindCharState(movement));
|
||||||
if(movestate != sMovementListEnd)
|
if(movestate != sMovementListEnd)
|
||||||
|
@ -448,7 +450,6 @@ void CharacterController::refreshMovementAnims(const WeaponInfo* weap, Character
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(force || movement != mMovementState)
|
if(force || movement != mMovementState)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue