Fixed characters dragging husks by their tongue when GrabLimb is set to None, removed hardcoded texts from the grab button. Closes #210
This commit is contained in:
@@ -205,7 +205,7 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
grabHoldButton = new GUIButton(
|
grabHoldButton = new GUIButton(
|
||||||
new Rectangle(character.SelectedCharacter.Inventory.SlotPositions[0].ToPoint() + new Point(320, -60), new Point(130, 20)),
|
new Rectangle(character.SelectedCharacter.Inventory.SlotPositions[0].ToPoint() + new Point(320, -60), new Point(130, 20)),
|
||||||
"Grabbing: " + (character.AnimController.GrabLimb == LimbType.Torso ? "Torso" : "Hands"), "");
|
TextManager.Get("Grabbing") + ": " + TextManager.Get(character.AnimController.GrabLimb == LimbType.None ? "Hands" : character.AnimController.GrabLimb.ToString()), "");
|
||||||
|
|
||||||
grabHoldButton.OnClicked = (button, userData) =>
|
grabHoldButton.OnClicked = (button, userData) =>
|
||||||
{
|
{
|
||||||
@@ -223,7 +223,7 @@ namespace Barotrauma
|
|||||||
GameMain.Client.CreateEntityEvent(Character.Controlled, new object[] { NetEntityEvent.Type.Control });
|
GameMain.Client.CreateEntityEvent(Character.Controlled, new object[] { NetEntityEvent.Type.Control });
|
||||||
}
|
}
|
||||||
|
|
||||||
grabHoldButton.Text = "Grabbing: " + (Character.Controlled.AnimController.GrabLimb == LimbType.Torso ? "Torso" : "Hands");
|
grabHoldButton.Text = TextManager.Get("Grabbing") + ": " + TextManager.Get(character.AnimController.GrabLimb == LimbType.None ? "Hands" : character.AnimController.GrabLimb.ToString());
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,11 +54,30 @@
|
|||||||
<Grabbing>Grabbing</Grabbing>
|
<Grabbing>Grabbing</Grabbing>
|
||||||
<Stun>Stun</Stun>
|
<Stun>Stun</Stun>
|
||||||
|
|
||||||
|
|
||||||
<!-- Status -->
|
<!-- Status -->
|
||||||
<StatusOK>OK</StatusOK>
|
<StatusOK>OK</StatusOK>
|
||||||
<Unconscious>Unconscious</Unconscious>
|
<Unconscious>Unconscious</Unconscious>
|
||||||
<Injured>Injured</Injured>
|
<Injured>Injured</Injured>
|
||||||
|
|
||||||
|
<!-- Limbs -->
|
||||||
|
<LeftHand>Left hand</LeftHand>
|
||||||
|
<RightHand>Right hand</RightHand>
|
||||||
|
<Hands>Hands</Hands>
|
||||||
|
<LeftArm>Left arm</LeftArm>
|
||||||
|
<RightArm>Right arm</RightArm>
|
||||||
|
<LeftLeg>Left leg</LeftLeg>
|
||||||
|
<RightLeg>Right leg</RightLeg>
|
||||||
|
<LeftFoot>Left foot</LeftFoot>
|
||||||
|
<RightFoot>Right foot</RightFoot>
|
||||||
|
<Head>Head</Head>
|
||||||
|
<Torso>Torso</Torso>
|
||||||
|
<Tail>Tail</Tail>
|
||||||
|
<Legs>Legs</Legs>
|
||||||
|
<RightThigh>Right thigh</RightThigh>
|
||||||
|
<LeftThigh>Left thigh</LeftThigh>
|
||||||
|
<Waist>Waist</Waist>
|
||||||
|
|
||||||
<!-- Misc -->
|
<!-- Misc -->
|
||||||
<Yes>Yes</Yes>
|
<Yes>Yes</Yes>
|
||||||
<No>No</No>
|
<No>No</No>
|
||||||
|
|||||||
@@ -1034,7 +1034,8 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
Limb targetLimb = target.AnimController.GetLimb(GrabLimb);
|
Limb targetLimb = target.AnimController.GetLimb(GrabLimb);
|
||||||
|
|
||||||
if (targetLimb == null || targetLimb.IsSevered)
|
//grab hands if GrabLimb is not specified (or torso if the character has no hands)
|
||||||
|
if (GrabLimb == LimbType.None || targetLimb.IsSevered)
|
||||||
{
|
{
|
||||||
targetLimb = target.AnimController.GetLimb(LimbType.Torso);
|
targetLimb = target.AnimController.GetLimb(LimbType.Torso);
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user