Bump NPC melee range for steering (#12570)

This commit is contained in:
metalgearsloth
2022-11-13 20:57:14 +11:00
committed by GitHub
parent 8b0f8ef52e
commit ef56145308

View File

@@ -93,8 +93,11 @@ public sealed partial class NPCCombatSystem
return;
}
var steering = EnsureComp<NPCSteeringComponent>(component.Owner);
steering.Range = MathF.Max(0.2f, weapon.Range - 0.4f);
// Gets unregistered on component shutdown.
_steering.TryRegister(component.Owner, new EntityCoordinates(component.Target, Vector2.Zero));
_steering.TryRegister(component.Owner, new EntityCoordinates(component.Target, Vector2.Zero), steering);
_melee.AttemptLightAttack(component.Owner, weapon, component.Target);
}
}