Add some additional logging to requests and world resizes

This commit is contained in:
Marc Di Luzio 2020-07-07 22:46:34 +01:00
parent 47df02ec7e
commit d9e97ea468
2 changed files with 13 additions and 2 deletions

View file

@ -1,6 +1,7 @@
package atlas
import (
"log"
"math/rand"
"github.com/mdiluz/rove/pkg/maths"
@ -218,6 +219,9 @@ func (a *Atlas) worldSpaceToChunkWithGrow(v vector.Vector) int {
Chunks: make([]Chunk, size.X*size.Y),
}
// Log that we're resizing
log.Printf("Re-allocating world, old: %+v,%+v new: %+v,%+v\n", a.LowerBound, a.UpperBound, newAtlas.LowerBound, newAtlas.UpperBound)
// Copy all old chunks into the new atlas
for chunk, chunkData := range a.Chunks {