… | |
… | |
606 | * UP_OBJ_FACE: only the objects face has changed. |
606 | * UP_OBJ_FACE: only the objects face has changed. |
607 | */ |
607 | */ |
608 | void |
608 | void |
609 | update_object (object *op, int action) |
609 | update_object (object *op, int action) |
610 | { |
610 | { |
611 | MoveType move_on, move_off, move_block, move_slow; |
|
|
612 | |
|
|
613 | if (op == NULL) |
611 | if (op == NULL) |
614 | { |
612 | { |
615 | /* this should never happen */ |
613 | /* this should never happen */ |
616 | LOG (llevDebug, "update_object() called for NULL object.\n"); |
614 | LOG (llevDebug, "update_object() called for NULL object.\n"); |
617 | return; |
615 | return; |
… | |
… | |
1291 | * looks like instead of lots of conditions here. |
1289 | * looks like instead of lots of conditions here. |
1292 | * makes things faster, and effectively the same result. |
1290 | * makes things faster, and effectively the same result. |
1293 | */ |
1291 | */ |
1294 | |
1292 | |
1295 | /* Have object 'fall below' other objects that block view. |
1293 | /* Have object 'fall below' other objects that block view. |
1296 | * Unless those objects are exits, type 66 |
1294 | * Unless those objects are exits. |
1297 | * If INS_ON_TOP is used, don't do this processing |
1295 | * If INS_ON_TOP is used, don't do this processing |
1298 | * Need to find the object that in fact blocks view, otherwise |
1296 | * Need to find the object that in fact blocks view, otherwise |
1299 | * stacking is a bit odd. |
1297 | * stacking is a bit odd. |
1300 | */ |
1298 | */ |
1301 | if (!(flag & INS_ON_TOP) |
1299 | if (!(flag & INS_ON_TOP) |
1302 | && ms.flags () & P_BLOCKSVIEW |
1300 | && ms.flags () & P_BLOCKSVIEW |
1303 | && (op->face && !op->face->visibility)) |
1301 | && (op->face && !faces [op->face].visibility)) |
1304 | { |
1302 | { |
1305 | for (last = top; last != floor; last = last->below) |
1303 | for (last = top; last != floor; last = last->below) |
1306 | if (QUERY_FLAG (last, FLAG_BLOCKSVIEW) && (last->type != EXIT)) |
1304 | if (QUERY_FLAG (last, FLAG_BLOCKSVIEW) && (last->type != EXIT)) |
1307 | break; |
1305 | break; |
1308 | |
1306 | |
… | |
… | |
1431 | tmp1->x = op->x; |
1429 | tmp1->x = op->x; |
1432 | tmp1->y = op->y; |
1430 | tmp1->y = op->y; |
1433 | insert_ob_in_map (tmp1, op->map, op, 0); |
1431 | insert_ob_in_map (tmp1, op->map, op, 0); |
1434 | } |
1432 | } |
1435 | |
1433 | |
|
|
1434 | // XXX: function not returning object* |
1436 | object * |
1435 | object * |
1437 | object::insert_at (object *where, object *originator, int flags) |
1436 | object::insert_at (object *where, object *originator, int flags) |
1438 | { |
1437 | { |
1439 | where->map->insert (this, where->x, where->y, originator, flags); |
1438 | where->map->insert (this, where->x, where->y, originator, flags); |
1440 | } |
1439 | } |