Disable pushing (#6760)

This commit is contained in:
metalgearsloth
2022-03-03 13:32:03 +11:00
committed by GitHub
parent 6116fb3f92
commit 834b2e4d58
2 changed files with 4 additions and 4 deletions

View File

@@ -16,7 +16,7 @@ namespace Content.Shared.Movement.EntitySystems
public override void Initialize()
{
base.Initialize();
Get<SharedPhysicsSystem>().KinematicControllerCollision += HandleCollisionMessage;
Get<SharedPhysicsSystem>().KinematicControllerCollision += OnMobCollision;
IoCManager.Resolve<IConfigurationManager>().OnValueChanged(CCVars.MobPushing, SetPushing, true);
}
@@ -29,13 +29,13 @@ namespace Content.Shared.Movement.EntitySystems
{
base.Shutdown();
IoCManager.Resolve<IConfigurationManager>().UnsubValueChanged(CCVars.MobPushing, SetPushing);
Get<SharedPhysicsSystem>().KinematicControllerCollision -= HandleCollisionMessage;
Get<SharedPhysicsSystem>().KinematicControllerCollision -= OnMobCollision;
}
/// <summary>
/// Fake pushing for player collisions.
/// </summary>
private void HandleCollisionMessage(Fixture ourFixture, Fixture otherFixture, float frameTime, Vector2 worldNormal)
private void OnMobCollision(Fixture ourFixture, Fixture otherFixture, float frameTime, Vector2 worldNormal)
{
if (!_pushingEnabled) return;