[CVarControl(AdminFlags.VarEdit)]
public static readonly CVarDef<float> MovementPushMassCap =
CVarDef.Create("movement.push_mass_cap", 1.75f, CVar.SERVER | CVar.REPLICATED);
+
+ /// <summary>
+ /// Is crawling enabled
+ /// </summary>
+ [CVarControl(AdminFlags.VarEdit)]
+ public static readonly CVarDef<bool> MovementCrawling =
+ CVarDef.Create("movement.crawling", true, CVar.SERVER | CVar.REPLICATED);
+
}
-using Content.Shared.Alert;
+using Content.Shared.Alert;
using Content.Shared.Buckle.Components;
+using Content.Shared.CCVar;
using Content.Shared.Damage;
using Content.Shared.Damage.Components;
using Content.Shared.Database;
using Content.Shared.Rejuvenate;
using Content.Shared.Standing;
using Robust.Shared.Audio;
+using Robust.Shared.Configuration;
using Robust.Shared.Input.Binding;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Systems;
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
[Dependency] private readonly StandingStateSystem _standingState = default!;
+ [Dependency] private readonly IConfigurationManager _cfgManager = default!;
public static readonly ProtoId<AlertPrototype> KnockdownAlert = "Knockdown";
private void ToggleKnockdown(Entity<CrawlerComponent?, KnockedDownComponent?> entity)
{
// We resolve here instead of using TryCrawling to be extra sure someone without crawler can't stand up early.
- if (!Resolve(entity, ref entity.Comp1, false))
+ if (!Resolve(entity, ref entity.Comp1, false) || !_cfgManager.GetCVar(CCVars.MovementCrawling))
return;
if (!Resolve(entity, ref entity.Comp2, false))
if (!KnockdownOver((entity, entity.Comp)))
return false;
- if (!_crawlerQuery.TryComp(entity, out var crawler))
+ if (!_crawlerQuery.TryComp(entity, out var crawler) || !_cfgManager.GetCVar(CCVars.MovementCrawling))
{
// If we can't crawl then just have us sit back up...
// In case you're wondering, the KnockdownOverCheck, returns if we're able to move, so if next update is null.