Fix body component not setting client movement speed on initialize
This commit is contained in:
@@ -58,10 +58,9 @@ namespace Content.Shared.GameObjects.Components.Body
|
||||
[ViewVariables]
|
||||
public IReadOnlyDictionary<string, IBodyPart> Parts => _parts;
|
||||
|
||||
[ViewVariables]
|
||||
public IReadOnlyDictionary<string, string> PartIds => _partIds;
|
||||
|
||||
[ViewVariables] public IReadOnlyDictionary<string, string> PartIDs => _partIds;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -116,6 +115,7 @@ namespace Content.Shared.GameObjects.Components.Body
|
||||
}
|
||||
|
||||
Connections = cleanedConnections;
|
||||
CalculateSpeed();
|
||||
}
|
||||
|
||||
protected virtual bool CanAddPart(string slot, IBodyPart part)
|
||||
@@ -473,7 +473,7 @@ namespace Content.Shared.GameObjects.Components.Body
|
||||
var legs = GetPartsWithProperty<LegComponent>();
|
||||
float speedSum = 0;
|
||||
|
||||
foreach (var leg in GetPartsWithProperty<LegComponent>())
|
||||
foreach (var leg in legs)
|
||||
{
|
||||
var footDistance = DistanceToNearestFoot(leg.part);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user