| 142 | } |
| 143 | |
| 144 | void CGameCharacter::UpdateHitsTexture(uint8_t hits) |
| 145 | { |
| 146 | if (HitsPercent != hits || m_HitsTexture.Empty()) |
| 147 | { |
| 148 | HitsPercent = hits; |
| 149 | |
| 150 | char hitsText[10] = { 0 }; |
| 151 | sprintf_s(hitsText, "[%i%%]", hits); |
| 152 | |
| 153 | uint16_t color = 0x0044; |
| 154 | |
| 155 | if (hits < 30) |
| 156 | { |
| 157 | color = 0x0021; |
| 158 | } |
| 159 | else if (hits < 50) |
| 160 | { |
| 161 | color = 0x0030; |
| 162 | } |
| 163 | else if (hits < 80) |
| 164 | { |
| 165 | color = 0x0058; |
| 166 | } |
| 167 | |
| 168 | g_FontManager.GenerateA(3, m_HitsTexture, hitsText, color); |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | int CGameCharacter::IsSitting() |
| 173 | { |
no test coverage detected