Auto-prune Empty Chunks in Level Files
* Discovered a bug where if you hit the Undo key to erase pixels and an entire chunk became empty by it, the chunk would have rendering errors and show as a solid black square instead of the level wallpaper showing through. * Chunks that have no pixels in them are culled from the chunker immediately when you call a Delete() operation. * The level file saver also calls a maintenance function to prune all empty chunks upon saving the file. So existing levels with broken chunks need only be re-saved to fix them.
This commit is contained in:
parent
93b28ccc04
commit
3824c9121a
|
@ -4,6 +4,10 @@ function main() {
|
|||
Self.SetHitbox(22+16, 16, 75-16, 86);
|
||||
|
||||
Events.OnCollide(function(e) {
|
||||
if (!e.Settled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.InHitbox) {
|
||||
EndLevel();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user