non-null in location

This commit is contained in:
ckcz123 2018-12-04 18:58:39 +08:00
parent 105d73e0af
commit fd90933673

View File

@ -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) {