void ModelDisplayState::UpdateMovement(const MovementInfo& info) { switch (info.MovementType()) { case MovementInfo::moveTypeStand: SetAnimation(AnimType::STAND); break; case MovementInfo::moveTypeWalkForward: SetAnimation(AnimType::RUN); break; case MovementInfo::moveTypeWalkBackward: SetAnimation(AnimType::CROUCH_WALK); break; case MovementInfo::moveTypeJump: SetAnimation(AnimType::JUMP); break; case MovementInfo::moveTypeFall: SetAnimation(AnimType::FALLBACK); break; case MovementInfo::moveTypeSwim: SetAnimation(AnimType::RUN); break; case MovementInfo::moveTypeDie: SetAnimation(AnimType::DEATH_FALLBACK); break; default: ATLASSERT(false); } }
void ModelDisplayState::UpdateMovement(const MovementInfo& info) { T_enModelAnimation enAnimation = animIdle1; T_enModelAnimationWeaponType enAnimWeaponType = animWeaponHand; // TODO set appropriately // TODO check "combat" flag, e.g. for animIdleCombat, animRunCombat, etc. // TODO implement variations of animations, e.g. animIdle1, animIdle2, animIdle3; etc. bool bLoop = true; bool bInterruptable = true; switch (info.MovementType()) { case MovementInfo::moveTypeStand: enAnimation = animIdle1; break; case MovementInfo::moveTypeWalkForward: enAnimation = animRunning; break; case MovementInfo::moveTypeWalkBackward: enAnimation = animMoveBackwards; break; case MovementInfo::moveTypeJump: enAnimation = animJumping; bInterruptable = false; break; case MovementInfo::moveTypeFall: enAnimation = animFalling; break; case MovementInfo::moveTypeSwim: enAnimation = animSwimming; break; case MovementInfo::moveTypeDie: enAnimation = animDeath1; bLoop = false; break; } SetAnimation(enAnimation, enAnimWeaponType, bLoop, bInterruptable); }