Added UpdateUseItem method from d253863
This commit is contained in:
@@ -127,18 +127,8 @@ namespace Barotrauma.Items.Components
|
||||
Color.Red, Color.Green);
|
||||
#endif
|
||||
|
||||
picker.AnimController.Anim = AnimController.Animation.UsingConstruction;
|
||||
|
||||
picker.AnimController.TargetMovement = Vector2.Zero;
|
||||
|
||||
leftHand.Disabled = true;
|
||||
leftHand.pullJoint.Enabled = true;
|
||||
leftHand.pullJoint.WorldAnchorB = item.SimPosition + Vector2.UnitY * ((pickTimer / 10.0f) % 0.1f);
|
||||
|
||||
rightHand.Disabled = true;
|
||||
rightHand.pullJoint.Enabled = true;
|
||||
rightHand.pullJoint.WorldAnchorB = item.SimPosition + Vector2.UnitY * ((pickTimer / 10.0f) % 0.1f);
|
||||
|
||||
picker.AnimController.UpdateUseItem(true, item.SimPosition + Vector2.UnitY * ((pickTimer / 10.0f) % 0.1f));
|
||||
|
||||
pickTimer += CoroutineManager.DeltaTime;
|
||||
|
||||
yield return CoroutineStatus.Running;
|
||||
|
||||
@@ -258,7 +258,8 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
if (currLength > MaxLength)
|
||||
{
|
||||
Vector2 pullBackDir = Vector2.Normalize(nodes[nodes.Count - 1] - newNodePos);
|
||||
Vector2 diff = nodes[nodes.Count - 1] - newNodePos;
|
||||
Vector2 pullBackDir = diff == Vector2.Zero ? Vector2.Zero : Vector2.Normalize(diff);
|
||||
user.AnimController.Collider.ApplyForce(pullBackDir * user.Mass * 50.0f);
|
||||
user.AnimController.UpdateUseItem(true, user.SimPosition + pullBackDir * 2.0f);
|
||||
if (currLength > MaxLength * 1.5f)
|
||||
|
||||
Reference in New Issue
Block a user