Merge https://github.com/Regalis11/Barotrauma into develop
This commit is contained in:
+13
-10
@@ -1,10 +1,10 @@
|
||||
using Barotrauma.Items.Components;
|
||||
using Barotrauma.Extensions;
|
||||
using Barotrauma.Items.Components;
|
||||
using Barotrauma.Networking;
|
||||
using FarseerPhysics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Barotrauma.Extensions;
|
||||
using Barotrauma.Networking;
|
||||
|
||||
namespace Barotrauma
|
||||
{
|
||||
@@ -1550,6 +1550,10 @@ namespace Barotrauma
|
||||
target.AnimController.ResetPullJoints();
|
||||
}
|
||||
|
||||
bool targetPoseControlled =
|
||||
target.SelectedItem?.GetComponent<Controller>() is { ControlCharacterPose: true } ||
|
||||
target.SelectedSecondaryItem?.GetComponent<Controller>() is { ControlCharacterPose: true };
|
||||
|
||||
if (IsClimbing)
|
||||
{
|
||||
//cannot drag up ladders if the character is conscious
|
||||
@@ -1725,13 +1729,12 @@ namespace Barotrauma
|
||||
targetForce = 5000.0f;
|
||||
}
|
||||
|
||||
targetLimb.PullJointEnabled = true;
|
||||
targetLimb.PullJointMaxForce = targetForce;
|
||||
targetLimb.PullJointWorldAnchorB = targetAnchor;
|
||||
targetLimb.Disabled = true;
|
||||
|
||||
if (diff.LengthSquared() > 0.1f)
|
||||
if (!targetPoseControlled)
|
||||
{
|
||||
targetLimb.PullJointEnabled = true;
|
||||
targetLimb.PullJointMaxForce = targetForce;
|
||||
targetLimb.PullJointWorldAnchorB = targetAnchor;
|
||||
targetLimb.Disabled = true;
|
||||
target.AnimController.movement = -diff;
|
||||
}
|
||||
}
|
||||
@@ -1757,7 +1760,7 @@ namespace Barotrauma
|
||||
target.AnimController.IgnorePlatforms = IgnorePlatforms;
|
||||
target.AnimController.TargetMovement = TargetMovement;
|
||||
}
|
||||
else if (target is AICharacter && target != Character.Controlled)
|
||||
else if (target is AICharacter && target != Character.Controlled && !targetPoseControlled)
|
||||
{
|
||||
if (target.AnimController.Dir > 0 == WorldPosition.X > target.WorldPosition.X)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user