Skip to content

Store the life of a particle in 32 bit, do not spawn a negative one - #1071

Open
Reveares wants to merge 1 commit into
Try:masterfrom
Reveares:fix/pfx-life-widen
Open

Reveares wants to merge 1 commit into
Try:masterfrom
Reveares:fix/pfx-life-widen

Conversation

@Reveares

@Reveares Reveares commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

PfxBucket::init converted the random life to uint16_t. FIRE_SPARKS (Gothic II wall torches, lspPartAvg 300, lspPartVar 3000) results in 300 ± 3000, so anywhere from −2700 to +3300, which wrapped to about 64 s.
BIRDFLY (100000 ms) kept the low 16 bits, 34.5 s. In the original a particle with a negative life never appears and a 100 s life lasts well past 65 s.

life and maxLife are now 32 bit. At 0 or below 0 it stores 0, which is not spawned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant