bugfixes / typos
This commit is contained in:
parent
433c670e74
commit
d601d4bd4e
@ -1,7 +1,7 @@
|
|||||||
Minetest mapserver
|
Minetest mapserver
|
||||||
=======
|
=======
|
||||||
|
|
||||||
Relatime mapserver for Minetest
|
Realtime mapserver for Minetest
|
||||||
|
|
||||||
# Development state
|
# Development state
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ func NewTileCoords(x, y, zoom int, layerId int) *TileCoords {
|
|||||||
|
|
||||||
func (tc *TileCoords) ZoomOut(n int) *TileCoords {
|
func (tc *TileCoords) ZoomOut(n int) *TileCoords {
|
||||||
var nc *TileCoords = tc
|
var nc *TileCoords = tc
|
||||||
for i := 1; i < n; i++ {
|
for i := 0; i < n; i++ {
|
||||||
nc = nc.GetZoomedOutTile()
|
nc = nc.GetZoomedOutTile()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
package tilerendererjob
|
package tilerendererjob
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/sirupsen/logrus"
|
|
||||||
"mapserver/app"
|
"mapserver/app"
|
||||||
"mapserver/coords"
|
"mapserver/coords"
|
||||||
"mapserver/mapblockparser"
|
"mapserver/mapblockparser"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
func getTileKey(tc *coords.TileCoords) string {
|
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)")
|
logrus.WithFields(fields).Debug("Dispatching tile rendering (z11-1)")
|
||||||
|
|
||||||
tilecount++
|
tilecount++
|
||||||
|
|
||||||
|
//remove tile
|
||||||
|
ctx.Objectdb.RemoveTile(tc)
|
||||||
|
|
||||||
|
//dispatch re-render
|
||||||
jobs <- tc
|
jobs <- tc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,7 @@ import (
|
|||||||
|
|
||||||
func worker(ctx *app.App, coords <-chan *coords.TileCoords) {
|
func worker(ctx *app.App, coords <-chan *coords.TileCoords) {
|
||||||
for tc := range coords {
|
for tc := range coords {
|
||||||
ctx.Objectdb.RemoveTile(tc)
|
_, err := ctx.Tilerenderer.Render(tc, 5)
|
||||||
_, err := ctx.Tilerenderer.Render(tc, 2)
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user