| 110 | } |
| 111 | |
| 112 | void CGameCharacter::UpdateTextCoordinates() |
| 113 | { |
| 114 | CTextData *text = (CTextData *)m_TextControl->Last(); |
| 115 | |
| 116 | if (text == nullptr) |
| 117 | { |
| 118 | return; |
| 119 | } |
| 120 | |
| 121 | const AnimationState anim = { this->GetGraphicForAnimation(), 0, 0 }; |
| 122 | const auto dims = g_AnimationManager.GetAnimationDimensions( |
| 123 | this->AnimIndex, anim, this->IsMounted(), this->IsCorpse()); |
| 124 | int offset = 0; |
| 125 | |
| 126 | int x = DrawX + OffsetX; |
| 127 | int y = DrawY + (OffsetY - OffsetZ) - ((dims.Height + dims.CenterY) + 8); |
| 128 | |
| 129 | if (g_ConfigManager.GetDrawStatusState() == DCSS_ABOVE || |
| 130 | g_ConfigManager.AlwaysDisplayHumanoidsName == true) |
| 131 | { |
| 132 | y -= 14; |
| 133 | } |
| 134 | |
| 135 | for (; text != nullptr; text = (CTextData *)text->m_Prev) |
| 136 | { |
| 137 | offset += text->m_TextSprite.Height; |
| 138 | |
| 139 | text->RealDrawX = x - (text->m_TextSprite.Width / 2); |
| 140 | text->RealDrawY = y - offset; |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | void CGameCharacter::UpdateHitsTexture(uint8_t hits) |
| 145 | { |
nothing calls this directly
no test coverage detected