Fixed tiles not updating.

This commit is contained in:
FrozenCow 2011-02-13 22:42:08 +01:00
parent d5d737d385
commit db9ced3394
2 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ KzedMapType.prototype = $.extend(new DynMapType(), {
tileSize = 128;
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 {
// Other zoom levels.
tileSize = 128;
@ -72,7 +72,7 @@ KzedMapType.prototype = $.extend(new DynMapType(), {
tileSize = imgSize;
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};
// The next line is not:

View File

@ -454,9 +454,9 @@ DynMap.prototype = {
var tile = me.registeredTiles[tileName];
if(tile) {
return me.options.tileUrl + me.world + '/' + tileName + '.png?' + tile.lastseen;
return me.options.tileUrl + me.world + '/' + tileName + '?' + tile.lastseen;
} else {
return me.options.tileUrl + me.world + '/' + tileName + '.png?0';
return me.options.tileUrl + me.world + '/' + tileName + '?0';
}
},
registerTile: function(mapType, tileName, tile) {