… | |
… | |
1286 | |
1286 | |
1287 | /* Ideally, the caller figures this out. However, it complicates a lot |
1287 | /* Ideally, the caller figures this out. However, it complicates a lot |
1288 | * of areas of callers (eg, anything that uses find_free_spot would now |
1288 | * of areas of callers (eg, anything that uses find_free_spot would now |
1289 | * need extra work |
1289 | * need extra work |
1290 | */ |
1290 | */ |
|
|
1291 | maptile *newmap = m; |
1291 | if (!xy_normalise (m, op->x, op->y)) |
1292 | if (!xy_normalise (newmap, op->x, op->y)) |
1292 | { |
1293 | { |
1293 | op->head_ ()->destroy ();// remove head_ once all tail object destroyers found |
1294 | op->head_ ()->destroy ();// remove head_ once all tail object destroyers found |
1294 | return 0; |
1295 | return 0; |
1295 | } |
1296 | } |
1296 | |
1297 | |
… | |
… | |
1298 | if (!insert_ob_in_map (more, m, originator, flag)) |
1299 | if (!insert_ob_in_map (more, m, originator, flag)) |
1299 | return 0; |
1300 | return 0; |
1300 | |
1301 | |
1301 | CLEAR_FLAG (op, FLAG_REMOVED); |
1302 | CLEAR_FLAG (op, FLAG_REMOVED); |
1302 | |
1303 | |
1303 | op->map = m; |
1304 | op->map = newmap; |
1304 | mapspace &ms = op->ms (); |
1305 | mapspace &ms = op->ms (); |
1305 | |
1306 | |
1306 | /* this has to be done after we translate the coordinates. |
1307 | /* this has to be done after we translate the coordinates. |
1307 | */ |
1308 | */ |
1308 | if (op->nrof && !(flag & INS_NO_MERGE)) |
1309 | if (op->nrof && !(flag & INS_NO_MERGE)) |