Some more fixes

This commit is contained in:
Vera Aguilera Puerto
2021-12-04 14:14:22 +01:00
parent 2ff16a580b
commit 2bfec7ec62
19 changed files with 46 additions and 56 deletions

View File

@@ -31,7 +31,7 @@ namespace Content.Server.Throwing
/// <param name="strength">How much the direction vector should be multiplied for velocity.</param>
/// <param name="user"></param>
/// <param name="pushbackRatio">The ratio of impulse applied to the thrower</param>
internal static void TryThrow(this IEntity entity, Vector2 direction, float strength = 1.0f, IEntity? user = null, float pushbackRatio = 1.0f)
internal static void TryThrow(this EntityUid entity, Vector2 direction, float strength = 1.0f, EntityUid? user = null, float pushbackRatio = 1.0f)
{
if ((!IoCManager.Resolve<IEntityManager>().EntityExists(entity) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(entity).EntityLifeStage) >= EntityLifeStage.Deleted ||
strength <= 0f ||