diff --git a/src/Events.cs b/src/Events.cs index 644c85d..0929e70 100644 --- a/src/Events.cs +++ b/src/Events.cs @@ -72,11 +72,17 @@ private HookResult OnBulletImpact(EventBulletImpact @event, GameEventInfo info) var diffY = Math.Abs(value.AddZone.Points[0].Y - value.AddZone.Points[1].Y); var diffZ = Math.Abs(value.AddZone.Points[0].Z - value.AddZone.Points[1].Z); - if (diffX < 10) - value.AddZone.Points[0].X += 10 - diffX; + if (diffX < 32) + { + value.AddZone.Points[0].X += (value.AddZone.Points[0].X >= value.AddZone.Points[1].X ? 1 : -1) * ((32 - diffX) / 2); + value.AddZone.Points[1].X += (value.AddZone.Points[0].X > value.AddZone.Points[1].X ? -1 : 1) * ((32 - diffX) / 2); + } - if (diffY < 10) - value.AddZone.Points[0].Y += 10 - diffY; + if (diffY < 32) + { + value.AddZone.Points[0].Y += (value.AddZone.Points[0].Y >= value.AddZone.Points[1].Y ? 1 : -1) * ((32 - diffY) / 2); + value.AddZone.Points[1].Y += (value.AddZone.Points[0].Y > value.AddZone.Points[1].Y ? -1 : 1) * ((32 - diffY) / 2); + } if (diffZ < 200) { diff --git a/src/Globals.cs b/src/Globals.cs index 2a618f9..1af3e14 100644 --- a/src/Globals.cs +++ b/src/Globals.cs @@ -8,7 +8,7 @@ namespace AntiRush; public partial class AntiRush { public override string ModuleName => "AntiRush"; - public override string ModuleVersion => "1.0.4"; + public override string ModuleVersion => "1.0.5"; public override string ModuleAuthor => "https://github.com/oscar-wos/AntiRush"; public AntiRushConfig Config { get; set; } = new(); public Menu.Menu Menu { get; } = new();