Inline OwnerUid
This commit is contained in:
@@ -36,7 +36,7 @@ public class SlowContactsSystem : EntitySystem
|
||||
|
||||
foreach (var colliding in _physics.GetCollidingEntities(physicsComponent))
|
||||
{
|
||||
var ent = colliding.OwnerUid;
|
||||
var ent = ((IComponent) colliding).Owner;
|
||||
if (!EntityManager.TryGetComponent<SlowContactsComponent>(ent, out var slowContactsComponent))
|
||||
continue;
|
||||
|
||||
@@ -49,7 +49,7 @@ public class SlowContactsSystem : EntitySystem
|
||||
|
||||
private void OnEntityExit(EntityUid uid, SlowContactsComponent component, EndCollideEvent args)
|
||||
{
|
||||
var otherUid = args.OtherFixture.Body.OwnerUid;
|
||||
var otherUid = ((IComponent) args.OtherFixture.Body).Owner;
|
||||
if (!EntityManager.HasComponent<MovementSpeedModifierComponent>(otherUid)
|
||||
|| !EntityManager.HasComponent<SlowsOnContactComponent>(otherUid))
|
||||
return;
|
||||
@@ -64,7 +64,7 @@ public class SlowContactsSystem : EntitySystem
|
||||
|
||||
private void OnEntityEnter(EntityUid uid, SlowContactsComponent component, StartCollideEvent args)
|
||||
{
|
||||
var otherUid = args.OtherFixture.Body.OwnerUid;
|
||||
var otherUid = ((IComponent) args.OtherFixture.Body).Owner;
|
||||
if (!EntityManager.HasComponent<MovementSpeedModifierComponent>(otherUid))
|
||||
return;
|
||||
if (!_statusCapableInContact.ContainsKey(otherUid))
|
||||
|
||||
@@ -96,15 +96,15 @@ namespace Content.Shared.Movement
|
||||
protected void HandleMobMovement(IMoverComponent mover, PhysicsComponent physicsComponent,
|
||||
IMobMoverComponent mobMover)
|
||||
{
|
||||
DebugTools.Assert(!UsedMobMovement.ContainsKey(mover.OwnerUid));
|
||||
DebugTools.Assert(!UsedMobMovement.ContainsKey(mover.Owner));
|
||||
|
||||
if (!UseMobMovement(physicsComponent))
|
||||
{
|
||||
UsedMobMovement[mover.OwnerUid] = false;
|
||||
UsedMobMovement[mover.Owner] = false;
|
||||
return;
|
||||
}
|
||||
|
||||
UsedMobMovement[mover.OwnerUid] = true;
|
||||
UsedMobMovement[mover.Owner] = true;
|
||||
var transform = IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(mover.Owner);
|
||||
var weightless = mover.Owner.IsWeightless(physicsComponent, mapManager: _mapManager, entityManager: _entityManager);
|
||||
var (walkDir, sprintDir) = mover.VelocityDir;
|
||||
@@ -167,7 +167,7 @@ namespace Content.Shared.Movement
|
||||
IoCManager.Resolve<IEntityManager>().HasComponent<MobStateComponent>(body.Owner) &&
|
||||
// If we're being pulled then don't mess with our velocity.
|
||||
(!IoCManager.Resolve<IEntityManager>().TryGetComponent(body.Owner, out SharedPullableComponent? pullable) || !pullable.BeingPulled) &&
|
||||
_blocker.CanMove(body.OwnerUid);
|
||||
_blocker.CanMove(((IComponent) body).Owner);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user