_canMoveDirectly_checkStartPoint changeFloor

This commit is contained in:
ckcz123 2019-03-17 18:54:11 +08:00
parent 147da1b443
commit ac8faed0f3

View File

@ -461,12 +461,10 @@ maps.prototype._canMoveDirectly_checkGlobal = function () {
maps.prototype._canMoveDirectly_checkStartPoint = function (sx, sy) { maps.prototype._canMoveDirectly_checkStartPoint = function (sx, sy) {
if (core.status.checkBlock.damage[sx + core.bigmap.width * sy] > 0) return false; if (core.status.checkBlock.damage[sx + core.bigmap.width * sy] > 0) return false;
var id = core.getBlockId(sx, sy); var block = core.getBlock(sx, sy);
if (id != null) { if (block != null) {
// 楼梯或者传送点才能无视 // 只有起点是传送点才是能无视
if (["upFloor", "downFloor", "portal", "upPortal", "downPortal", "leftPortal", "rightPortal"].indexOf(id) >= 0) return block.block.event.trigger == 'changeFloor';
return true;
return false;
} }
return true; return true;
} }