1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-04-16 08:42:23 +00:00

Merge pull request #1926 from akortunov/warnfix

Fix MSVC warning about possibly uninitialized movestate variable
This commit is contained in:
Bret Curtis 2018-09-17 17:10:25 +02:00 committed by GitHub
commit 07be9ae8ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -415,11 +415,13 @@ void CharacterController::refreshJumpAnims(const WeaponInfo* weap, JumpingState
void CharacterController::refreshMovementAnims(const WeaponInfo* weap, CharacterState movement, CharacterState& idle, bool force)
{
if (movement == mMovementState && idle == mIdleState && !force)
return;
std::string movementAnimName;
MWRender::Animation::BlendMask movemask;
const StateInfo *movestate;
if(force || movement != mMovementState || idle != mIdleState)
{
movemask = MWRender::Animation::BlendMask_All;
movestate = std::find_if(sMovementList, sMovementListEnd, FindCharState(movement));
if(movestate != sMovementListEnd)
@ -448,7 +450,6 @@ void CharacterController::refreshMovementAnims(const WeaponInfo* weap, Character
}
}
}
}
if(force || movement != mMovementState)
{