--- deliantra/server/common/button.C 2006/09/11 20:28:37 1.8 +++ deliantra/server/common/button.C 2006/09/14 22:33:58 1.10 @@ -1,9 +1,3 @@ - -/* - * static char *rcsid_button_c = - * "$Id: button.C,v 1.8 2006/09/11 20:28:37 root Exp $"; - */ - /* CrossFire, A Multiplayer game for X-windows @@ -24,7 +18,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - The authors can be reached via e-mail at crossfire-devel@real-time.com + The authors can be reached via e-mail at */ #include @@ -366,7 +360,6 @@ return 0; } - /* * operate_altar checks if sacrifice was accepted and removes sacrificed * objects. If sacrifice was succeed return 1 else 0. Might be better to @@ -376,11 +369,9 @@ * If this function returns 1, '*sacrifice' is modified to point to the * remaining sacrifice, or is set to NULL if the sacrifice was used up. */ - int operate_altar (object *altar, object **sacrifice) { - if (!altar->map) { LOG (llevError, "BUG: operate_altar(): altar has no map\n"); @@ -403,6 +394,7 @@ /* Round up any sacrifices. Altars don't make change either */ if (NROF_SACRIFICE (altar) % (*sacrifice)->value) number++; + *sacrifice = decrease_ob_nr (*sacrifice, number); } else @@ -410,6 +402,7 @@ if (altar->msg) new_info_map (NDI_BLACK, altar->map, altar->msg); + return 1; }