Some manual TryGetComponent inlines

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 12:51:44 +01:00
parent 0feebbff00
commit f3edecf994
10 changed files with 22 additions and 15 deletions

View File

@@ -252,7 +252,7 @@ namespace Content.Client.Storage
{
var controlledEntity = IoCManager.Resolve<IPlayerManager>().LocalPlayer?.ControlledEntity;
if (controlledEntity?.TryGetComponent(out HandsComponent? hands) ?? false)
if (controlledEntity != null && controlledEntity.TryGetComponent(out HandsComponent? hands))
{
#pragma warning disable 618
StorageEntity.SendNetworkMessage(new InsertEntityMessage());