Fix meteor's ArithmeticException (#33556)
Co-authored-by: Winkarst <74284083+Winkarst-cpu@users.noreply.github.co>
This commit is contained in:
parent
6f51aa4b15
commit
ce672acf91
1 changed files with 3 additions and 2 deletions
|
|
@ -45,7 +45,6 @@ public sealed class ProjectileSystem : SharedProjectileSystem
|
|||
RaiseLocalEvent(uid, ref ev);
|
||||
|
||||
var otherName = ToPrettyString(target);
|
||||
var direction = args.OurBody.LinearVelocity.Normalized();
|
||||
var modifiedDamage = _damageableSystem.TryChangeDamage(target, ev.Damage, component.IgnoreResistances, origin: component.Shooter);
|
||||
var deleted = Deleted(target);
|
||||
|
||||
|
|
@ -64,7 +63,9 @@ public sealed class ProjectileSystem : SharedProjectileSystem
|
|||
if (!deleted)
|
||||
{
|
||||
_guns.PlayImpactSound(target, modifiedDamage, component.SoundHit, component.ForceSound);
|
||||
_sharedCameraRecoil.KickCamera(target, direction);
|
||||
|
||||
if (!args.OurBody.LinearVelocity.IsLengthZero())
|
||||
_sharedCameraRecoil.KickCamera(target, args.OurBody.LinearVelocity.Normalized());
|
||||
}
|
||||
|
||||
component.DamagedEntity = true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue