version 1.31 | | version 1.32 |
---|
| | |
/* | | /* |
* static char *rcsid_button_c = | | * static char *rcsid_button_c = |
* "$Id: button.c,v 1.31 2006/02/09 00:48:36 akirschbaum Exp $"; | | * "$Id: button.c,v 1.32 2006/07/06 04:22:20 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
Copyright (C) 2002 Mark Wedel & Crossfire Development Team | | Copyright (C) 2006,2002 Mark Wedel & Crossfire Development Team |
Copyright (C) 1992 Frank Tore Johansen | | Copyright (C) 1992 Frank Tore Johansen |
| | |
This program is free software; you can redistribute it and/or modify | | This program is free software; you can redistribute it and/or modify |
| | |
if (op->stats.ac == push) | | if (op->stats.ac == push) |
return 0; | | return 0; |
op->stats.ac = push; | | op->stats.ac = push; |
| | if (NUM_ANIMATIONS(op)>1) { |
SET_ANIMATION (op, push); | | SET_ANIMATION (op, push); |
update_object (op, UP_OBJ_FACE); | | update_object (op, UP_OBJ_FACE); |
| | } |
if (in_movement || ! push) | | if (in_movement || ! push) |
return 0; | | return 0; |
} | | } |
| | |
if (op->stats.ac == push) | | if (op->stats.ac == push) |
return 0; | | return 0; |
op->stats.ac = push; | | op->stats.ac = push; |
| | if (NUM_ANIMATIONS(op)>1) { |
SET_ANIMATION (op, push); | | SET_ANIMATION (op, push); |
update_object(op,UP_OBJ_FACE); | | update_object(op,UP_OBJ_FACE); |
| | } |
if (in_movement || ! push) | | if (in_movement || ! push) |
return 0; | | return 0; |
} | | } |
| | |
if (in_movement) | | if (in_movement) |
return 0; | | return 0; |
if (operate_altar (op, &cause)) { | | if (operate_altar (op, &cause)) { |
| | if (NUM_ANIMATIONS(op)>1) { |
SET_ANIMATION (op, 1); | | SET_ANIMATION (op, 1); |
update_object(op,UP_OBJ_FACE); | | update_object(op,UP_OBJ_FACE); |
| | } |
| | |
if (op->last_sp >= 0) { | | if (op->last_sp >= 0) { |
trigger_move (op, 1); | | trigger_move (op, 1); |
| | |
return 0; | | return 0; |
} | | } |
} else { | | } else { |
| | if (NUM_ANIMATIONS(op)>1) { |
SET_ANIMATION (op, 0); | | SET_ANIMATION (op, 0); |
update_object(op,UP_OBJ_FACE); | | update_object(op,UP_OBJ_FACE); |
| | } |
| | |
/* If trigger_altar has "last_sp > 0" set on the map, | | /* If trigger_altar has "last_sp > 0" set on the map, |
* it will push the connected value only once per sacrifice. | | * it will push the connected value only once per sacrifice. |
| | |
return 0; | | return 0; |
push = 1; | | push = 1; |
} | | } |
| | if (NUM_ANIMATIONS(op)>1) { |
SET_ANIMATION (op, push); | | SET_ANIMATION (op, push); |
update_object(op,UP_OBJ_FACE); | | update_object(op,UP_OBJ_FACE); |
| | } |
trigger_move (op, push); | | trigger_move (op, push); |
return 1; | | return 1; |
| | |