… | |
… | |
292 | * this is the original object, or if this is an object that should be created |
292 | * this is the original object, or if this is an object that should be created |
293 | * by another object. |
293 | * by another object. |
294 | */ |
294 | */ |
295 | if (flags & GT_ENVIRONMENT && op->type != SPELL) |
295 | if (flags & GT_ENVIRONMENT && op->type != SPELL) |
296 | { |
296 | { |
297 | op->x = creator->x; |
|
|
298 | op->y = creator->y; |
|
|
299 | SET_FLAG (op, FLAG_OBJ_ORIGINAL); |
297 | SET_FLAG (op, FLAG_OBJ_ORIGINAL); |
300 | insert_ob_in_map (op, creator->map, op, INS_NO_MERGE | INS_NO_WALK_ON); |
298 | op->insert_at (creator, creator, INS_NO_MERGE | INS_NO_WALK_ON); |
301 | } |
299 | } |
302 | else |
300 | else |
303 | { |
301 | { |
304 | op = insert_ob_in_ob (op, creator); |
302 | op = creator->insert (op); |
305 | |
303 | |
306 | if ((flags & GT_APPLY) && QUERY_FLAG (creator, FLAG_MONSTER)) |
304 | if ((flags & GT_APPLY) && QUERY_FLAG (creator, FLAG_MONSTER)) |
307 | monster_check_apply (creator, op); |
305 | monster_check_apply (creator, op); |
308 | |
306 | |
309 | if ((flags & GT_UPDATE_INV) && (tmp = creator->in_player ())) |
307 | if ((flags & GT_UPDATE_INV) && (tmp = creator->in_player ())) |
… | |
… | |
1499 | CLEAR_FLAG (op, FLAG_ANIMATE); |
1497 | CLEAR_FLAG (op, FLAG_ANIMATE); |
1500 | /* so artifacts will join */ |
1498 | /* so artifacts will join */ |
1501 | if (!QUERY_FLAG (op, FLAG_ALIVE)) |
1499 | if (!QUERY_FLAG (op, FLAG_ALIVE)) |
1502 | op->speed = 0.0; |
1500 | op->speed = 0.0; |
1503 | |
1501 | |
1504 | update_ob_speed (op); |
1502 | op->set_speed (op->speed); |
1505 | } |
1503 | } |
1506 | |
1504 | |
1507 | if (change->nrof) |
1505 | if (change->nrof) |
1508 | op->nrof = RANDOM () % ((int) change->nrof) + 1; |
1506 | op->nrof = RANDOM () % ((int) change->nrof) + 1; |
1509 | |
1507 | |