diff --git a/Content.Server/Chemistry/EntitySystems/VaporSystem.cs b/Content.Server/Chemistry/EntitySystems/VaporSystem.cs index 6b3e392080..fbcb14e4e6 100644 --- a/Content.Server/Chemistry/EntitySystems/VaporSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/VaporSystem.cs @@ -68,9 +68,6 @@ namespace Content.Server.Chemistry.EntitySystems // Set Move if (TryComp(vapor, out PhysicsComponent? physics)) { - _physics.SetLinearDamping(vapor, physics, 0f); - _physics.SetAngularDamping(vapor, physics, 0f); - _throwing.TryThrow(vapor, dir, speed, user: user); var distance = (target.Position - _transformSystem.GetWorldPosition(vaporXform)).Length(); diff --git a/Content.Shared/Movement/Systems/SharedMoverController.cs b/Content.Shared/Movement/Systems/SharedMoverController.cs index 97de3b3722..f2180c3381 100644 --- a/Content.Shared/Movement/Systems/SharedMoverController.cs +++ b/Content.Shared/Movement/Systems/SharedMoverController.cs @@ -71,6 +71,7 @@ public abstract partial class SharedMoverController : VirtualController private float _minDamping; private float _airDamping; private float _offGridDamping; + private float _frictionModifier; private const LookupFlags _touchingFlags = LookupFlags.Approximate | LookupFlags.Dynamic | LookupFlags.Static; @@ -93,6 +94,8 @@ public abstract partial class SharedMoverController : VirtualController InitializeInput(); InitializeRelay(); + + Subs.CVar(_configManager, CCVars.TileFrictionModifier, value => _frictionModifier = value, true); Subs.CVar(_configManager, CCVars.RelativeMovement, value => _relativeMovement = value, true); Subs.CVar(_configManager, CCVars.MinFriction, value => _minDamping = value, true); Subs.CVar(_configManager, CCVars.AirFriction, value => _airDamping = value, true); @@ -233,7 +236,7 @@ public abstract partial class SharedMoverController : VirtualController ContentTileDefinition? tileDef = null; var touching = false; - // Whether we use tilefriction or not + // Should we use tile friction or not? if (weightless || inAirHelpless) { // Find the speed we should be moving at and make sure we're not trying to move faster than that @@ -270,6 +273,7 @@ public abstract partial class SharedMoverController : VirtualController } else { + // Should we ignore the friction of the tile we're standing on? if (MapGridQuery.TryComp(xform.GridUid, out var gridComp) && _mapSystem.TryGetTileRef(xform.GridUid.Value, gridComp, xform.Coordinates, out var tile) && physicsComponent.BodyStatus == BodyStatus.OnGround) @@ -282,12 +286,12 @@ public abstract partial class SharedMoverController : VirtualController if (wishDir != Vector2.Zero) { - friction = moveSpeedComponent?.Friction ?? MovementSpeedModifierComponent.DefaultFriction; + friction = moveSpeedComponent?.Friction ?? MovementSpeedModifierComponent.DefaultFriction * _frictionModifier; friction *= tileDef?.MobFriction ?? tileDef?.Friction ?? 1f; } else { - friction = moveSpeedComponent?.FrictionNoInput ?? MovementSpeedModifierComponent.DefaultFrictionNoInput; + friction = moveSpeedComponent?.FrictionNoInput ?? MovementSpeedModifierComponent.DefaultFrictionNoInput * _frictionModifier; friction *= tileDef?.Friction ?? 1f; } diff --git a/Content.Shared/Weapons/Misc/SharedTetherGunSystem.cs b/Content.Shared/Weapons/Misc/SharedTetherGunSystem.cs index 4f99790d12..1498408f73 100644 --- a/Content.Shared/Weapons/Misc/SharedTetherGunSystem.cs +++ b/Content.Shared/Weapons/Misc/SharedTetherGunSystem.cs @@ -215,9 +215,6 @@ public abstract partial class SharedTetherGunSystem : EntitySystem _physics.SetBodyStatus(target, targetPhysics, BodyStatus.InAir, false); _physics.SetSleepingAllowed(target, targetPhysics, false); tethered.Tetherer = gunUid; - tethered.OriginalAngularDamping = targetPhysics.AngularDamping; - _physics.SetAngularDamping(target, targetPhysics, 0f); - _physics.SetLinearDamping(target, targetPhysics, 0f); _physics.SetAngularVelocity(target, SpinVelocity, body: targetPhysics); _physics.WakeBody(target, body: targetPhysics); var thrown = EnsureComp(component.Tethered.Value); @@ -271,7 +268,6 @@ public abstract partial class SharedTetherGunSystem : EntitySystem _physics.SetBodyStatus(component.Tethered.Value, targetPhysics, BodyStatus.OnGround); _physics.SetSleepingAllowed(component.Tethered.Value, targetPhysics, true); - _physics.SetAngularDamping(component.Tethered.Value, targetPhysics, Comp(component.Tethered.Value).OriginalAngularDamping); } if (!transfer) diff --git a/Content.Shared/Weapons/Misc/TetheredComponent.cs b/Content.Shared/Weapons/Misc/TetheredComponent.cs index 3a92c69fbf..5632eb0594 100644 --- a/Content.Shared/Weapons/Misc/TetheredComponent.cs +++ b/Content.Shared/Weapons/Misc/TetheredComponent.cs @@ -10,7 +10,4 @@ public sealed partial class TetheredComponent : Component { [DataField("tetherer"), AutoNetworkedField] public EntityUid Tetherer; - - [ViewVariables(VVAccess.ReadWrite), DataField("originalAngularDamping"), AutoNetworkedField] - public float OriginalAngularDamping; } diff --git a/Resources/Prototypes/Entities/Objects/Fun/Plushies/plushies.yml b/Resources/Prototypes/Entities/Objects/Fun/Plushies/plushies.yml index 60d2d47dbf..d3e9736af5 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/Plushies/plushies.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/Plushies/plushies.yml @@ -80,10 +80,10 @@ noRot: true - type: Item - type: Physics - angularDamping: 0.02 - linearDamping: 0.02 fixedRotation: true bodyType: Dynamic + - type: MovementIgnoreGravity + weightless: true - type: Fixtures fixtures: fix1: diff --git a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/spray.yml b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/spray.yml index 9079ee1cb6..377acb0e32 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/Janitorial/spray.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/Janitorial/spray.yml @@ -187,6 +187,8 @@ - ItemMask - type: Appearance - type: VaporVisuals + - type: TileFrictionModifier + modifier: 0 - type: entity parent: Vapor