<i>This post was originally made by <b>danij</b> on the dengDevs blog. It was posted under the categories: Engine, Mac OS X, Unix/Linux, Windows.</i>
I've been experiencing issues with engine resets for quite a while now, so I went in search of the cause of the problem.
First thing I found is that there is an issue with particle generator management. During a reset, definitions are re-read and thus any ptrs to the old structures become invalid, so all active ptcgen_t->def ptrs need to be updated. I've had a go at this myself but found the particle generator code too tricky to understand and/or something isn't working as expected because when iterating the active generators; their type (flat/state/type) is not being accurately determined.
Can you have a look at that skyjake? See particle.c around line #1422.
The second issue is similar to the above, material_t->xlat needs updating after both a reset and a texreset with a new texture translation ptr.