ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/common/button.C
(Generate patch)

Comparing deliantra/server/common/button.C (file contents):
Revision 1.5 by root, Thu Aug 31 17:54:14 2006 UTC vs.
Revision 1.6 by root, Sun Sep 3 00:18:39 2006 UTC

1/* 1/*
2 * static char *rcsid_button_c = 2 * static char *rcsid_button_c =
3 * "$Id: button.C,v 1.5 2006/08/31 17:54:14 root Exp $"; 3 * "$Id: button.C,v 1.6 2006/09/03 00:18:39 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
219 obp = get_button_links (op); 219 obp = get_button_links (op);
220 /* LOG(llevDebug, "update_button: %s (%d)\n", op->name, op->count); */ 220 /* LOG(llevDebug, "update_button: %s (%d)\n", op->name, op->count); */
221 if (obp) 221 if (obp)
222 for (ol = obp->link; ol; ol = ol->next) { 222 for (ol = obp->link; ol; ol = ol->next) {
223 if (!ol->ob || ol->ob->count != ol->id) { 223 if (!ol->ob || ol->ob->count != ol->id) {
224 LOG(llevDebug, "Internal error in update_button (%s).\n", op->name); 224 LOG(llevDebug, "Internal error in update_button (%s).\n", &op->name);
225 continue; 225 continue;
226 } 226 }
227 tmp = ol->ob; 227 tmp = ol->ob;
228 if (tmp->type==BUTTON) { 228 if (tmp->type==BUTTON) {
229 for(ab=tmp->above,tot=0;ab!=NULL;ab=ab->above) 229 for(ab=tmp->above,tot=0;ab!=NULL;ab=ab->above)
340 if ( ! QUERY_FLAG (sacrifice, FLAG_ALIVE) 340 if ( ! QUERY_FLAG (sacrifice, FLAG_ALIVE)
341 && ! QUERY_FLAG (sacrifice, FLAG_IS_LINKED) 341 && ! QUERY_FLAG (sacrifice, FLAG_IS_LINKED)
342 && sacrifice->type != PLAYER) 342 && sacrifice->type != PLAYER)
343 { 343 {
344 if ((ARCH_SACRIFICE(altar) == sacrifice->arch->name || 344 if ((ARCH_SACRIFICE(altar) == sacrifice->arch->name ||
345 ARCH_SACRIFICE(altar) == sacrifice->name || 345 ARCH_SACRIFICE(altar) == sacrifice->name ||
346 ARCH_SACRIFICE(altar) == sacrifice->slaying || 346 ARCH_SACRIFICE(altar) == sacrifice->slaying ||
347 (!strcmp(ARCH_SACRIFICE(altar),query_base_name(sacrifice,0)))) 347 (!strcmp(ARCH_SACRIFICE(altar),query_base_name(sacrifice,0))))
348 && NROF_SACRIFICE(altar) <= (sacrifice->nrof?sacrifice->nrof:1)) 348 && NROF_SACRIFICE(altar) <= (sacrifice->nrof?sacrifice->nrof:1))
349 return 1; 349 return 1;
350 if (strcmp (ARCH_SACRIFICE(altar), "money") == 0 350 if (strcmp (ARCH_SACRIFICE(altar), "money") == 0
351 && sacrifice->type == MONEY 351 && sacrifice->type == MONEY
556 } 556 }
557 trigger_move (op, push); 557 trigger_move (op, push);
558 return 1; 558 return 1;
559 559
560 default: 560 default:
561 LOG(llevDebug, "Unknown trigger type: %s (%d)\n", op->name, op->type); 561 LOG(llevDebug, "Unknown trigger type: %s (%d)\n", &op->name, op->type);
562 return 0; 562 return 0;
563 } 563 }
564} 564}
565 565
566void add_button_link(object *button, mapstruct *map, int connected) { 566void add_button_link(object *button, mapstruct *map, int connected) {
815 if (!map) return; 815 if (!map) return;
816 816
817 for (obp = map->buttons; obp; obp = obp->next) { 817 for (obp = map->buttons; obp; obp = obp->next) {
818 for (ol=obp->link; ol; ol=ol->next) { 818 for (ol=obp->link; ol; ol=ol->next) {
819 if (ol->id!=ol->ob->count) 819 if (ol->id!=ol->ob->count)
820 LOG(llevError,"verify_button_links: object %s on list is corrupt (%d!=%d)\n",ol->ob->name, ol->id, ol->ob->count); 820 LOG(llevError,"verify_button_links: object %s on list is corrupt (%d!=%d)\n", &ol->ob->name, ol->id, ol->ob->count);
821 } 821 }
822 } 822 }
823} 823}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines