Fix some build warnings (#6832)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -12,7 +12,7 @@ namespace Content.Server.AI.Utility.Considerations.Hands
|
||||
{
|
||||
var owner = context.GetState<SelfState>().GetValue();
|
||||
|
||||
if (owner == null || !IoCManager.Resolve<IEntityManager>().TryGetComponent(owner, out HandsComponent? handsComponent))
|
||||
if (!owner.IsValid() || !IoCManager.Resolve<IEntityManager>().TryGetComponent(owner, out HandsComponent? handsComponent))
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Content.Server.AI.Utility.Considerations.State
|
||||
}
|
||||
|
||||
context.GetStoredState(stateData, out StoredStateData<EntityUid> state);
|
||||
return state.GetValue() == null ? 1.0f : 0.0f;
|
||||
return !state.GetValue().IsValid() ? 1.0f : 0.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user