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

Comparing deliantra/server/server/player.C (file contents):
Revision 1.155 by root, Sat Jul 21 15:04:36 2007 UTC vs.
Revision 1.156 by root, Thu Jul 26 00:27:09 2007 UTC

1683 1683
1684 arrow->stats.wc = clamp (wc, MIN_WC, MAX_WC); 1684 arrow->stats.wc = clamp (wc, MIN_WC, MAX_WC);
1685 arrow->move_type = MOVE_FLY_LOW; 1685 arrow->move_type = MOVE_FLY_LOW;
1686 arrow->move_on = MOVE_FLY_LOW | MOVE_WALK; 1686 arrow->move_on = MOVE_FLY_LOW | MOVE_WALK;
1687 1687
1688 play_sound_map (op->map, op->x, op->y, SOUND_FIRE_ARROW); 1688 op->play_sound (sound_find ("fire_arrow"));
1689 m->insert (arrow, sx, sy, op); 1689 m->insert (arrow, sx, sy, op);
1690 1690
1691 if (!arrow->destroyed ()) 1691 if (!arrow->destroyed ())
1692 move_arrow (arrow); 1692 move_arrow (arrow);
1693 1693
1771 1771
1772 if (item->type == WAND) 1772 if (item->type == WAND)
1773 { 1773 {
1774 if (item->stats.food <= 0) 1774 if (item->stats.food <= 0)
1775 { 1775 {
1776 play_sound_player_only (op->contr, SOUND_WAND_POOF, 0, 0); 1776 op->contr->play_sound (sound_find ("wand_poof"));
1777 new_draw_info_format (NDI_UNIQUE, 0, op, "The %s goes poof.", query_base_name (item, 0)); 1777 new_draw_info_format (NDI_UNIQUE, 0, op, "The %s goes poof.", query_base_name (item, 0));
1778 1778
1779 return; 1779 return;
1780 } 1780 }
1781 } 1781 }
1782 else if (item->type == ROD || item->type == HORN) 1782 else if (item->type == ROD || item->type == HORN)
1783 { 1783 {
1784 if (item->stats.hp < MAX (item->inv->stats.sp, item->inv->stats.grace)) 1784 if (item->stats.hp < MAX (item->inv->stats.sp, item->inv->stats.grace))
1785 { 1785 {
1786 play_sound_player_only (op->contr, SOUND_WAND_POOF, 0, 0); 1786 op->contr->play_sound (sound_find ("wand_poof"));
1787 1787
1788 if (item->type == ROD) 1788 if (item->type == ROD)
1789 new_draw_info_format (NDI_UNIQUE, 0, op, "The %s whines for a while, but nothing happens.", query_base_name (item, 0)); 1789 new_draw_info_format (NDI_UNIQUE, 0, op, "The %s whines for a while, but nothing happens.", query_base_name (item, 0));
1790 else 1790 else
1791 new_draw_info_format (NDI_UNIQUE, 0, op, "The %s needs more time to charge.", query_base_name (item, 0)); 1791 new_draw_info_format (NDI_UNIQUE, 0, op, "The %s needs more time to charge.", query_base_name (item, 0));
1980 /* If we found a key, do some extra work */ 1980 /* If we found a key, do some extra work */
1981 if (key) 1981 if (key)
1982 { 1982 {
1983 object *container = key->env; 1983 object *container = key->env;
1984 1984
1985 play_sound_map (op->map, op->x, op->y, SOUND_OPEN_DOOR); 1985 op->play_sound (sound_find ("open_door"));
1986 1986
1987 if (action_makes_visible (op)) 1987 if (action_makes_visible (op))
1988 make_visible (op); 1988 make_visible (op);
1989 1989
1990 if (door->inv && (door->inv->type == RUNE || door->inv->type == TRAP)) 1990 if (door->inv && (door->inv->type == RUNE || door->inv->type == TRAP))
2104 2104
2105 if (op->speed_left > 0.f) 2105 if (op->speed_left > 0.f)
2106 { 2106 {
2107 --op->speed_left; 2107 --op->speed_left;
2108 2108
2109 play_sound_map (op->map, op->x, op->y, SOUND_PUSH_PLAYER); 2109 op->play_sound (sound_find ("push_player"));
2110 push_ob (mon, dir, op); 2110 push_ob (mon, dir, op);
2111 2111
2112 if (op->contr->tmp_invis || op->hide) 2112 if (op->contr->tmp_invis || op->hide)
2113 make_visible (op); 2113 make_visible (op);
2114 2114
2133 { 2133 {
2134 --op->speed_left; 2134 --op->speed_left;
2135 2135
2136 if (!op->contr->braced) 2136 if (!op->contr->braced)
2137 { 2137 {
2138 play_sound_map (op->map, op->x, op->y, SOUND_PUSH_PLAYER); 2138 op->play_sound (sound_find ("push_player"));
2139 push_ob (mon, dir, op); 2139 push_ob (mon, dir, op);
2140 } 2140 }
2141 else 2141 else
2142 new_draw_info (0, 0, op, "You withhold your attack"); 2142 new_draw_info (0, 0, op, "You withhold your attack");
2143 2143
2286 return 0; 2286 return 0;
2287 2287
2288 for (object *tmp = op->inv; tmp; tmp = tmp->below) 2288 for (object *tmp = op->inv; tmp; tmp = tmp->below)
2289 if (QUERY_FLAG (tmp, FLAG_APPLIED) && QUERY_FLAG (tmp, FLAG_LIFESAVE)) 2289 if (QUERY_FLAG (tmp, FLAG_APPLIED) && QUERY_FLAG (tmp, FLAG_LIFESAVE))
2290 { 2290 {
2291 play_sound_map (op->map, op->x, op->y, SOUND_OB_EVAPORATE); 2291 op->play_sound (sound_find ("ob_evaporate"));
2292 new_draw_info_format (NDI_UNIQUE, 0, op, "Your %s vibrates violently, then evaporates.", query_name (tmp)); 2292 new_draw_info_format (NDI_UNIQUE, 0, op, "Your %s vibrates violently, then evaporates.", query_name (tmp));
2293 2293
2294 if (op->contr) 2294 if (op->contr)
2295 esrv_del_item (op->contr, tmp->count); 2295 esrv_del_item (op->contr, tmp->count);
2296 2296
2692 strcpy (op->contr->killer, "starvation"); 2692 strcpy (op->contr->killer, "starvation");
2693 } 2693 }
2694 else 2694 else
2695 sprintf (buf, "%s died.", &op->name); 2695 sprintf (buf, "%s died.", &op->name);
2696 2696
2697 play_sound_player_only (op->contr, SOUND_PLAYER_DIES, 0, 0); 2697 op->contr->play_sound (sound_find ("player_dies"));
2698 2698
2699 /* save the map location for corpse, gravestone */ 2699 /* save the map location for corpse, gravestone */
2700 x = op->x; 2700 x = op->x;
2701 y = op->y; 2701 y = op->y;
2702 map = op->map; 2702 map = op->map;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines