diff --git a/Content.Server/Zombies/ZombifyOnDeathSystem.cs b/Content.Server/Zombies/ZombifyOnDeathSystem.cs index d0d38136e5..c470998599 100644 --- a/Content.Server/Zombies/ZombifyOnDeathSystem.cs +++ b/Content.Server/Zombies/ZombifyOnDeathSystem.cs @@ -121,7 +121,8 @@ namespace Content.Server.Zombies var melee = EnsureComp(target); melee.ClickAnimation = zombiecomp.AttackAnimation; melee.WideAnimation = zombiecomp.AttackAnimation; - melee.Range = 0.75f; + melee.Range = 1.5f; + Dirty(melee); //We have specific stuff for humanoid zombies because they matter more if (TryComp(target, out var huApComp)) //huapcomp @@ -170,8 +171,8 @@ namespace Content.Server.Zombies _damageable.SetAllDamage(damageablecomp, 0); //gives it the funny "Zombie ___" name. - if (TryComp(target, out var meta)) - meta.EntityName = Loc.GetString("zombie-name-prefix", ("target", meta.EntityName)); + var meta = MetaData(target); + meta.EntityName = Loc.GetString("zombie-name-prefix", ("target", meta.EntityName)); _identity.QueueIdentityUpdate(target); diff --git a/Content.Shared/Weapons/Melee/MeleeWeaponComponent.cs b/Content.Shared/Weapons/Melee/MeleeWeaponComponent.cs index ed52667ea6..82bcd1f77e 100644 --- a/Content.Shared/Weapons/Melee/MeleeWeaponComponent.cs +++ b/Content.Shared/Weapons/Melee/MeleeWeaponComponent.cs @@ -140,11 +140,18 @@ public sealed class MeleeWeaponComponentState : ComponentState public TimeSpan NextAttack; public TimeSpan? WindUpStart; - public MeleeWeaponComponentState(float attackRate, bool attacking, TimeSpan nextAttack, TimeSpan? windupStart) + public string ClickAnimation; + public string WideAnimation; + public float Range; + + public MeleeWeaponComponentState(float attackRate, bool attacking, TimeSpan nextAttack, TimeSpan? windupStart, string clickAnimation, string wideAnimation, float range) { AttackRate = attackRate; Attacking = attacking; NextAttack = nextAttack; WindUpStart = windupStart; + ClickAnimation = clickAnimation; + WideAnimation = wideAnimation; + Range = range; } } diff --git a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs index 2bff6b8bec..b9ae509a1d 100644 --- a/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs +++ b/Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs @@ -205,7 +205,7 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem private void OnGetState(EntityUid uid, MeleeWeaponComponent component, ref ComponentGetState args) { args.State = new MeleeWeaponComponentState(component.AttackRate, component.Attacking, component.NextAttack, - component.WindUpStart); + component.WindUpStart, component.ClickAnimation, component.WideAnimation, component.Range); } private void OnHandleState(EntityUid uid, MeleeWeaponComponent component, ref ComponentHandleState args) @@ -217,6 +217,10 @@ public abstract class SharedMeleeWeaponSystem : EntitySystem component.AttackRate = state.AttackRate; component.NextAttack = state.NextAttack; component.WindUpStart = state.WindUpStart; + + component.ClickAnimation = state.ClickAnimation; + component.WideAnimation = state.WideAnimation; + component.Range = state.Range; } public MeleeWeaponComponent? GetWeapon(EntityUid entity) diff --git a/Content.Shared/Zombies/ZombieComponent.cs b/Content.Shared/Zombies/ZombieComponent.cs index 27abc19093..368083360a 100644 --- a/Content.Shared/Zombies/ZombieComponent.cs +++ b/Content.Shared/Zombies/ZombieComponent.cs @@ -53,12 +53,12 @@ namespace Content.Shared.Zombies /// The attack arc of the zombie /// [DataField("attackArc", customTypeSerializer: typeof(PrototypeIdSerializer))] - public string AttackAnimation = "WeaponArcClaw"; + public string AttackAnimation = "WeaponArcBite"; /// /// The role prototype of the zombie antag role /// - [DataField("zombieRoldId", customTypeSerializer: typeof(PrototypeIdSerializer))] + [DataField("zombieRoleId", customTypeSerializer: typeof(PrototypeIdSerializer))] public readonly string ZombieRoleId = "Zombie"; } }