ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.74k stars 630 forks source link

[GoldSource] Con_DrawNotify truncates messagemode unicode string #2127

Open 2010kohtep opened 5 years ago

2010kohtep commented 5 years ago

The function Con_DrawNotify, which is in the renderer library (hw/sw), has a bug related to the display of Unicode characters in the messagemode. If you try to enter a long unicode text, then after a certain number of characters the effect of deleting the previous entered characters appeared. The problem manifests itself best on small game extensions (1024x768, for example).

2019-04-13_17-46-34

After analyzing the library, I came to the conclusion that this effect arises because of calculations, which are not suitable for Unicode characters:

ub-1

To fix this problem, I used a patch, replacing some code:

image

After that, the problem was solved:

2019-04-13_17-55-03

I would also recommend to extend the chat_buffer variable size, since 120 may be too small for unicode text.

UDP: This bug is a GoldSource engine bug, not just CS 1.6.

afwn90cj93201nixr2e1re commented 5 years ago

Напиши им еще о том что чат съезжает при большом количестве символов на другую строку два раза, вместо одного. На маленьких разрешениях.