Code cleanup: Purge obsoleted SharedPhysicsSystem methods (#26287)

Updated calls to SharedPhysicsSystem methods
This commit is contained in:
Tayrtahn
2024-03-25 02:37:25 -04:00
committed by GitHub
parent b2c5ae9023
commit 964c6d54ca
16 changed files with 43 additions and 43 deletions

View File

@@ -207,12 +207,12 @@ public abstract partial class SharedTetherGunSystem : EntitySystem
TransformSystem.Unanchor(target, targetXform);
component.Tethered = target;
var tethered = EnsureComp<TetheredComponent>(target);
_physics.SetBodyStatus(targetPhysics, BodyStatus.InAir, false);
_physics.SetBodyStatus(target, targetPhysics, BodyStatus.InAir, false);
_physics.SetSleepingAllowed(target, targetPhysics, false);
tethered.Tetherer = gunUid;
tethered.OriginalAngularDamping = targetPhysics.AngularDamping;
_physics.SetAngularDamping(targetPhysics, 0f);
_physics.SetLinearDamping(targetPhysics, 0f);
_physics.SetAngularDamping(target, targetPhysics, 0f);
_physics.SetLinearDamping(target, targetPhysics, 0f);
_physics.SetAngularVelocity(target, SpinVelocity, body: targetPhysics);
_physics.WakeBody(target, body: targetPhysics);
var thrown = EnsureComp<ThrownItemComponent>(component.Tethered.Value);
@@ -264,9 +264,9 @@ public abstract partial class SharedTetherGunSystem : EntitySystem
_thrown.StopThrow(component.Tethered.Value, thrown);
}
_physics.SetBodyStatus(targetPhysics, BodyStatus.OnGround);
_physics.SetBodyStatus(component.Tethered.Value, targetPhysics, BodyStatus.OnGround);
_physics.SetSleepingAllowed(component.Tethered.Value, targetPhysics, true);
_physics.SetAngularDamping(targetPhysics, Comp<TetheredComponent>(component.Tethered.Value).OriginalAngularDamping);
_physics.SetAngularDamping(component.Tethered.Value, targetPhysics, Comp<TetheredComponent>(component.Tethered.Value).OriginalAngularDamping);
}
if (!transfer)