mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-30 19:41:56 +00:00
Optimizes changing z level as a ghost by something like 85% (#73005) <!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> Optimizes hud image addition/removal on z change We were doing a lot of repeated work here, not to mention all the proc calls. So I pushed the "operate on loops" behavior into its own proc, so I could ensure we only do some of this stuff once This plus some removal of safeties saves 75% of the cost of z level transitions as a ghost Prevents double on_changed_z_level calls from ghosts and shuttles Reacting to z changes used to be done off doMove or one of those children, timber moved it to Moved, but did not remove the calls that assumed things like abstract_move wouldn't trigger it This means that moving up/down as a ghost was causing a double call of the whole z move stack. Suprised this never broke anything tbh Makes csv stat tracking actually encode numbers properly, cleans up an indev comment from plane group code ## Why It's Good For The Game Speed, and fixes Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>