Avoid pan to 0,0 when followed player is not visible
This commit is contained in:
parent
59aa16d48f
commit
d8be8bc86c
1 changed files with 1 additions and 5 deletions
|
|
@ -592,9 +592,6 @@ DynMap.prototype = {
|
||||||
me.selectWorldAndPan(location.world, location, function() {
|
me.selectWorldAndPan(location.world, location, function() {
|
||||||
if(completed) completed();
|
if(completed) completed();
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
var latlng = me.maptype.getProjection().fromLocationToLatLng(location);
|
|
||||||
me.panToLatLng(latlng, completed);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
panToLayerPoint: function(point, completed) {
|
panToLayerPoint: function(point, completed) {
|
||||||
|
|
@ -779,8 +776,7 @@ DynMap.prototype = {
|
||||||
if (me.followingPlayer !== player) {
|
if (me.followingPlayer !== player) {
|
||||||
me.followPlayer(null);
|
me.followPlayer(null);
|
||||||
}
|
}
|
||||||
if(player.location.world)
|
me.panToLocation(player.location);
|
||||||
me.panToLocation(player.location);
|
|
||||||
});
|
});
|
||||||
player.menuname.data('sort', player.sort);
|
player.menuname.data('sort', player.sort);
|
||||||
// Inject into playerlist alphabetically
|
// Inject into playerlist alphabetically
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue