diff --git a/_server/editor.js b/_server/editor.js index 6a125e2e..89049bbd 100644 --- a/_server/editor.js +++ b/_server/editor.js @@ -1009,7 +1009,6 @@ editor.prototype.listen = function () { editor.updateMap(); fields.forEach(function(v){ editor.currentFloorData[v][now.x+','+now.y]=editor.currentFloorData[v][last.x+','+last.y] - if (!core.isset(editor.currentFloorData[v][now.x+','+now.y])) delete editor.currentFloorData[v][now.x+','+now.y]; }) editor.file.saveFloorFile(function (err) { if (err) { @@ -1054,10 +1053,8 @@ editor.prototype.listen = function () { fields.forEach(function(v){ var temp_atsfcytaf=editor.currentFloorData[v][now.x+','+now.y]; - if (!core.isset(editor.currentFloorData[v][last.x+','+last.y])) delete editor.currentFloorData[v][now.x+','+now.y]; - else editor.currentFloorData[v][now.x+','+now.y]=editor.currentFloorData[v][last.x+','+last.y]; - if (!core.isset(temp_atsfcytaf)) delete editor.currentFloorData[v][last.x+','+last.y]; - else editor.currentFloorData[v][last.x+','+last.y]=temp_atsfcytaf + editor.currentFloorData[v][now.x+','+now.y]=editor.currentFloorData[v][last.x+','+last.y]; + editor.currentFloorData[v][last.x+','+last.y]=temp_atsfcytaf; }) editor.file.saveFloorFile(function (err) { if (err) {