OnDrunkChanged
function · objectlayer · primitive
- Address
0x5e2a90· 513 bytes, up to0x5e2c90- Meaning
- Refreshes the drunk camera and prints the drunk message for each threshold the level crosses
- Confidence
- verified, proof one
- Finding
- objectlayer/playerfields#drunk-messages
- Test
objectlayer::drunk_fraction_5e2a90_difftest
Finding: Drunk messages in objectlayer: player fields
PLAYER_BYTES_3 byte 1 is the drunk level, min(b,100)·0.01 as f32. For the active player it also
updates the target, name plates and camera. It tests the thresholds 0.01, 0.5 and 0.9 in that order,
as k = 0, 1 and 2: a rise across threshold k (old < t ≤ new) prints DRUNK_MESSAGE_SELF%d
(_OTHER%d with the name) for k + 2 and skips threshold k + 1; a fall across it (new < t ≤ old)
prints k + 1. A rise across two thresholds prints only the lower one's message, and a rise across
all three prints messages 2 and 4; a fall across two prints both, the lower first. A NaN level
crosses nothing.
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 11
- ClntObjMgrObjectPtr objectlayer
- ClntObjMgrGetActivePlayer objectlayer
- GetActiveCamera ui
- AddChatLine ui
- CCamera::SetDrunkFov uicamera
- SetNamePlateRefresh objectlayer
- CGUnit_C::CanAttack objectlayer
- CGUnit_C::GetUnitName objectlayer
- SStrPrintf storm
- FrameScript_GetText ui
- FrameScript_SignalEvent2 ui
Calls and jumps by a bare address, from tables/calls.tsv.