Add 'followmap' and 'followzoom' to allow setting of map and zoom when starting to follow a player
This commit is contained in:
parent
204b54155a
commit
a5bc33e1e9
3 changed files with 16 additions and 1 deletions
|
|
@ -719,7 +719,15 @@ DynMap.prototype = {
|
|||
|
||||
if(player) {
|
||||
$(player.menuitem).addClass('following');
|
||||
me.panToLocation(player.location);
|
||||
me.panToLocation(player.location, function() {
|
||||
if(me.options.followmap && me.world) {
|
||||
var pmap = me.world.maps[me.options.followmap];
|
||||
if(pmap)
|
||||
me.selectMapAndPan(pmap);
|
||||
}
|
||||
if(me.options.followzoom)
|
||||
me.map.setZoom(me.options.followzoom);
|
||||
});
|
||||
}
|
||||
this.followingPlayer = player;
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue