Make some swing animations nicer (#4235)

* Combo attacks when

* Remove stuff
This commit is contained in:
No Elka 2025-08-21 10:53:56 +03:00 committed by GitHub
parent 757c71cfb9
commit 4bf3905083
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 0 deletions

View File

@ -55,6 +55,7 @@ public sealed partial class MeleeWeaponSystem
if (meleeWeaponComponent.SwingLeft)
angle *= -1;
if (meleeWeaponComponent.ChangeSwingDirection) meleeWeaponComponent.SwingLeft = !meleeWeaponComponent.SwingLeft; // DeltaV - Nice swing animation for desword
}
_sprite.SetRotation((animationUid, sprite), localPos.ToWorldAngle());
var distance = Math.Clamp(localPos.Length() / 2f, 0.2f, 1f);

View File

@ -115,6 +115,12 @@ public sealed partial class MeleeWeaponComponent : Component
[DataField, AutoNetworkedField]
public bool SwingLeft;
/// <summary>
/// DeltaV: if true, weapon will swing in different direction each strike. Purely cosmetic.
/// </summary>
[DataField]
public bool ChangeSwingDirection;
// Sounds

View File

@ -332,6 +332,7 @@
- type: MeleeWeapon
wideAnimationRotation: -135
attackRate: 2.0 # DeltaV - was 1.5
changeSwingDirection: true # DeltaV
angle: 100
damage:
types:

View File

@ -91,7 +91,9 @@
- type: MeleeWeapon
resistanceBypass: true
angle: 0
wideAnimationRotation: 225
animation: WeaponArcCosmic
wideAnimation: WeaponArcThrust
attackRate: 0.62
damage:
types: