Fixed tiles not updating.
This commit is contained in:
parent
f9631cc1b6
commit
503932ef41
2 changed files with 4 additions and 4 deletions
|
|
@ -49,7 +49,7 @@ KzedMapType.prototype = $.extend(new DynMapType(), {
|
||||||
|
|
||||||
tileSize = 128;
|
tileSize = 128;
|
||||||
imgSize = tileSize;
|
imgSize = tileSize;
|
||||||
tileName = 'z' + this.prefix + '_' + (-coord.x * tileSize*2) + '_' + (coord.y * tileSize*2);
|
tileName = 'z' + this.prefix + '_' + (-coord.x * tileSize*2) + '_' + (coord.y * tileSize*2) + '.png';
|
||||||
} else {
|
} else {
|
||||||
// Other zoom levels.
|
// Other zoom levels.
|
||||||
tileSize = 128;
|
tileSize = 128;
|
||||||
|
|
@ -72,7 +72,7 @@ KzedMapType.prototype = $.extend(new DynMapType(), {
|
||||||
tileSize = imgSize;
|
tileSize = imgSize;
|
||||||
|
|
||||||
if (offset.x == 0 && offset.y == 0) {
|
if (offset.x == 0 && offset.y == 0) {
|
||||||
tileName = this.prefix + '_' + (-mapcoord.x) + '_' + mapcoord.y;
|
tileName = this.prefix + '_' + (-mapcoord.x) + '_' + mapcoord.y + '.png';
|
||||||
}
|
}
|
||||||
offset = {x: 0, y: 0};
|
offset = {x: 0, y: 0};
|
||||||
// The next line is not:
|
// The next line is not:
|
||||||
|
|
|
||||||
|
|
@ -454,9 +454,9 @@ DynMap.prototype = {
|
||||||
var tile = me.registeredTiles[tileName];
|
var tile = me.registeredTiles[tileName];
|
||||||
|
|
||||||
if(tile) {
|
if(tile) {
|
||||||
return me.options.tileUrl + me.world + '/' + tileName + '.png?' + tile.lastseen;
|
return me.options.tileUrl + me.world + '/' + tileName + '?' + tile.lastseen;
|
||||||
} else {
|
} else {
|
||||||
return me.options.tileUrl + me.world + '/' + tileName + '.png?0';
|
return me.options.tileUrl + me.world + '/' + tileName + '?0';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
registerTile: function(mapType, tileName, tile) {
|
registerTile: function(mapType, tileName, tile) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue