Disable pushing (#6760)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user