From 0b58f32f32a3814a3040e56096e0c2646f6aaa5e Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Wed, 9 Mar 2016 18:01:32 +0100 Subject: [PATCH] Fixed third person animations over network --- include/Game/Systems/Weapon/WeaponBehaviour.h | 6 ++---- src/Game/Systems/Weapon/AssaultWeaponBehaviour.cpp | 10 ---------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/include/Game/Systems/Weapon/WeaponBehaviour.h b/include/Game/Systems/Weapon/WeaponBehaviour.h index 3f3b6559..cd067f36 100644 --- a/include/Game/Systems/Weapon/WeaponBehaviour.h +++ b/include/Game/Systems/Weapon/WeaponBehaviour.h @@ -293,10 +293,8 @@ private: firstPersonWeapon = SpawnerSystem::Spawn(firstPersonAttachment, firstPersonAttachment); } } - if (IsServer) { - if (thirdPersonAttachment.Valid()) { - thirdPersonWeapon = SpawnerSystem::Spawn(thirdPersonAttachment, thirdPersonAttachment); - } + if (thirdPersonAttachment.Valid()) { + thirdPersonWeapon = SpawnerSystem::Spawn(thirdPersonAttachment, thirdPersonAttachment); } WeaponInfo& wi = m_ActiveWeapons[player]; diff --git a/src/Game/Systems/Weapon/AssaultWeaponBehaviour.cpp b/src/Game/Systems/Weapon/AssaultWeaponBehaviour.cpp index dddf5fdd..6d8006aa 100644 --- a/src/Game/Systems/Weapon/AssaultWeaponBehaviour.cpp +++ b/src/Game/Systems/Weapon/AssaultWeaponBehaviour.cpp @@ -133,11 +133,6 @@ void AssaultWeaponBehaviour::OnReload(ComponentWrapper cWeapon, WeaponInfo& wi) b1.Restart = true; b1.Start = true; m_EventBroker->Publish(b1); - Events::AutoAnimationBlend b2; - b2.RootNode = wi.ThirdPersonPlayerModel; - b2.NodeName = "MovementBlend"; - b2.AnimationEntity = wi.ThirdPersonPlayerModel.FirstChildByName("AssaultWeaponBlend").FirstChildByName("Reload"); - m_EventBroker->Publish(b2); // Spawn explosion effect if (wi.FirstPersonEntity.Valid()) { @@ -254,11 +249,6 @@ void AssaultWeaponBehaviour::fireBullet(ComponentWrapper cWeapon, WeaponInfo& wi b1.Restart = true; b1.Start = true; m_EventBroker->Publish(b1); - Events::AutoAnimationBlend b2; - b2.RootNode = wi.ThirdPersonPlayerModel; - b2.NodeName = "MovementBlend"; - b2.AnimationEntity = wi.ThirdPersonPlayerModel.FirstChildByName("AssaultWeaponBlend").FirstChildByName("Fire"); - m_EventBroker->Publish(b2); // Sound Events::PlaySoundOnEntity e;