From 6761c4cbdeecacf7d91a4adec761313b42ab1146 Mon Sep 17 00:00:00 2001 From: Fernando Arzola <17498701+Arufonsu@users.noreply.github.com> Date: Tue, 9 Jul 2024 00:28:34 -0400 Subject: [PATCH] fix: client side projectile issue (#2320) --- Intersect.Client/Entities/Projectiles/Projectile.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Intersect.Client/Entities/Projectiles/Projectile.cs b/Intersect.Client/Entities/Projectiles/Projectile.cs index 9aeff6dad..0d6441eda 100644 --- a/Intersect.Client/Entities/Projectiles/Projectile.cs +++ b/Intersect.Client/Entities/Projectiles/Projectile.cs @@ -498,12 +498,8 @@ public void CheckForCollision() { if (_targetId != Guid.Empty && _targetId != _owner || _lastTargetX != -1 && _lastTargetY != -1 && _lastTargetMapId != Guid.Empty) { - var (deltaX, deltaY) = (GetProjectileOffset(projectileSpawn, true), GetProjectileOffset(projectileSpawn, false)); - float distance = MathF.Sqrt(deltaX * deltaX + deltaY * deltaY); - float xFactor = deltaX / distance; - float yFactor = deltaY / distance; - newx += xFactor; - newy += yFactor; + newx += GetProjectileOffset(projectileSpawn, true); + newy += GetProjectileOffset(projectileSpawn, false); } } else