diff --git a/1.5/Assemblies/Rimworld-Animations.dll b/1.5/Assemblies/Rimworld-Animations.dll index 9f4b569..9ecd083 100644 Binary files a/1.5/Assemblies/Rimworld-Animations.dll and b/1.5/Assemblies/Rimworld-Animations.dll differ diff --git a/1.5/Defs/AnimationDefs/TestAnimation1.xml b/1.5/Defs/AnimationDefs/TestAnimation1.xml index 60362c4..466bbb4 100644 --- a/1.5/Defs/AnimationDefs/TestAnimation1.xml +++ b/1.5/Defs/AnimationDefs/TestAnimation1.xml @@ -12,7 +12,6 @@ Rimworld_Animations.AnimationWorker_KeyframesExtended
  • - Fuck 30 0 true diff --git a/1.5/Source/Animations/AnimationWorkers/AnimationWorker_KeyframesExtended.cs b/1.5/Source/Animations/AnimationWorkers/AnimationWorker_KeyframesExtended.cs index 0b74719..1b41241 100644 --- a/1.5/Source/Animations/AnimationWorkers/AnimationWorker_KeyframesExtended.cs +++ b/1.5/Source/Animations/AnimationWorkers/AnimationWorker_KeyframesExtended.cs @@ -22,23 +22,6 @@ namespace Rimworld_Animations return base.OffsetAtTick(tick, parms); } - public SoundDef soundAtTick(int tick) - { - - //Verse.Keyframe keyframe = this.part.keyframes[0]; - Verse.Keyframe keyframe2 = this.part.keyframes[this.part.keyframes.Count - 1]; - foreach (Verse.Keyframe keyframe in this.part.keyframes) - { - if (tick == keyframe.tick) - { - return (keyframe as ExtendedKeyframe).sound; - } - - } - - return null; - } - //use extendedkeyframes to determine addon facing diff --git a/1.5/Source/Comps/CompExtendedAnimator.cs b/1.5/Source/Comps/CompExtendedAnimator.cs index 442a0fb..463dd3f 100644 --- a/1.5/Source/Comps/CompExtendedAnimator.cs +++ b/1.5/Source/Comps/CompExtendedAnimator.cs @@ -93,9 +93,6 @@ namespace Rimworld_Animations { StopAnimating(); } } - - CheckAndPlaySounds(); - } @@ -201,42 +198,6 @@ namespace Rimworld_Animations { } - public void CheckAndPlaySounds() - { - - PawnRenderNode rootNode = pawn.Drawer?.renderer?.renderTree?.rootNode; - - //check if the rootnode has sounds; if so play it - if (rootNode?.AnimationWorker is AnimationWorker_KeyframesExtended animWorker) - { - SoundDef sound = animWorker.soundAtTick(rootNode.tree.AnimationTick); - if (sound != null) - { - sound.PlayOneShot(new TargetInfo(pawn.Position, pawn.Map)); - } - - } - - - if (rootNode?.children != null) - { - foreach (PawnRenderNode node in rootNode?.children) - { - if (node?.AnimationWorker is AnimationWorker_KeyframesExtended childrenAnimWorker) - { - SoundDef sound = childrenAnimWorker.soundAtTick(node.tree.AnimationTick); - if (sound != null) - { - sound.PlayOneShot(new TargetInfo(pawn.Position, pawn.Map)); - } - - } - } - } - //do the same for all the child nodes - - } - public bool AnimationMakesUseOfProp(AnimationPropDef animationProp) { // never true if not animating; anim props shouldn't be attached