benilla-re systems structs docs

CCamera::SetDrunkFov

function · uicamera · primitive

Address
0x511250 · 116 bytes, up to 0x5112c3
Signature
bool __thiscall (CCamera *this, float fraction, bool immediate)
Meaning
Sets or eases the field of view bias to 89 degrees times the drunk fraction
Confidence
verified, proof one
Finding
uicamera/effects#the-drunk-view
Test
ui::glue_511_511250_scale

Finding: The drunk view in uicamera: shake, bobbing, terrain tilt and the drunk view

0x511250(fraction, immediate) sets the field of view bias that drunkenness adds. The bias target is 89 degrees times the fraction (3.1241393 - π/2 times the fraction). With a nonzero second argument the bias is set at once; otherwise it eases through 0x512270 with no delay and a factor of 1. The followed player's drunk level, the byte at +0x1d of the field block +0xe68, kept to 100 and times 0.01, is the fraction; any other unit gives 0. The camera's field of view adds this bias to its base and keeps the sum between 0 and 179 degrees.

The derivation is in the doc.

Callers 2

Callees 2

Calls and jumps by a bare address, from tables/calls.tsv.