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.13 by root, Sat Dec 9 16:11:08 2006 UTC vs.
Revision 1.15 by elmex, Tue Dec 19 13:41:45 2006 UTC

799 if (tmp2->above == NULL) 799 if (tmp2->above == NULL)
800 break; 800 break;
801 801
802 if (tmp2->type != PLAYER) 802 if (tmp2->type != PLAYER)
803 break; 803 break;
804 set_owner (tmp, tmp2); 804 tmp->set_owner (tmp2);
805 SET_FLAG (tmp, FLAG_MONSTER); 805 SET_FLAG (tmp, FLAG_MONSTER);
806 tmp->stats.exp = 0; 806 tmp->stats.exp = 0;
807 SET_FLAG (tmp, FLAG_FRIENDLY); 807 SET_FLAG (tmp, FLAG_FRIENDLY);
808 add_friendly_object (tmp); 808 add_friendly_object (tmp);
809 tmp->attack_movement = PETMOVE; 809 tmp->attack_movement = PETMOVE;
854 * last_heal = 1/0 remove/dont remove obj if triggered 854 * last_heal = 1/0 remove/dont remove obj if triggered
855 * -b.t. (thomas@nomad.astro.psu.edu 855 * -b.t. (thomas@nomad.astro.psu.edu
856 */ 856 */
857 857
858void 858void
859check_inv (object *op, object *trig) 859check_inv (object *op, object *trig, bool move_on)
860{ 860{
861 object *match; 861 object *match;
862 862
863 if (op->type != PLAYER) 863 if (op->type != PLAYER)
864 return; 864 return;
865 match = check_inv_recursive (op, trig); 865 match = check_inv_recursive (op, trig);
866 if (match && trig->last_sp) 866 if (match && trig->last_sp)
867 { 867 {
868 if (trig->last_heal) 868 if (trig->last_heal)
869 decrease_ob (match); 869 decrease_ob (match);
870 use_trigger (trig); 870
871 trig->value = move_on ? 1 : 0;
872
873 push_button (trig);
871 } 874 }
872 else if (!match && !trig->last_sp) 875 else if (!match && !trig->last_sp)
873 use_trigger (trig); 876 {
877 trig->value = move_on ? 1 : 0;
878 push_button (trig);
879 }
874} 880}
875 881

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines