Disable pushing (#6760)
This commit is contained in:
@@ -291,7 +291,7 @@ namespace Content.Shared.CCVar
|
|||||||
/// Technically client doesn't need to know about it but this may prevent a bug in the distant future so it stays.
|
/// Technically client doesn't need to know about it but this may prevent a bug in the distant future so it stays.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
public static readonly CVarDef<bool> MobPushing =
|
public static readonly CVarDef<bool> MobPushing =
|
||||||
CVarDef.Create("physics.mob_pushing", true, CVar.REPLICATED);
|
CVarDef.Create("physics.mob_pushing", false, CVar.REPLICATED);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Lobby music
|
* Lobby music
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ namespace Content.Shared.Movement.EntitySystems
|
|||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
Get<SharedPhysicsSystem>().KinematicControllerCollision += HandleCollisionMessage;
|
Get<SharedPhysicsSystem>().KinematicControllerCollision += OnMobCollision;
|
||||||
IoCManager.Resolve<IConfigurationManager>().OnValueChanged(CCVars.MobPushing, SetPushing, true);
|
IoCManager.Resolve<IConfigurationManager>().OnValueChanged(CCVars.MobPushing, SetPushing, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -29,13 +29,13 @@ namespace Content.Shared.Movement.EntitySystems
|
|||||||
{
|
{
|
||||||
base.Shutdown();
|
base.Shutdown();
|
||||||
IoCManager.Resolve<IConfigurationManager>().UnsubValueChanged(CCVars.MobPushing, SetPushing);
|
IoCManager.Resolve<IConfigurationManager>().UnsubValueChanged(CCVars.MobPushing, SetPushing);
|
||||||
Get<SharedPhysicsSystem>().KinematicControllerCollision -= HandleCollisionMessage;
|
Get<SharedPhysicsSystem>().KinematicControllerCollision -= OnMobCollision;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fake pushing for player collisions.
|
/// Fake pushing for player collisions.
|
||||||
/// </summary>
|
/// </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;
|
if (!_pushingEnabled) return;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user