- stunned characters don't move their hands behind their back when cuffed (caused the characters to flail around when someone grabs them)
- characters can run while grabbing/dragging someone - inventory and chatbox are hidden when stunned - turret rotation is reset between minRotation and maxRotation when changing the rotation limits - fixed explosion damage being applied to simPositions of the limbs instead of worldpositions
This commit is contained in:
@@ -156,6 +156,13 @@ namespace Barotrauma
|
||||
}
|
||||
strongestImpact = 0.0f;
|
||||
|
||||
|
||||
if (stunTimer > 0)
|
||||
{
|
||||
stunTimer -= deltaTime;
|
||||
return;
|
||||
}
|
||||
|
||||
if (character.LockHands)
|
||||
{
|
||||
var leftHand = GetLimb(LimbType.LeftHand);
|
||||
@@ -185,15 +192,13 @@ namespace Barotrauma
|
||||
//rightHand.pullJoint.Enabled = true;
|
||||
//rightHand.pullJoint.WorldAnchorB = midPos;
|
||||
}
|
||||
|
||||
if (stunTimer > 0)
|
||||
else
|
||||
{
|
||||
stunTimer -= deltaTime;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Anim != Animation.UsingConstruction) ResetPullJoints();
|
||||
|
||||
if (Anim != Animation.UsingConstruction) ResetPullJoints();
|
||||
|
||||
}
|
||||
|
||||
if (SimplePhysicsEnabled)
|
||||
{
|
||||
UpdateStandingSimple();
|
||||
@@ -287,7 +292,7 @@ namespace Barotrauma
|
||||
float slowdownFactor = (float)limbsInWater / (float)Limbs.Count();
|
||||
|
||||
float maxSpeed = Math.Max(TargetMovement.Length() - slowdownFactor, 1.0f);
|
||||
if (character.SelectedCharacter!=null) maxSpeed = Math.Min(maxSpeed, 1.0f);
|
||||
// if (character.SelectedCharacter!=null) maxSpeed = Math.Min(maxSpeed, 1.0f);
|
||||
|
||||
TargetMovement = Vector2.Normalize(TargetMovement) * maxSpeed;
|
||||
}
|
||||
@@ -933,10 +938,11 @@ namespace Barotrauma
|
||||
{
|
||||
pullLimb.pullJoint.Enabled = true;
|
||||
pullLimb.pullJoint.WorldAnchorB = targetLimb.SimPosition;
|
||||
pullLimb.pullJoint.MaxForce = 100.0f;
|
||||
pullLimb.pullJoint.MaxForce = 10000.0f;
|
||||
|
||||
targetLimb.pullJoint.Enabled = true;
|
||||
targetLimb.pullJoint.WorldAnchorB = pullLimb.SimPosition;
|
||||
targetLimb.pullJoint.MaxForce = 10000.0f;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1030,6 +1030,12 @@ namespace Barotrauma
|
||||
PressureTimer = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
if (controlled == this)
|
||||
{
|
||||
Lights.LightManager.ViewTarget = this;
|
||||
CharacterHUD.Update(deltaTime, this);
|
||||
}
|
||||
|
||||
if (IsUnconscious)
|
||||
{
|
||||
@@ -1039,8 +1045,6 @@ namespace Barotrauma
|
||||
|
||||
if (controlled == this)
|
||||
{
|
||||
Lights.LightManager.ViewTarget = this;
|
||||
CharacterHUD.Update(deltaTime,this);
|
||||
ControlLocalPlayer(deltaTime, cam);
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace Barotrauma
|
||||
|
||||
DrawStatusIcons(spriteBatch, character);
|
||||
|
||||
if (!character.IsUnconscious)
|
||||
if (!character.IsUnconscious && character.Stun <= 0.0f)
|
||||
{
|
||||
if (character.Inventory != null && !character.LockHands &&
|
||||
character.Stun >= -0.1f) character.Inventory.DrawOwn(spriteBatch, Vector2.Zero);
|
||||
@@ -193,7 +193,10 @@ namespace Barotrauma
|
||||
|
||||
suicideButton.OnClicked = (button, userData) =>
|
||||
{
|
||||
character.Kill(character.CauseOfDeath);
|
||||
if (Character.Controlled != null)
|
||||
{
|
||||
Character.Controlled.Kill(Character.Controlled.CauseOfDeath);
|
||||
}
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -67,6 +67,8 @@ namespace Barotrauma.Items.Components
|
||||
Vector2 vector = ToolBox.ParseToVector2(value);
|
||||
minRotation = MathHelper.ToRadians(vector.X);
|
||||
maxRotation = MathHelper.ToRadians(vector.Y);
|
||||
|
||||
rotation = (minRotation + maxRotation) / 2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ namespace Barotrauma
|
||||
|
||||
if (limb.WorldPosition == worldPosition) continue;
|
||||
|
||||
c.AddDamage(limb.SimPosition, DamageType.None,
|
||||
c.AddDamage(limb.WorldPosition, DamageType.None,
|
||||
damage / c.AnimController.Limbs.Length * distFactor, 0.0f, stun * distFactor, false);
|
||||
if (force > 0.0f)
|
||||
{
|
||||
|
||||
@@ -306,8 +306,8 @@ namespace Barotrauma.Networking
|
||||
{
|
||||
if (gameStarted && Screen.Selected == GameMain.GameScreen)
|
||||
{
|
||||
//chatBox.Visible = Character.Controlled == null || !Character.Controlled.IsUnconscious;
|
||||
chatMsgBox.Visible = Character.Controlled == null || !Character.Controlled.IsUnconscious;
|
||||
chatMsgBox.Visible = Character.Controlled == null ||
|
||||
(!Character.Controlled.IsUnconscious && Character.Controlled.Stun >= 0.0f);
|
||||
|
||||
inGameHUD.Update(deltaTime);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user