Use non-generic TryComp() for metadata & transform (#28133)
This commit is contained in:
@@ -25,7 +25,7 @@ public sealed partial class GravitySystem
|
||||
{
|
||||
var localPlayer = _playerManager.LocalEntity;
|
||||
|
||||
if (!TryComp<TransformComponent>(localPlayer, out var xform) ||
|
||||
if (!TryComp(localPlayer, out TransformComponent? xform) ||
|
||||
xform.GridUid != uid && xform.MapUid != uid)
|
||||
{
|
||||
return;
|
||||
@@ -46,7 +46,7 @@ public sealed partial class GravitySystem
|
||||
|
||||
var localPlayer = _playerManager.LocalEntity;
|
||||
|
||||
if (!TryComp<TransformComponent>(localPlayer, out var xform))
|
||||
if (!TryComp(localPlayer, out TransformComponent? xform))
|
||||
return;
|
||||
|
||||
if (xform.GridUid != uid ||
|
||||
|
||||
Reference in New Issue
Block a user