bugfixes / typos

This commit is contained in:
Thomas Rudin 2019-01-24 20:55:20 +01:00
parent 433c670e74
commit d601d4bd4e
4 changed files with 10 additions and 5 deletions

View File

@ -1,7 +1,7 @@
Minetest mapserver
=======
Relatime mapserver for Minetest
Realtime mapserver for Minetest
# Development state

View File

@ -21,7 +21,7 @@ func NewTileCoords(x, y, zoom int, layerId int) *TileCoords {
func (tc *TileCoords) ZoomOut(n int) *TileCoords {
var nc *TileCoords = tc
for i := 1; i < n; i++ {
for i := 0; i < n; i++ {
nc = nc.GetZoomedOutTile()
}

View File

@ -1,11 +1,12 @@
package tilerendererjob
import (
"github.com/sirupsen/logrus"
"mapserver/app"
"mapserver/coords"
"mapserver/mapblockparser"
"strconv"
"github.com/sirupsen/logrus"
)
func getTileKey(tc *coords.TileCoords) string {
@ -41,6 +42,11 @@ func renderMapblocks(ctx *app.App, jobs chan *coords.TileCoords, mblist []*mapbl
logrus.WithFields(fields).Debug("Dispatching tile rendering (z11-1)")
tilecount++
//remove tile
ctx.Objectdb.RemoveTile(tc)
//dispatch re-render
jobs <- tc
}
}

View File

@ -7,8 +7,7 @@ import (
func worker(ctx *app.App, coords <-chan *coords.TileCoords) {
for tc := range coords {
ctx.Objectdb.RemoveTile(tc)
_, err := ctx.Tilerenderer.Render(tc, 2)
_, err := ctx.Tilerenderer.Render(tc, 5)
if err != nil {
panic(err)
}