Update content for joints refactor (#4487)
* Update content for joints refactor * Fix tumbler * Fix pulling crash * Fixes
This commit is contained in:
@@ -6,6 +6,7 @@ using Content.Shared.Pulling.Components;
|
||||
using Robust.Client.Player;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Physics;
|
||||
|
||||
namespace Content.Client.Physics.Controllers
|
||||
{
|
||||
@@ -29,10 +30,14 @@ namespace Content.Client.Physics.Controllers
|
||||
|
||||
// We set joints to predicted given these can affect how our mob moves.
|
||||
// I would only recommend disabling this if you make pulling not use joints anymore (someday maybe?)
|
||||
foreach (var joint in body.Joints)
|
||||
|
||||
if (player.TryGetComponent(out JointComponent? jointComponent))
|
||||
{
|
||||
joint.BodyA.Predict = true;
|
||||
joint.BodyB.Predict = true;
|
||||
foreach (var joint in jointComponent.GetJoints)
|
||||
{
|
||||
joint.BodyA.Predict = true;
|
||||
joint.BodyB.Predict = true;
|
||||
}
|
||||
}
|
||||
|
||||
// If we're being pulled then we won't predict anything and will receive server lerps so it looks way smoother.
|
||||
|
||||
Reference in New Issue
Block a user