Barotrauma icon indicating copy to clipboard operation
Barotrauma copied to clipboard

The Health UI displayes incorrectly When Head and Head attachments have different sourcerect and origin

Open Regalis11 opened this issue 1 year ago • 2 comments

Discussed in https://github.com/FakeFishGames/Barotrauma/discussions/14646

Originally posted by Raven-233486 September 16, 2024

Disclaimers

  • [X] I have searched the issue tracker to check if the issue has already been reported.
  • [X] My issue happened while using mods.

What happened?

The incorrect health UI image image However, the character displays correctly: image image

Reproduction steps

Biff_W reported issue 12068 that headattachments' sourcerects are unchangeable last year and it had been fixed, here's the link: https://github.com/FakeFishGames/Barotrauma/issues/12068

However, the fix only covered character limb, not about the health interface.

Reproduction steps (Make hair and head have different sourcerects): In human.xml:

      <Wearable type="Hair" commonness="0.05" >
        <sprite name="Hair 1" texture="%ModDir:2809175631%/Content/Characters/Human/Headattachments/Human_decor.png" sourcerect="0,0,240,480" origin="0.6125,0.3229" inheritorigin="false" inheritsourcerect="false" />
      </Wearable>

In HumanDefaultRagdoll.xml

<limb Name="Head (1)" ID="1" Type="Head" >
    <sprite texture="%ModDir:2809175631%/Content/Characters/Human/Human_[GENDER]_heads.png" sourcerect="0,0,160,228" depth="0.05" origin="0.6125,0.33" color="255,255,255,255" deadcolor="255,255,255,255" deadcolortime="0" ignoretint="False" />
    <tintmask texture="%ModDir:2809175631%/Content/Characters/Human/Human_[GENDER]_heads_mask.png" />
</limb>

Bug prevalence

Happens every time I play

Single player or multiplayer?

Single player

-

No response

Version

v1.5.9.2 (Summer Update Hotfix 2)

-

No response

Which operating system did you encounter this bug on?

Windows

Relevant error messages and crash reports

No response

Regalis11 avatar Sep 17 '24 14:09 Regalis11

Fixed in https://github.com/FakeFishGames/Barotrauma-development/commit/ee8c6f2f0b2fd92d32d3ed32ee5ac6064324b1d1

Regalis11 avatar Sep 17 '24 14:09 Regalis11

This problem still haven't been fixed https://github.com/FakeFishGames/Barotrauma/discussions/14646#discussioncomment-11023056

ToumanLin avatar Oct 23 '24 01:10 ToumanLin

The fix unfortunately didn't make it to this update, we still need to review and test it internally before we can get it to a public build. Sorry for the inconvenience!

Regalis11 avatar Oct 23 '24 06:10 Regalis11

Merged, closing. Fix coming up in the next release!

Regalis11 avatar Nov 18 '24 13:11 Regalis11

@Regalis11 I have a similar issue #15722 that hair is misaligned in character creation menu

A2ur3 avatar Mar 19 '25 08:03 A2ur3