3rd person animations idle bug fixed
This commit is contained in:
@@ -24,6 +24,8 @@ void PlayerMovementSystem::Update(double dt)
|
||||
if (LocalPlayer.Valid()){
|
||||
updateVelocity(LocalPlayer, dt);
|
||||
}
|
||||
|
||||
|
||||
m_SprintEffectTimer += dt;
|
||||
if (m_SprintEffectTimer < 0.016f) {
|
||||
return;
|
||||
|
||||
@@ -74,7 +74,7 @@ void AssaultWeaponBehaviour::UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo&
|
||||
float animationWeight = glm::min(speed, movementSpeed) / movementSpeed;
|
||||
EntityWrapper rootNode = wi.FirstPersonEntity;
|
||||
if (rootNode.Valid()) {
|
||||
EntityWrapper blend = rootNode.FirstChildByName("MovementBlend");
|
||||
EntityWrapper blend = rootNode.FirstChildByName("MovementBlendAssault");
|
||||
if (blend.Valid()) {
|
||||
(double&)blend["Blend"]["Weight"] = animationWeight;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ void SidearmWeaponBehaviour::UpdateComponent(EntityWrapper& entity, ComponentWra
|
||||
|
||||
void SidearmWeaponBehaviour::UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo& wi, double dt)
|
||||
{
|
||||
|
||||
CheckAmmo(cWeapon, wi);
|
||||
|
||||
// Start reloading automatically if at 0 mag ammo
|
||||
@@ -64,7 +63,7 @@ void SidearmWeaponBehaviour::UpdateWeapon(ComponentWrapper cWeapon, WeaponInfo&
|
||||
float animationWeight = glm::min(speed, movementSpeed) / movementSpeed;
|
||||
EntityWrapper rootNode = wi.FirstPersonEntity;
|
||||
if (rootNode.Valid()) {
|
||||
EntityWrapper blend = rootNode.FirstChildByName("MovementBlend");
|
||||
EntityWrapper blend = rootNode.FirstChildByName("MovementBlendSidearm");
|
||||
if (blend.Valid()) {
|
||||
(double&)blend["Blend"]["Weight"] = animationWeight;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user