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.127 by root, Fri Jan 27 22:00:40 2012 UTC vs.
Revision 1.128 by root, Fri Feb 3 02:04:11 2012 UTC

255 * pick up (0 means all of them) 255 * pick up (0 means all of them)
256 */ 256 */
257static void 257static void
258pick_up_object (object *pl, object *op, object *tmp, int nrof) 258pick_up_object (object *pl, object *op, object *tmp, int nrof)
259{ 259{
260 object *env = tmp->env;
261 uint32 weight, effective_weight_limit; 260 uint32 weight, effective_weight_limit;
262 int tmp_nrof = tmp->number_of (); 261 int tmp_nrof = tmp->number_of ();
263 262
264 /* IF the player is flying & trying to take the item out of a container 263 /* IF the player is flying & trying to take the item out of a container
265 * that is in his inventory, let him. tmp->env points to the container 264 * that is in his inventory, let him. tmp->env points to the container
511 * so this function isn't named very good anymore. 510 * so this function isn't named very good anymore.
512 */ 511 */
513void 512void
514put_object_in_sack (object *op, object *sack, object *tmp, uint32 nrof) 513put_object_in_sack (object *op, object *sack, object *tmp, uint32 nrof)
515{ 514{
516 object *tmp2, *sack2; 515 object *tmp2;
517 char buf[MAX_BUF]; 516 char buf[MAX_BUF];
518 517
519 if (sack == tmp) 518 if (sack == tmp)
520 return; /* Can't put an object in itself */ 519 return; /* Can't put an object in itself */
521 520
529 { 528 {
530 /* Eneq(@csd.uu.se): If the object to be dropped is a container 529 /* Eneq(@csd.uu.se): If the object to be dropped is a container
531 * we instead move the contents of that container into the active 530 * we instead move the contents of that container into the active
532 * container, this is only done if the object has something in it. 531 * container, this is only done if the object has something in it.
533 */ 532 */
534 sack2 = tmp;
535 new_draw_info_format (NDI_UNIQUE, 0, op, "You move the items from %s into %s.", query_name (tmp), query_name (sack)); 533 new_draw_info_format (NDI_UNIQUE, 0, op, "You move the items from %s into %s.", query_name (tmp), query_name (sack));
536 534
537 for (tmp2 = tmp->inv; tmp2; tmp2 = tmp) 535 for (tmp2 = tmp->inv; tmp2; tmp2 = tmp)
538 { 536 {
539 tmp = tmp2->below; 537 tmp = tmp2->below;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines