Optimise precipitations

As it turns out, a large portion of the lag caused by precipitations comes from running the P_NullPrecipThinker thinkers, which is extremely slow in large maps because it means iterating a linked list with 20,000+ elements every tick, and is also largely useless since all this thinker does is resetting a flag and the interpolation variables. The actual processing is done on the rendering side and is a lot less performance-intensive in many cases.

This branch fixes it by simply no longer running that thinker at all, moving its logic directly into the rendering code like the rest.

In large maps like ACZ or CEZ, this can easily cut off 2 or 3 ms of game logic on my computer, which easily represents 80-90% of the processing time for precipitations.

Edited by LJ Sonic

Merge request reports

Loading