diff --git a/VERSION b/VERSION index 5ff02fa2..cb339f4e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.152 +8.3.153 diff --git a/database/DBcellcopy.c b/database/DBcellcopy.c index 4d100439..cda6e83d 100644 --- a/database/DBcellcopy.c +++ b/database/DBcellcopy.c @@ -439,12 +439,14 @@ dbPaintSubFunc(tile, cxp) Tile *tile; /* Pointer to source tile with shield type */ TreeContext *cxp; /* Context from DBTreeSrTiles */ { - Rect rect; + SearchContext *scx; + Rect sourceRect, targetRect; int pNum; TileType type, loctype, subType; Plane *plane; struct dbCopySubData *csd; /* Client data */ + scx = cxp->tc_scx; csd = (struct dbCopySubData *)cxp->tc_filter->tf_arg; plane = csd->csd_plane; pNum = csd->csd_pNum; @@ -457,10 +459,14 @@ dbPaintSubFunc(tile, cxp) } /* Construct the rect for the tile */ - TITORECT(tile, &rect); + TITORECT(tile, &sourceRect); + + /* Transform to target coordinates */ + GEOTRANSRECT(&scx->scx_trans, &sourceRect, &targetRect); + csd->csd_modified = TRUE; - return DBNMPaintPlane(plane, type, &rect, DBStdPaintTbl(subType, pNum), + return DBNMPaintPlane(plane, type, &targetRect, DBStdPaintTbl(subType, pNum), (PaintUndoInfo *)NULL); } @@ -497,8 +503,6 @@ dbEraseNonSub(tile, cxp) loctype = (SplitSide(tile)) ? SplitRightType(tile) : SplitLeftType(tile); if (loctype == TT_SPACE) return 0; } - else - loctype = type; /* Construct the rect for the tile */ TITORECT(tile, &sourceRect); @@ -507,7 +511,7 @@ dbEraseNonSub(tile, cxp) GEOTRANSRECT(&scx->scx_trans, &sourceRect, &targetRect); /* Erase the substrate type from the area of this tile in the target plane. */ - return DBNMPaintPlane(plane, loctype, &targetRect, DBStdEraseTbl(subType, pNum), + return DBNMPaintPlane(plane, type, &targetRect, DBStdEraseTbl(subType, pNum), (PaintUndoInfo *)NULL); } diff --git a/extract/ExtMain.c b/extract/ExtMain.c index fbc0bf5a..e81e331e 100644 --- a/extract/ExtMain.c +++ b/extract/ExtMain.c @@ -692,7 +692,10 @@ extExtractStack(stack, doExtract, rootDef) /* Replace any modified substrate planes */ for (; sl; sl = sl->sl_next) { - ExtRevertSubstrate(sl->sl_def, sl->sl_plane); + // ExtRevertSubstrate(sl->sl_def, sl->sl_plane); + DBFreePaintPlane(sl->sl_plane); + TiFreePlane(sl->sl_plane); + freeMagic(sl); }