Important
Supports Terraria 1.4.5.5 (world file version 318)
🐛 Bug Fixes
-
Fix spray undo regression: preserve CheckTiles across spray ticks
-
Remove per-tick generation increment in SprayAtPoint that was resetting
the dedup state, causing already-painted tiles to be re-saved to undo
with their modified state (corrupting undo) and re-painted redundantly -
The generation set in MouseDown now persists across the entire spray
stroke, so each tile is only saved to undo and painted once -
Fix flood fill skipping leftmost tile column (x=0)
-
Change boundary check from lFillLoc <= 0 to lFillLoc < 0 so the
leftward scan processes x=0 instead of stopping one tile early
📦 Other Changes
-
Brush performance optimization: cache, buffers, generation counter
-
Cache brush shape offsets in BrushSettings, translate on stamp instead of
recalculating geometry per interpolation point (~70-85% CPU reduction) -
Move ThickenLine/ErodeShape to BrushSettings as public static helpers
-
Pre-allocate stamp/line/sweep buffers in BrushToolBase to eliminate
per-frame List/HashSet allocations -
Replace bool[] CheckTiles + Array.Clear with int[] + generation counter
to skip 20MB clear on each stroke start -
Update all tool files (Pencil, Morph, Sprite, Fill, Hammer, DrawApi,
WorldEditor) to use generation-based dedup pattern -
Texture loading message
👥 Contributors
- @BinaryConstruct (4 commits)