diff --git a/public/libs/actions.js b/public/libs/actions.js index 680d8d2..1ea6fe2 100644 --- a/public/libs/actions.js +++ b/public/libs/actions.js @@ -660,24 +660,6 @@ actions.prototype._sys_ondown = function (x, y, px, py) { clearTimeout(core.timeout.onDownTimeout); core.timeout.onDownTimeout = null; - core.status.preview.prepareDragging = false; - if ( - !core.hasFlag('__lockViewport__') && - (core.status.thisMap.width > core._WIDTH_ || - core.status.thisMap.height > core._HEIGHT_) - ) { - core.status.preview.prepareDragging = true; - core.status.preview.px = px; - core.status.preview.py = py; - core.timeout.onDownTimeout = setTimeout(function () { - core.clearMap('ui'); - core.status.preview.prepareDragging = false; - core.status.preview.enabled = true; - core.status.preview.dragging = true; - core.drawTip('已进入预览模式,可直接拖动大地图'); - core.status.stepPostfix = []; - }, 500); - } }; ////// 当在触摸屏上滑动时 ////// @@ -730,24 +712,6 @@ actions.prototype._sys_onmove_choices = function (x, y, px, py) { actions.prototype._sys_onmove = function (x, y, px, py) { if (core.status.lockControl) return false; - if (core.status.preview?.dragging) { - core.setViewport( - core.bigmap.offsetX - px + core.status.preview.px, - core.bigmap.offsetY - py + core.status.preview.py - ); - core.status.preview.px = px; - core.status.preview.py = py; - return true; - } - if (core.status.preview?.prepareDragging) { - if ( - Math.abs(px - core.status.preview.px) <= 20 && - Math.abs(py - core.status.preview.py) <= 20 - ) - return true; - else core.status.preview.prepareDragging = false; - } - clearTimeout(core.timeout.onDownTimeout); core.timeout.onDownTimeout = null; @@ -810,14 +774,6 @@ actions.prototype._sys_onup = function (x, y, px, py) { clearInterval(core.interval.onDownInterval); core.interval.onDownInterval = null; - if (core.isPlaying()) { - core.status.preview.prepareDragging = false; - if (core.status.preview.dragging) { - core.status.preview.dragging = false; - return true; - } - } - if ((core.status.stepPostfix || []).length == 0) return false; var stepPostfix = []; diff --git a/public/libs/control.js b/public/libs/control.js index 007ad54..66b32e3 100644 --- a/public/libs/control.js +++ b/public/libs/control.js @@ -229,8 +229,7 @@ control.prototype._animationFrame_globalAnimate = function (timestamp) { if ( (core.status.hero || {}).animate && core.status.heroMoving == 0 && - main.mode == 'play' && - !core.status.preview.enabled + main.mode == 'play' ) { core.drawHero('stop', null, core.status.globalAnimateStatus); } diff --git a/public/libs/core.js b/public/libs/core.js index 682bb05..fe38f59 100644 --- a/public/libs/core.js +++ b/public/libs/core.js @@ -191,13 +191,6 @@ function core() { // 按下键的时间:为了判定双击 downTime: null, ctrlDown: false, - preview: { - enabled: false, - prepareDragging: false, - dragging: false, - px: 0, - py: 0 - }, // 路线&回放 route: [], diff --git a/src/plugin/game/fallback.ts b/src/plugin/game/fallback.ts index 4f9d5ce..e1850f6 100644 --- a/src/plugin/game/fallback.ts +++ b/src/plugin/game/fallback.ts @@ -171,8 +171,12 @@ export function init() { adapters['hero-adapter']?.sync('setAnimateDir', value); setHeroDirection(value as Dir); } else if (name === 'x') { + // 为了防止逆天样板出问题 + core.bigmap.posX = value as number; adapters['hero-adapter']?.sync('setHeroLoc', value); } else { + // 为了防止逆天样板出问题 + core.bigmap.posY = value as number; adapters['hero-adapter']?.sync('setHeroLoc', void 0, value); } }; diff --git a/src/types/status.d.ts b/src/types/status.d.ts index 76c5849..15bd9fd 100644 --- a/src/types/status.d.ts +++ b/src/types/status.d.ts @@ -542,33 +542,6 @@ interface AnimateObj { callback: () => void; } -interface ActionsPreview { - /** - * 大地图中当前是否正在拖拽 - */ - dragging: boolean; - - /** - * 大地图中是否允许拖拽 - */ - enabled: boolean; - - /** - * 大地图中当前是否已经按下了鼠标 - */ - prepareDragging: boolean; - - /** - * 当前鼠标的横坐标 - */ - px: number; - - /** - * 当前鼠标的纵坐标 - */ - py: number; -} - interface RouteFolding { /** * 录像折叠信息中的勇士信息 @@ -762,12 +735,6 @@ interface InitGameStatus { [P in keyof NumberToId]: Block

; }; - /** - * @deprecated - * 大地图中的拖拽处理 - */ - preview: ActionsPreview; - /** * 录像折叠信息 */