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

Comparing deliantra/server/server/c_object.C (file contents):
Revision 1.25 by root, Tue Dec 12 21:39:57 2006 UTC vs.
Revision 1.26 by root, Wed Dec 13 01:39:32 2006 UTC

800 new_draw_info (NDI_UNIQUE, 0, op, "This item can't be dropped."); 800 new_draw_info (NDI_UNIQUE, 0, op, "This item can't be dropped.");
801#endif 801#endif
802 return; 802 return;
803 } 803 }
804 804
805 if (op->type == PLAYER) 805 if (op->type == PLAYER && op->contr->last_used == tmp)
806 { 806 op->contr->last_used = tmp->below ? tmp->below
807 if (op->contr->last_used == tmp && op->contr->last_used_id == tmp->count) 807 : tmp->above ? tmp->above
808 { 808 : 0;
809 object *n = NULL;
810
811 if (tmp->below != NULL)
812 n = tmp->below;
813 else if (tmp->above != NULL)
814 n = tmp->above;
815 op->contr->last_used = n;
816 if (n != NULL)
817 op->contr->last_used_id = n->count;
818 else
819 op->contr->last_used_id = 0;
820 }
821 };
822 809
823 if (op->container) 810 if (op->container)
824 { 811 {
825 if (op->type == PLAYER) 812 if (op->type == PLAYER)
826 {
827 put_object_in_sack (op, op->container, tmp, op->contr->count); 813 put_object_in_sack (op, op->container, tmp, op->contr->count);
828 }
829 else 814 else
830 {
831 put_object_in_sack (op, op->container, tmp, 0); 815 put_object_in_sack (op, op->container, tmp, 0);
832 };
833 } 816 }
834 else 817 else
835 { 818 {
836 if (op->type == PLAYER) 819 if (op->type == PLAYER)
837 {
838 drop_object (op, tmp, op->contr->count); 820 drop_object (op, tmp, op->contr->count);
839 }
840 else 821 else
841 {
842 drop_object (op, tmp, 0); 822 drop_object (op, tmp, 0);
843 };
844 } 823 }
824
845 if (op->type == PLAYER) 825 if (op->type == PLAYER)
846 op->contr->count = 0; 826 op->contr->count = 0;
847} 827}
848 828
849 829

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines