CParticleEmitter2::Spawn
function · models · primitive
- Address
0x7b5550· 816 bytes, up to0x7b587f- Meaning
- Spawns an emitter's particles for a step from its rate, the density setting and the camera distance
- Confidence
- verified, proof one
- Finding
- models/particles#spawn-count
- Test
models::partspawndrv_count_subtract_difftest,models::partspawndrv_integrate_count_jepath_difftest,models::partspawndrv_integrate_count_r3path_difftest,models::partspawndrv_rel_delta_difftest,models::partspawndrv_t_scalar_difftest,models::partspawndrv_weighted_point_difftest
Finding: Spawn count in models: particles
The rate is the density setting times the emission rate times clamp(1 − (dist − 50)·0.02, 0.25, 1), a NaN factor counting as 1. A pending burst spawns ftol(rate) particles at once. An enabled
emitter adds rate·dt to its accumulator, which it stores as a float, spawns ftol(rate·dt + acc + 0.5) particles from the unrounded sum while free slots last, and subtracts the number spawned. With flag 0x1000 each spawn position is moved to a random point between the last and the
current position.
The derivation is in the doc.
Callers 1
- CParticleEmitter2::Step models
Callees 4
- __ftol crt
- NTempest::CRandom::uint32 random
- SetVector3 spline
- GetParticleDensity models
Calls and jumps by a bare address, from tables/calls.tsv.