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

Comparing deliantra/server/server/skills.C (file contents):
Revision 1.19 by root, Tue Dec 26 08:55:00 2006 UTC vs.
Revision 1.20 by root, Tue Dec 26 20:04:09 2006 UTC

495 */ 495 */
496static void 496static void
497stop_jump (object *pl, int dist, int spaces) 497stop_jump (object *pl, int dist, int spaces)
498{ 498{
499 pl->update_stats (); 499 pl->update_stats ();
500 insert_ob_in_map (pl, pl->map, pl, 0); 500 pl->map->insert (pl, pl->x, pl->y, pl);
501} 501}
502
503 502
504static int 503static int
505attempt_jump (object *pl, int dir, int spaces, object *skill) 504attempt_jump (object *pl, int dir, int spaces, object *skill)
506{ 505{
507 object *tmp; 506 object *tmp;
1690 */ 1689 */
1691 mflags = get_map_flags (part->map, &m, part->x + freearr_x[dir], part->y + freearr_y[dir], &sx, &sy); 1690 mflags = get_map_flags (part->map, &m, part->x + freearr_x[dir], part->y + freearr_y[dir], &sx, &sy);
1692 1691
1693 if (!dir || (eff_str <= 1) || (mflags & P_OUT_OF_MAP) || (GET_MAP_MOVE_BLOCK (m, sx, sy) & MOVE_FLY_LOW)) 1692 if (!dir || (eff_str <= 1) || (mflags & P_OUT_OF_MAP) || (GET_MAP_MOVE_BLOCK (m, sx, sy) & MOVE_FLY_LOW))
1694 { 1693 {
1695
1696 /* bounces off 'wall', and drops to feet */ 1694 /* bounces off 'wall', and drops to feet */
1697 throw_ob->remove (); 1695 throw_ob->insert_at (part, op);
1698 throw_ob->x = part->x; 1696
1699 throw_ob->y = part->y;
1700 insert_ob_in_map (throw_ob, part->map, op, 0);
1701 if (op->type == PLAYER) 1697 if (op->type == PLAYER)
1702 { 1698 {
1703 if (eff_str <= 1) 1699 if (eff_str <= 1)
1704 {
1705 new_draw_info_format (NDI_UNIQUE, 0, op, "Your load is so heavy you drop %s to the ground.", query_name (throw_ob)); 1700 new_draw_info_format (NDI_UNIQUE, 0, op, "Your load is so heavy you drop %s to the ground.", query_name (throw_ob));
1706 }
1707 else if (!dir) 1701 else if (!dir)
1708 {
1709 new_draw_info_format (NDI_UNIQUE, 0, op, "You throw %s at the ground.", query_name (throw_ob)); 1702 new_draw_info_format (NDI_UNIQUE, 0, op, "You throw %s at the ground.", query_name (throw_ob));
1710 }
1711 else 1703 else
1712 new_draw_info (NDI_UNIQUE, 0, op, "Something is in the way."); 1704 new_draw_info (NDI_UNIQUE, 0, op, "Something is in the way.");
1713 } 1705 }
1706
1714 return 0; 1707 return 0;
1715 } /* if object can't be thrown */ 1708 } /* if object can't be thrown */
1716 1709
1717 left = throw_ob; /* these are throwing objects left to the player */ 1710 left = throw_ob; /* these are throwing objects left to the player */
1718 1711
1762 * becomes the hitter. As such, we need to make sure that has a proper 1755 * becomes the hitter. As such, we need to make sure that has a proper
1763 * owner value so exp goes to the right place. 1756 * owner value so exp goes to the right place.
1764 */ 1757 */
1765 throw_ob->inv->set_owner (op); 1758 throw_ob->inv->set_owner (op);
1766 throw_ob->direction = dir; 1759 throw_ob->direction = dir;
1767 throw_ob->x = part->x;
1768 throw_ob->y = part->y;
1769 1760
1770 /* the damage bonus from the force of the throw */ 1761 /* the damage bonus from the force of the throw */
1771 dam = (int) (str_factor * dam_bonus[eff_str]); 1762 dam = (int) (str_factor * dam_bonus[eff_str]);
1772 1763
1773 /* Now, lets adjust the properties of the thrown_ob. */ 1764 /* Now, lets adjust the properties of the thrown_ob. */
1880 LOG (llevDebug, " pause_f=%d \n", pause_f); 1871 LOG (llevDebug, " pause_f=%d \n", pause_f);
1881 LOG (llevDebug, " %s stats: wc=%d dam=%d dist=%d spd=%f break=%d\n", 1872 LOG (llevDebug, " %s stats: wc=%d dam=%d dist=%d spd=%f break=%d\n",
1882 throw_ob->name, throw_ob->stats.wc, throw_ob->stats.dam, throw_ob->last_sp, throw_ob->speed, throw_ob->stats.food); 1873 throw_ob->name, throw_ob->stats.wc, throw_ob->stats.dam, throw_ob->last_sp, throw_ob->speed, throw_ob->stats.food);
1883 LOG (llevDebug, "inserting tossitem (%d) into map\n", throw_ob->count); 1874 LOG (llevDebug, "inserting tossitem (%d) into map\n", throw_ob->count);
1884#endif 1875#endif
1885 insert_ob_in_map (throw_ob, part->map, op, 0); 1876
1877 throw_ob->insert_at (part, op);
1886 1878
1887 if (!throw_ob->destroyed ()) 1879 if (!throw_ob->destroyed ())
1888 move_arrow (throw_ob); 1880 move_arrow (throw_ob);
1889 1881
1890 return 1; 1882 return 1;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines