Rain::SpawnDrop
function · lighting · primitive
- Address
0x674c50· 1577 bytes, up to0x675278- Signature
void __thiscall (Rain *this, void *drop, float birth)- Meaning
- Seeds one rain drop: its velocity, its start on the box top, and its birth and death on the ground
- Confidence
- verified, proof one
- Finding
- lighting/precipitation#rain-drops
- Test
lighting::rainspawn_angle_difftest,lighting::rainspawn_cam_global_difftest,lighting::rainspawn_cell_delta_difftest,lighting::rainspawn_collide_pos_difftest,lighting::rainspawn_collide_scale_difftest,lighting::rainspawn_collide_wind_difftest,lighting::rainspawn_final_delta_difftest,lighting::rainspawn_lifetime_difftest,lighting::rainspawn_pos_offset_difftest,lighting::rainspawn_pos_seed_difftest,lighting::rainspawn_residual_difftest,lighting::rainspawn_sincos_difftest,lighting::rainspawn_sky_time_difftest,lighting::rainspawn_vel_mag_difftest,lighting::rainspawn_vel_xy_difftest,lighting::rainspawn_vel_z_difftest,lighting::rainspawn_velmag_difftest,lighting::rainspawn_wind_apply_difftest,lighting::rainspawn_wind_delta_difftest,lighting::rainspawn_wind_factor_difftest,lighting::rainspawn_wind_scale2_difftest,lighting::rainspawn_world_scale_difftest
Finding: Rain drops in lighting: precipitation
A drop is seeded at a random point of the box's horizontal centre plane. Its velocity is s·(sin a, cos a) across and vz down, with a = (0.2094395·x + 0.0523599)·(u − 0.5) − 1.57, s = (2(u − 0.5) + 9.49)·x + 0.01 and vz = −2x·r − 4x − 28, u and r uniform in [0, 1). Its position moves back by T = 37.5/|vz|, the time to fall half the box, onto the box's top. The position, not the velocity, is turned about the horizontal axis at heading −90° by up to 65° as the speed reaches 18, then moved by 1.75 times the player's velocity and by the camera.
The derivation is in the doc.
Callers 1
- Rain::EmitDrops lighting
Callees 7
- NTempest::CRandom::uint32 random
- SetVector3 spline
- Vector3LengthSquared spline
- LerpClamped lighting
- GetWeatherGrid lighting
- TransformPoint34Rows cmath
- RotateMatrix cmath
Calls and jumps by a bare address, from tables/calls.tsv.