version 1.10 | | version 1.11 |
---|
| | |
/* | | /* |
* static char *rcsid_button_c = | | * static char *rcsid_button_c = |
* "$Id: button.c,v 1.10 2001/02/26 00:06:21 avogl Exp $"; | | * "$Id: button.c,v 1.11 2001/03/09 00:42:58 avogl Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
if (operate_altar (op, &cause)) { | | if (operate_altar (op, &cause)) { |
SET_ANIMATION (op, 1); | | SET_ANIMATION (op, 1); |
update_object(op); | | update_object(op); |
| | |
| | if (op->last_sp >= 0) { |
trigger_move (op, 1); | | trigger_move (op, 1); |
| | if (op->last_sp > 0) |
| | op->last_sp = -op->last_sp; |
| | } |
| | else { |
| | /* for trigger altar with last_sp, the ON/OFF |
| | status (-> +/- value) is "simulated": */ |
| | op->value = !op->value; |
| | trigger_move (op, 1); |
| | op->last_sp = -op->last_sp; |
| | op->value = !op->value; |
| | } |
return cause == NULL; | | return cause == NULL; |
} else { | | } else { |
return 0; | | return 0; |
| | |
} else { | | } else { |
SET_ANIMATION (op, 0); | | SET_ANIMATION (op, 0); |
update_object(op); | | update_object(op); |
| | |
| | /* If trigger_altar has "last_sp > 0" set on the map, |
| | it will push the connected value only once per sacrifice. |
| | Otherwise (default), the connected value will be |
| | pushed twice: First by sacrifice, second by reset! -AV */ |
| | if (!op->last_sp) |
trigger_move (op, 0); | | trigger_move (op, 0); |
| | else { |
| | op->stats.wc = 0; |
| | op->value = !op->value; |
| | op->speed = 0; |
| | update_ob_speed(op); |
| | } |
} | | } |
return 0; | | return 0; |
| | |