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.72 by root, Wed Nov 16 23:41:59 2016 UTC vs.
Revision 1.73 by root, Sun Jan 29 02:47:04 2017 UTC

561 op->last_sp = -op->last_sp; 561 op->last_sp = -op->last_sp;
562 } 562 }
563 else 563 else
564 { 564 {
565 /* for trigger altar with last_sp, the ON/OFF 565 /* for trigger altar with last_sp, the ON/OFF
566 * status (-> +/- value) is "simulated": 566 * status (-> +/- value) is "simulated":
567 */ 567 */
568 op->value = !op->value; 568 op->value = !op->value;
569 trigger_move (op, 1, cause); 569 trigger_move (op, 1, cause);
570 op->last_sp = -op->last_sp; 570 op->last_sp = -op->last_sp;
571 op->value = !op->value; 571 op->value = !op->value;
585 } 585 }
586 586
587 /* If trigger_altar has "last_sp > 0" set on the map, 587 /* If trigger_altar has "last_sp > 0" set on the map,
588 * it will push the connected value only once per sacrifice. 588 * it will push the connected value only once per sacrifice.
589 * Otherwise (default), the connected value will be 589 * Otherwise (default), the connected value will be
590 * pushed twice: First by sacrifice, second by reset! -AV 590 * pushed twice: First by sacrifice, second by reset! -AV
591 */ 591 */
592 if (!op->last_sp) 592 if (!op->last_sp)
593 trigger_move (op, 0, cause); 593 trigger_move (op, 0, cause);
594 else 594 else
595 { 595 {
738 return obp; 738 return obp;
739 739
740 return 0; 740 return 0;
741} 741}
742 742
743/* This routine makes monsters who are 743/* This routine makes monsters who are
744 * standing on the 'mood floor' change their 744 * standing on the 'mood floor' change their
745 * disposition if it is different. 745 * disposition if it is different.
746 * If floor is to be triggered must have 746 * If floor is to be triggered must have
747 * a speed of zero (default is 1 for all 747 * a speed of zero (default is 1 for all
748 * but the charm floor type). 748 * but the charm floor type).
749 * by b.t. thomas@nomad.astro.psu.edu 749 * by b.t. thomas@nomad.astro.psu.edu
750 */ 750 */
874 return tmp; 874 return tmp;
875 } 875 }
876 return NULL; 876 return NULL;
877} 877}
878 878
879/* check_inv(), a function to search the inventory, 879/* check_inv(), a function to search the inventory,
880 * of a player and then based on a set of conditions, 880 * of a player and then based on a set of conditions,
881 * the square will activate connected items. 881 * the square will activate connected items.
882 * Monsters can't trigger this square (for now) 882 * Monsters can't trigger this square (for now)
883 * Values are: last_sp = 1/0 obj/no obj triggers 883 * Values are: last_sp = 1/0 obj/no obj triggers
884 * last_heal = 1/0 remove/dont remove obj if triggered 884 * last_heal = 1/0 remove/dont remove obj if triggered
885 * -b.t. (thomas@nomad.astro.psu.edu 885 * -b.t. (thomas@nomad.astro.psu.edu
886 * 886 *
887 * Tue Dec 19 15:34:00 CET 2006 elmex: changed the function to ignore op 887 * Tue Dec 19 15:34:00 CET 2006 elmex: changed the function to ignore op
888 * because the check-inventory semantic essentially only applies when 888 * because the check-inventory semantic essentially only applies when
889 * something is above the inventory checker. 889 * something is above the inventory checker.
890 * The semantic prior this change was: trigger if something has moved on or off 890 * The semantic prior this change was: trigger if something has moved on or off
893 * away, and then leaves the inventory checker. That would've caused an always-enabled 893 * away, and then leaves the inventory checker. That would've caused an always-enabled
894 * state in the inventory checker. This won't happen anymore now. 894 * state in the inventory checker. This won't happen anymore now.
895 * 895 *
896 * Wed Jan 10 11:34:26 CET 2007 elmex: fixed this function, we now check 896 * Wed Jan 10 11:34:26 CET 2007 elmex: fixed this function, we now check
897 * whether op is on this mapspace or not, because the value (1|0) depends 897 * whether op is on this mapspace or not, because the value (1|0) depends
898 * on this information. also make sure to only push_button if op has 898 * on this information. also make sure to only push_button if op has
899 * a matching item (because when we do a push_button with value=0 timed gates 899 * a matching item (because when we do a push_button with value=0 timed gates
900 * will still open)! (i hope i got the semantics right this time) 900 * will still open)! (i hope i got the semantics right this time)
901 * 901 *
902 */ 902 */
903void 903void

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines