Fixed third person animations over network

This commit is contained in:
2016-03-09 18:01:32 +01:00
parent 3ea1177425
commit 0b58f32f32
2 changed files with 2 additions and 14 deletions
@@ -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];
@@ -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;