Set mover velocity via system (#6288)
This commit is contained in:
@@ -19,7 +19,7 @@ namespace Content.Server.Audio
|
||||
if (!EntityManager.TryGetComponent<AmbientSoundComponent>(uid, out var ambientSound)) return;
|
||||
if (ambientSound.Enabled == args.Supply) return;
|
||||
ambientSound.Enabled = args.Supply;
|
||||
ambientSound.Dirty();
|
||||
Dirty(ambientSound);
|
||||
}
|
||||
|
||||
private void HandlePowerChange(EntityUid uid, AmbientOnPoweredComponent component, PowerChangedEvent args)
|
||||
@@ -27,7 +27,7 @@ namespace Content.Server.Audio
|
||||
if (!EntityManager.TryGetComponent<AmbientSoundComponent>(uid, out var ambientSound)) return;
|
||||
if (ambientSound.Enabled == args.Powered) return;
|
||||
ambientSound.Enabled = args.Powered;
|
||||
ambientSound.Dirty();
|
||||
Dirty(ambientSound);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace Content.Server.Buckle.Systems
|
||||
continue;
|
||||
}
|
||||
buckled.ReAttach(strap);
|
||||
buckled.Dirty();
|
||||
Dirty(buckled);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -223,7 +223,8 @@ namespace Content.Server.Cargo
|
||||
{
|
||||
if (comp.Database == null || comp.Database.Id != id)
|
||||
continue;
|
||||
comp.Dirty();
|
||||
|
||||
Dirty(comp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
|
||||
private void OnSolutionChange(EntityUid uid, HyposprayComponent component, SolutionChangedEvent args)
|
||||
{
|
||||
component.Dirty();
|
||||
Dirty(component);
|
||||
}
|
||||
|
||||
public void OnAfterInteract(EntityUid uid, HyposprayComponent comp, AfterInteractEvent args)
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Content.Server.Chemistry.EntitySystems
|
||||
|
||||
private void OnSolutionChange(EntityUid uid, InjectorComponent component, SolutionChangedEvent args)
|
||||
{
|
||||
component.Dirty();
|
||||
Dirty(component);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace Content.Server.Cuffs
|
||||
{
|
||||
cuffable.CanStillInteract = handCount > cuffable.CuffedHandCount;
|
||||
cuffable.CuffedStateChanged();
|
||||
cuffable.Dirty();
|
||||
Dirty(cuffable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,7 +417,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
}
|
||||
|
||||
if (count != component.RecentlyEjected.Count)
|
||||
component.Dirty();
|
||||
Dirty(component);
|
||||
|
||||
return state == SharedDisposalUnitComponent.PressureState.Ready && component.RecentlyEjected.Count == 0;
|
||||
}
|
||||
@@ -604,7 +604,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
|
||||
if (!component.RecentlyEjected.Contains(entity))
|
||||
component.RecentlyEjected.Add(entity);
|
||||
|
||||
component.Dirty();
|
||||
Dirty(component);
|
||||
HandleStateChange(component, true);
|
||||
UpdateVisualState(component);
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Content.Server.Flash
|
||||
{
|
||||
flashable.LastFlash = _gameTiming.CurTime;
|
||||
flashable.Duration = flashDuration / 1000f; // TODO: Make this sane...
|
||||
flashable.Dirty();
|
||||
Dirty(flashable);
|
||||
|
||||
_stunSystem.TrySlowdown(target, TimeSpan.FromSeconds(flashDuration/1000f), true,
|
||||
slowTo, slowTo);
|
||||
|
||||
@@ -49,10 +49,10 @@ namespace Content.Server.Physics.Controllers
|
||||
base.UpdateBeforeSolve(prediction, frameTime);
|
||||
_excludedMobs.Clear();
|
||||
|
||||
foreach (var (mobMover, mover, physics) in EntityManager.EntityQuery<IMobMoverComponent, IMoverComponent, PhysicsComponent>())
|
||||
foreach (var (mobMover, mover, physics, xform) in EntityManager.EntityQuery<IMobMoverComponent, IMoverComponent, PhysicsComponent, TransformComponent>())
|
||||
{
|
||||
_excludedMobs.Add(mover.Owner);
|
||||
HandleMobMovement(mover, physics, mobMover);
|
||||
HandleMobMovement(mover, physics, mobMover, xform);
|
||||
}
|
||||
|
||||
HandleShuttleMovement(frameTime);
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Content.Server.Weapon.Ranged
|
||||
// Instead of dirtying on hand-select this component should probably by dirtied whenever it needs to be.
|
||||
// I take no responsibility for this code. It was like this when I got here.
|
||||
|
||||
component.Dirty();
|
||||
Dirty(component);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user