This commit is contained in:
ckcz123 2019-04-01 20:43:11 +08:00
parent e6e604ee7c
commit 075899df87
3 changed files with 6 additions and 16 deletions

View File

@ -473,13 +473,9 @@ control.prototype.setAutomaticRoute = function (destX, destY, stepPostfix) {
if (this._setAutomaticRoute_clickMoveDirectly(destX, destY, stepPostfix)) return;
// 找寻自动寻路路线
var moveStep = core.automaticRoute(destX, destY);
if (moveStep.length == 0) {
if (destX != core.status.hero.loc.x || destY != core.status.hero.loc.y)
return;
moveStep = [];
}
var moveStep = moveStep.concat(stepPostfix);
if (moveStep.length == 0) return;
if (moveStep.length == 0 && (destX != core.status.hero.loc.x || destY != core.status.hero.loc.y || stepPostfix.length == 0))
return;
moveStep = moveStep.concat(stepPostfix);
core.status.automaticRoute.destX=destX;
core.status.automaticRoute.destY=destY;
this._setAutomaticRoute_drawRoute(moveStep);

View File

@ -183,7 +183,7 @@ events.prototype._gameOver_doUpload = function (username, ending, norank) {
formData.append('money', core.status.hero.money);
formData.append('experience', core.status.hero.experience);
formData.append('steps', core.status.hero.steps);
formData.append('norank', norank || 0);
formData.append('norank', norank ? 1 : 0);
formData.append('seed', core.getFlag('__seed__'));
formData.append('totalTime', Math.floor(core.status.hero.statistics.totalTime / 1000));
formData.append('route', core.encodeRoute(core.status.route));
@ -2041,7 +2041,7 @@ events.prototype.jumpHero = function (ex, ey, time, callback) {
var sx=core.status.hero.loc.x, sy=core.status.hero.loc.y;
if (!core.isset(ex)) ex=sx;
if (!core.isset(ey)) ey=sy;
core.maps.__playJumpSound();
core.playSound('jump.mp3');
var jumpInfo = core.maps.__generateJumpInfo(sx, sy, ex, ey, time || 500);
jumpInfo.icon = core.material.icons.hero[core.getHeroLoc('direction')];
jumpInfo.height = core.material.icons.hero.height;

View File

@ -1645,9 +1645,7 @@ maps.prototype.jumpBlock = function (sx, sy, ex, ey, time, keep, callback) {
var block = blockArr[0], blockInfo = blockArr[1];
var canvases = this._initDetachedBlock(blockInfo, sx, sy, block.event.animate !== false);
this._moveDetachedBlock(blockInfo, 32 * sx, 32 * sy, 1, canvases);
this.__playJumpSound();
core.playSound('jump.mp3');
var jumpInfo = this.__generateJumpInfo(sx, sy, ex, ey, time);
jumpInfo.keep = keep;
@ -1664,10 +1662,6 @@ maps.prototype.__generateJumpInfo = function (sx, sy, ex, ey, time) {
};
}
maps.prototype.__playJumpSound = function () {
core.playSound('jump.mp3');
}
maps.prototype._jumpBlock_doJump = function (blockInfo, canvases, jumpInfo, callback) {
var animate = window.setInterval(function () {
if (jumpInfo.jump_count > 0)