3rd person animations synced with 1st person animations

This commit is contained in:
viktorljung
2016-03-09 18:27:09 +01:00
parent 7141756992
commit d42d886dcc
8 changed files with 107 additions and 87 deletions
@@ -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()) {
@@ -247,6 +242,7 @@ void AssaultWeaponBehaviour::fireBullet(ComponentWrapper cWeapon, WeaponInfo& wi
// Play animation
playAnimationAndReturn(wi.FirstPersonEntity, "ActionBlend", "Fire");
// Third person anim
Events::AutoAnimationBlend b1;
b1.RootNode = wi.ThirdPersonPlayerModel;
@@ -254,11 +250,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;