Stair improvements, inventory "tooltip" & condition progressbar, reactor tries to match the highest load of the connected junction boxes (instead of the sum of the loads)
This commit is contained in:
@@ -6,8 +6,6 @@ namespace Barotrauma
|
||||
{
|
||||
class AnimController : Ragdoll
|
||||
{
|
||||
public bool IsStanding;
|
||||
|
||||
public enum Animation { None, Climbing, UsingConstruction, Struggle };
|
||||
public Animation Anim;
|
||||
|
||||
@@ -32,7 +30,7 @@ namespace Barotrauma
|
||||
get { return stunTimer; }
|
||||
set
|
||||
{
|
||||
if (float.IsNaN(value) || float.IsInfinity(value)) return;
|
||||
if (!MathUtils.IsValid(value)) return;
|
||||
stunTimer = value;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -573,7 +573,6 @@ namespace Barotrauma
|
||||
Vector2 targetMovement = GetTargetMovement();
|
||||
|
||||
AnimController.TargetMovement = targetMovement;
|
||||
AnimController.IsStanding = true;
|
||||
|
||||
AnimController.IgnorePlatforms = targetMovement.Y < 0.0f;
|
||||
|
||||
@@ -721,8 +720,6 @@ namespace Barotrauma
|
||||
/// </summary>
|
||||
public void ControlLocalPlayer(float deltaTime, Camera cam, bool moveCam = true)
|
||||
{
|
||||
AnimController.IsStanding = true;
|
||||
|
||||
Limb head = AnimController.GetLimb(LimbType.Head);
|
||||
|
||||
Lights.LightManager.ViewPos = ConvertUnits.ToDisplayUnits(head.SimPosition);
|
||||
@@ -733,19 +730,6 @@ namespace Barotrauma
|
||||
{
|
||||
keys[i].SetState();
|
||||
}
|
||||
|
||||
// keys[(int)InputType.Left].SetState(GameMain.Config.KeyBind(inpu));
|
||||
//keys[(int)InputType.Right].SetState(PlayerInput.KeyDown(Keys.D));
|
||||
//keys[(int)InputType.Up].SetState(PlayerInput.KeyDown(Keys.W));
|
||||
//keys[(int)InputType.Down].SetState(PlayerInput.KeyDown(Keys.S));
|
||||
|
||||
//keys[(int)InputType.Select].SetState(PlayerInput.KeyHit(Keys.E));
|
||||
//keys[(int)InputType.ActionHit].SetState(PlayerInput.LeftButtonClicked());
|
||||
//keys[(int)InputType.ActionHeld].SetState(PlayerInput.GetMouseState.LeftButton == ButtonState.Pressed);
|
||||
//keys[(int)InputType.SecondaryHit].SetState(PlayerInput.RightButtonClicked());
|
||||
//keys[(int)InputType.SecondaryHeld].SetState(PlayerInput.GetMouseState.RightButton == ButtonState.Pressed);
|
||||
|
||||
//keys[(int)InputType.Run].SetState(PlayerInput.KeyDown(Keys.LeftShift));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1458,8 +1442,6 @@ namespace Barotrauma
|
||||
return;
|
||||
}
|
||||
|
||||
AnimController.IsStanding = true;
|
||||
|
||||
keys[(int)InputType.Use].Held = actionKeyState;
|
||||
keys[(int)InputType.Use].SetState(false, actionKeyState);
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ namespace Barotrauma
|
||||
default:
|
||||
if (inWater)
|
||||
UpdateSwimming();
|
||||
else if (IsStanding)
|
||||
else
|
||||
UpdateStanding();
|
||||
|
||||
break;
|
||||
|
||||
@@ -303,6 +303,11 @@ namespace Barotrauma
|
||||
}
|
||||
else if (structure.StairDirection!=Direction.None && lowestLimb != null)
|
||||
{
|
||||
float stairPosY = structure.StairDirection == Direction.Right ?
|
||||
lowestLimb.Position.X - structure.Rect.X : structure.Rect.Width - (lowestLimb.Position.X - structure.Rect.X);
|
||||
|
||||
if (lowestLimb.Position.Y < stairPosY) return;
|
||||
|
||||
if (targetMovement.Y < 0.5f)
|
||||
{
|
||||
if (inWater || lowestLimb.Position.Y < structure.Rect.Y - structure.Rect.Height + 50.0f)
|
||||
|
||||
Reference in New Issue
Block a user