… | |
… | |
480 | } |
480 | } |
481 | |
481 | |
482 | void |
482 | void |
483 | move_hole (object *op) |
483 | move_hole (object *op) |
484 | { /* 1 = opening, 0 = closing */ |
484 | { /* 1 = opening, 0 = closing */ |
485 | object *next, *tmp; |
|
|
486 | |
|
|
487 | if (op->value) |
485 | if (op->value) |
488 | { /* We're opening */ |
486 | { /* We're opening */ |
489 | if (--op->stats.wc <= 0) |
487 | if (--op->stats.wc <= 0) |
490 | { /* Opened, let's stop */ |
488 | { /* Opened, let's stop */ |
491 | op->stats.wc = 0; |
489 | op->stats.wc = 0; |
492 | op->set_speed (0); |
490 | op->set_speed (0); |
493 | |
491 | |
494 | /* Hard coding this makes sense for holes I suppose */ |
492 | /* Hard coding this makes sense for holes I suppose */ |
495 | op->move_on = MOVE_WALK; |
493 | op->move_on = MOVE_WALK; |
496 | for (tmp = op->above; tmp != NULL; tmp = next) |
494 | for (object *next, *tmp = op->above; tmp; tmp = next) |
497 | { |
495 | { |
498 | next = tmp->above; |
496 | next = tmp->above; |
499 | move_apply (op, tmp, tmp); |
497 | move_apply (op, tmp, tmp); |
500 | } |
498 | } |
501 | } |
499 | } |