s_chatBubbleRangeSquared
global · unassigned
- Address
0x806798· 4 bytes, up to0x80679b- Type
const float- Meaning
- Holds 400.0, the squared distance that ShowChatBubble compares with
- Confidence
- verified, proof one
- Finding
- ui/chatbubble#the-update-gates
Finding: The update gates in ui: the chat bubble
Every frame 0x4b0c30(player, speaker) decides a bubble's fate. It destroys the bubble when the
player is null, the speaker has no scene node (+0xe0), no model (+0xd8) or an unloaded model
data (0x7103d0 with 0). It then tests whether the scene drew the speaker in the last paint
(0x6704c0 on the node) and the squared distance to the player. Drawn and strictly under 400, a
bubble whose alpha is not 255 fades in; otherwise one with a non-zero alpha fades out and is hidden,
and returns when the speaker is drawn and near again. A speaker the scene does not draw loses its bubble from view; a
line spoken from exactly 20 yards spawns and then fades.
The derivation is in the doc.