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.24 by elmex, Tue Jan 9 16:38:23 2007 UTC vs.
Revision 1.25 by elmex, Tue Jan 9 22:14:29 2007 UTC

832 * 832 *
833 */ 833 */
834void 834void
835check_inv (object *op, object *trig) 835check_inv (object *op, object *trig)
836{ 836{
837 sint32 prev_state = trig->value;
838 trig->value = 0; // deactivate if none of the following conditions apply 837 trig->value = 0; // deactivate if none of the following conditions apply
839 838
840 if (object *pl = trig->ms ().player ()) 839 if (object *pl = trig->ms ().player ())
841 { 840 {
842 object *match = check_inv_recursive (pl, trig); 841 object *match = check_inv_recursive (pl, trig);
850 } 849 }
851 else if (!match && !trig->last_sp) // match == not having 850 else if (!match && !trig->last_sp) // match == not having
852 trig->value = 1; 851 trig->value = 1;
853 } 852 }
854 853
855 if (prev_state != trig->value)
856 push_button (trig); 854 push_button (trig);
857} 855}
858 856

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines