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.140 by root, Fri May 18 13:15:29 2007 UTC vs.
Revision 1.141 by root, Fri May 18 15:05:09 2007 UTC

147 draw_ext_info_format (NDI_UNIQUE | NDI_GREEN, 0, op, 147 draw_ext_info_format (NDI_UNIQUE | NDI_GREEN, 0, op,
148 MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_NEWS, "INFORMATION: %s\n%s\n", (char *)"%s\n%s", subject, news); 148 MSG_TYPE_ADMIN, MSG_TYPE_ADMIN_NEWS, "INFORMATION: %s\n%s\n", (char *)"%s\n%s", subject, news);
149 close_and_delete (fp, comp); 149 close_and_delete (fp, comp);
150} 150}
151 151
152float
153player::weapon_speed () const
154{
155 return ob->speed / weapon_sp * .5f;//TODO, the .5 is arbitrary
156}
157
158/* This loads the first map an puts the player on it. */ 152/* This loads the first map an puts the player on it. */
159static void 153static void
160set_first_map (object *op) 154set_first_map (object *op)
161{ 155{
162 op->contr->maplevel = first_map_path; 156 op->contr->maplevel = first_map_path;
1646 if (player *pl = op->contr) 1640 if (player *pl = op->contr)
1647 { 1641 {
1648 if (!pl->has_hit) 1642 if (!pl->has_hit)
1649 { 1643 {
1650 pl->has_hit = 1; 1644 pl->has_hit = 1;
1651 pl->ob->speed_left += pl->weapon_speed () - pl->ob->speed; 1645 pl->ob->speed_left += pl->weapon_sp - pl->ob->speed;
1652 } 1646 }
1653#if 0 1647#if 0
1654 float speed = pl->weapon_sp; 1648 float speed = pl->weapon_sp;
1655 1649
1656 /* penalize ROF for bestarrow */ 1650 /* penalize ROF for bestarrow */
2176 ((mon->type != PLAYER || op->contr->party == NULL || op->contr->party != mon->contr->party))) 2170 ((mon->type != PLAYER || op->contr->party == NULL || op->contr->party != mon->contr->party)))
2177 { 2171 {
2178 if (!op->contr->has_hit) 2172 if (!op->contr->has_hit)
2179 { 2173 {
2180 op->contr->has_hit = 1; 2174 op->contr->has_hit = 1;
2181 op->speed_left += op->contr->weapon_speed () - op->speed; 2175 op->speed_left += op->contr->weapon_sp - op->speed;
2182 } 2176 }
2183 2177
2184 skill_attack (mon, op, 0, 0, 0); 2178 skill_attack (mon, op, 0, 0, 0);
2185 2179
2186 /* If attacking another player, that player gets automatic 2180 /* If attacking another player, that player gets automatic

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines