Bump up tile friction (#4329)

* Bump up tile friction

* Increase throwing speed

* Fix ExplosionLaunched throwing

* Flying time
This commit is contained in:
metalgearsloth
2021-07-25 16:58:02 +10:00
committed by GitHub
parent d1f8d3869c
commit 29e335c54d
5 changed files with 47 additions and 12 deletions

View File

@@ -16,6 +16,9 @@ namespace Content.Server.Explosion.Components
var sourceLocation = eventArgs.Source;
var targetLocation = eventArgs.Target.Transform.Coordinates;
if (sourceLocation.Equals(targetLocation)) return;
var direction = (targetLocation.ToMapPos(Owner.EntityManager) - sourceLocation.ToMapPos(Owner.EntityManager)).Normalized;
var throwForce = eventArgs.Severity switch
@@ -24,7 +27,8 @@ namespace Content.Server.Explosion.Components
ExplosionSeverity.Light => 20,
_ => 0,
};
Owner.TryThrow(direction * throwForce);
Owner.TryThrow(direction, throwForce);
}
}
}