diff --git a/Source/1.5/AnimationMod/AnimRenderer.cs b/Source/1.5/AnimationMod/AnimRenderer.cs index 44650271..64bc0bd1 100644 --- a/Source/1.5/AnimationMod/AnimRenderer.cs +++ b/Source/1.5/AnimationMod/AnimRenderer.cs @@ -426,10 +426,13 @@ private void InitSweepMeshes() sweeps = new PartWithSweep[Data.SweepDataCount]; foreach (var part in Data.PartsWithSweepData) { + var overrideData = GetOverride(part); var paths = Data.GetSweepPaths(part); foreach (var path in paths) { - sweeps[j++] = new PartWithSweep(this, part, path, new SweepMesh(), BasicSweepProvider.DefaultInstance); + float upDst = overrideData?.TweakData?.BladeEnd ?? 0.4f; + float downDst = overrideData?.TweakData?.BladeStart ?? 0.05f; + sweeps[j++] = new PartWithSweep(this, part, path, new SweepMesh(), BasicSweepProvider.DefaultInstance, upDst, downDst); } } } @@ -1429,16 +1432,6 @@ public bool AddPawn(Pawn pawn, int index, bool register) if (ov.CustomRenderer != null) ov.CustomRenderer.Item = weapon; - InitSweepMeshes(); - foreach (var path in sweeps) - { - if (path.Part == itemPart) - { - path.DownDst = tweak.BladeStart; - path.UpDst = tweak.BladeEnd; - } - } - return true; } diff --git a/Source/1.5/AnimationMod/Sweep/BasicSweepProvider.cs b/Source/1.5/AnimationMod/Sweep/BasicSweepProvider.cs index 46e156bd..2efdd892 100644 --- a/Source/1.5/AnimationMod/Sweep/BasicSweepProvider.cs +++ b/Source/1.5/AnimationMod/Sweep/BasicSweepProvider.cs @@ -8,8 +8,8 @@ public class BasicSweepProvider : ISweepProvider public Color color = Color.white; public float length = 0.15f; - public float minVel = 1f; - public float maxVel = 2f; + public float minVel = 3.5f; + public float maxVel = 7f; public (Color low, Color high) GetTrailColors(in SweepProviderArgs args) { diff --git a/Source/1.5/AnimationMod/Sweep/PartWithSweep.cs b/Source/1.5/AnimationMod/Sweep/PartWithSweep.cs index 8b47c51d..260186e2 100644 --- a/Source/1.5/AnimationMod/Sweep/PartWithSweep.cs +++ b/Source/1.5/AnimationMod/Sweep/PartWithSweep.cs @@ -1,4 +1,4 @@ -using System; +using System; using AM.Data.Model; using UnityEngine; @@ -10,7 +10,7 @@ public class PartWithSweep public readonly SweepPointCollection PointCollection; public readonly SweepMesh Mesh; public readonly AnimRenderer Renderer; - public float DownDst, UpDst; + public readonly float DownDst, UpDst; public bool MirrorHorizontal; public ISweepProvider ColorProvider; @@ -25,14 +25,16 @@ public struct Data public float UpVel; } - public PartWithSweep(AnimRenderer renderer, AnimPartData part, SweepPointCollection pointCollection, SweepMesh mesh, ISweepProvider colorProvider) + public PartWithSweep(AnimRenderer renderer, AnimPartData part, SweepPointCollection pointCollection, SweepMesh mesh, ISweepProvider colorProvider, float upDst, float downDst) { Renderer = renderer; Part = part; PointCollection = pointCollection; Mesh = mesh; - points = pointCollection.CloneWithVelocities(DownDst, UpDst); ColorProvider = colorProvider; + UpDst = upDst; + DownDst = downDst; + points = pointCollection.CloneWithVelocities(DownDst, UpDst); } public void Draw(float time) diff --git a/WeaponTweakData/AM_Weebstick_co.uk.epicguru.meleeanimation.json b/WeaponTweakData/AM_Weebstick_co.uk.epicguru.meleeanimation.json index f91b5f68..b2a3745a 100644 --- a/WeaponTweakData/AM_Weebstick_co.uk.epicguru.meleeanimation.json +++ b/WeaponTweakData/AM_Weebstick_co.uk.epicguru.meleeanimation.json @@ -14,6 +14,6 @@ "r": 0.0, "g": 0.0, "b": 0.0, - "a": 0.8306667 + "a": 0.6977777 } } \ No newline at end of file diff --git a/WeaponTweakData/MeleeWeapon_PlasmaSwordBladelink_ludeon.rimworld.royalty.json b/WeaponTweakData/MeleeWeapon_PlasmaSwordBladelink_ludeon.rimworld.royalty.json index 4ea8d28a..10df50da 100644 --- a/WeaponTweakData/MeleeWeapon_PlasmaSwordBladelink_ludeon.rimworld.royalty.json +++ b/WeaponTweakData/MeleeWeapon_PlasmaSwordBladelink_ludeon.rimworld.royalty.json @@ -8,5 +8,11 @@ "ScaleY": 1.1, "BladeStart": 0.15659982, "BladeEnd": 0.800895154, - "MeleeWeaponType": 6 + "MeleeWeaponType": 6, + "TrailTint": { + "r": 0.966666639, + "g": 0.6717687, + "b": 0.0451110676, + "a": 0.98 + } } \ No newline at end of file diff --git a/WeaponTweakData/MeleeWeapon_PlasmaSword_ludeon.rimworld.royalty.json b/WeaponTweakData/MeleeWeapon_PlasmaSword_ludeon.rimworld.royalty.json index 4a0c4fff..d80c8f80 100644 --- a/WeaponTweakData/MeleeWeapon_PlasmaSword_ludeon.rimworld.royalty.json +++ b/WeaponTweakData/MeleeWeapon_PlasmaSword_ludeon.rimworld.royalty.json @@ -8,5 +8,11 @@ "ScaleY": 1.1, "BladeStart": 0.15659982, "BladeEnd": 0.800895154, - "MeleeWeaponType": 6 + "MeleeWeaponType": 6, + "TrailTint": { + "r": 0.966666639, + "g": 0.6717687, + "b": 0.0451110676, + "a": 0.98 + } } \ No newline at end of file