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.59 by root, Wed Oct 21 00:44:39 2009 UTC vs.
Revision 1.63 by root, Tue Nov 10 20:57:56 2009 UTC

84 break; 84 break;
85 85
86 case SIGN: 86 case SIGN:
87 if (!tmp->stats.food || tmp->last_eat < tmp->stats.food) 87 if (!tmp->stats.food || tmp->last_eat < tmp->stats.food)
88 { 88 {
89 tmp->play_sound (tmp->sound ? tmp->sound : sound_find ("trigger_sign")); 89 tmp->play_sound (tmp->sound ? tmp->sound : sound_find ("msg_voice"));
90
91 if (originator && originator->contr)
92 originator->contr->infobox (MSG_CHANNEL ("examine"), format ("T<%s>\n\n%s", &tmp->name, &tmp->msg));
93
90 new_info_map (NDI_UNIQUE | NDI_NAVY, tmp->map, tmp->msg); 94 new_info_map_except (NDI_UNIQUE | NDI_NAVY, tmp->map, originator, tmp->msg);
95
91 if (tmp->stats.food) 96 if (tmp->stats.food)
92 tmp->last_eat++; 97 tmp->last_eat++;
93 } 98 }
94 break; 99 break;
95 100
341 * 346 *
342 * 0.93.4: Linked objects (ie, objects that are connected) can not be 347 * 0.93.4: Linked objects (ie, objects that are connected) can not be
343 * sacrificed. This fixes a bug of trying to put multiple altars/related 348 * sacrificed. This fixes a bug of trying to put multiple altars/related
344 * objects on the same space that take the same sacrifice. 349 * objects on the same space that take the same sacrifice.
345 */ 350 */
346
347int 351int
348check_altar_sacrifice (object *altar, object *sacrifice, object *originator) 352check_altar_sacrifice (object *altar, object *sacrifice, object *originator)
349{ 353{
350 if (sacrifice->flag [FLAG_UNPAID]) 354 if (sacrifice->flag [FLAG_UNPAID])
351 return 0; 355 return 0;
419 new_info_map (NDI_BLACK, altar->map, altar->msg); 423 new_info_map (NDI_BLACK, altar->map, altar->msg);
420 424
421 return 1; 425 return 1;
422} 426}
423 427
424void 428static void
425trigger_move (object *op, int state, object *originator) /* 1 down and 0 up */ 429trigger_move (object *op, int state, object *originator) /* 1 down and 0 up */
426{ 430{
427 op->stats.wc = state; 431 op->stats.wc = state;
428 432
429 if (state) 433 if (state)
455int 459int
456check_trigger (object *op, object *cause, object *originator) 460check_trigger (object *op, object *cause, object *originator)
457{ 461{
458 object *tmp; 462 object *tmp;
459 int push = 0, tot = 0; 463 int push = 0, tot = 0;
460 int in_movement = op->stats.wc || op->speed; 464 int in_movement = op->stats.wc || op->has_active_speed ();
461 465
462 switch (op->type) 466 switch (op->type)
463 { 467 {
464 case TRIGGER_BUTTON: 468 case TRIGGER_BUTTON:
465 if (op->weight > 0) 469 if (op->weight > 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines