Implement field-deltas for melee (#33977)

* Implement field-deltas for melee

* Review
This commit is contained in:
metalgearsloth
2025-03-30 16:02:45 +11:00
committed by GitHub
parent b1f542a54c
commit 0ff70fdb40
3 changed files with 55 additions and 29 deletions

View File

@@ -132,6 +132,16 @@ public sealed partial class ZombieSystem
melee.Angle = 0.0f;
melee.HitSound = zombiecomp.BiteSound;
DirtyFields(target, melee, null, fields:
[
nameof(MeleeWeaponComponent.Animation),
nameof(MeleeWeaponComponent.WideAnimation),
nameof(MeleeWeaponComponent.AltDisarm),
nameof(MeleeWeaponComponent.Range),
nameof(MeleeWeaponComponent.Angle),
nameof(MeleeWeaponComponent.HitSound),
]);
if (mobState.CurrentState == MobState.Alive)
{
// Groaning when damaged