… | |
… | |
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 | |
152 | float |
|
|
153 | player::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. */ |
159 | static void |
153 | static void |
160 | set_first_map (object *op) |
154 | set_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 |