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

Comparing deliantra/server/server/apply.C (file contents):
Revision 1.281 by root, Sun Jan 29 02:47:05 2017 UTC vs.
Revision 1.282 by root, Sat Sep 16 22:17:42 2017 UTC

868 { 868 {
869 /* Somebody dropped an unpaid item, just move to an adjacent place. */ 869 /* Somebody dropped an unpaid item, just move to an adjacent place. */
870 int i = find_free_spot (op, op->map, op->x, op->y, 1, 9); 870 int i = find_free_spot (op, op->map, op->x, op->y, 1, 9);
871 871
872 if (i != -1) 872 if (i != -1)
873 rv = transfer_ob (op, op->x + freearr_x[i], op->y + freearr_y[i], 0, shop_mat); 873 rv = transfer_ob (op, op->x + DIRX (i), op->y + DIRY (i), 0, shop_mat);
874 874
875 return 0; 875 return 0;
876 } 876 }
877 877
878 /* Removed code that checked for multipart objects - it appears that 878 /* Removed code that checked for multipart objects - it appears that
921 if (i == -1) 921 if (i == -1)
922 LOG (llevError, "Internal shop-mat problem.\n"); 922 LOG (llevError, "Internal shop-mat problem.\n");
923 else 923 else
924 { 924 {
925 op->remove (); 925 op->remove ();
926 op->x += freearr_x[i]; 926 op->x += DIRX (i);
927 op->y += freearr_y[i]; 927 op->y += DIRY (i);
928 rv = insert_ob_in_map (op, op->map, shop_mat, 0) == NULL; 928 rv = insert_ob_in_map (op, op->map, shop_mat, 0) == NULL;
929 } 929 }
930 } 930 }
931 931
932 op->clr_flag (FLAG_NO_APPLY); 932 op->clr_flag (FLAG_NO_APPLY);
1019 1019
1020 victim->play_sound (trap->sound ? trap->sound : sound_find ("fall_hole")); 1020 victim->play_sound (trap->sound ? trap->sound : sound_find ("fall_hole"));
1021 victim->statusmsg ("You fall through the hole!", NDI_RED); 1021 victim->statusmsg ("You fall through the hole!", NDI_RED);
1022 1022
1023 transfer_ob (victim, 1023 transfer_ob (victim,
1024 EXIT_X (trap) + freearr_x[dir], 1024 EXIT_X (trap) + DIRX (dir),
1025 EXIT_Y (trap) + freearr_y[dir], 1025 EXIT_Y (trap) + DIRY (dir),
1026 0, victim); 1026 0, victim);
1027} 1027}
1028 1028
1029/** 1029/**
1030 * Unapplies specified item. 1030 * Unapplies specified item.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines