public static float OverrideMaxSprintDistance(this MovementCapabilitiesDef @this) { try { EngineMisc.CalculateMovementStat(mechDef, ref walkSpeed, ref runSpeed, ref TTWalkSpeed); return(runSpeed); } catch (Exception e) { Control.mod.Logger.LogError(e); return(@this.MaxSprintDistance); } }
public static float OverrideMaxSprintDistance(this MovementCapabilitiesDef @this) { try { movement = mechDef?.GetEngineMovement(); if (movement != null) { return(movement.RunSpeed); } } catch (Exception e) { Control.mod.Logger.LogError(e); } return(@this.MaxSprintDistance); }