Fix 3000 errors

This commit is contained in:
DrSmugleaf
2021-12-05 18:09:01 +01:00
parent 2bfec7ec62
commit 2a3b7d809d
569 changed files with 2979 additions and 3280 deletions

View File

@@ -1,5 +1,4 @@
using Content.Shared.Administration.Logs;
using Content.Shared.CCVar;
using Content.Shared.Database;
using Content.Shared.Hands.Components;
using Content.Shared.Physics;
@@ -44,11 +43,13 @@ namespace Content.Shared.Throwing
private void OnHandleState(EntityUid uid, ThrownItemComponent component, ref ComponentHandleState args)
{
if (args.Current is not ThrownItemComponentState state || state.Thrower == null)
if (args.Current is not ThrownItemComponentState {Thrower: not null } state ||
!state.Thrower.Value.IsValid())
{
return;
}
if(EntityManager.TryGetEntity(state.Thrower.Value, out var entity))
component.Thrower = entity;
component.Thrower = state.Thrower.Value;
}
private void ThrowItem(EntityUid uid, ThrownItemComponent component, ThrownEvent args)