… | |
… | |
319 | player::set_object (object *op) |
319 | player::set_object (object *op) |
320 | { |
320 | { |
321 | ob = op; |
321 | ob = op; |
322 | ob->contr = this; /* this aren't yet in archetype */ |
322 | ob->contr = this; /* this aren't yet in archetype */ |
323 | |
323 | |
324 | ob->speed_left = 0.5; |
324 | ob->speed_left = 0.5f; |
325 | ob->speed = 1.0; |
325 | ob->speed = 1.0f; |
326 | ob->direction = 5; /* So player faces south */ |
326 | ob->direction = 5; /* So player faces south */ |
327 | } |
327 | } |
328 | |
328 | |
329 | player::player () |
329 | player::player () |
330 | { |
330 | { |
… | |
… | |
2270 | * called, so we recheck it here. |
2270 | * called, so we recheck it here. |
2271 | */ |
2271 | */ |
2272 | if (op->contr->ns->handle_command ()) |
2272 | if (op->contr->ns->handle_command ()) |
2273 | return 1; |
2273 | return 1; |
2274 | |
2274 | |
2275 | if (op->speed_left > 0) |
2275 | if (op->speed_left > 0.f) |
2276 | { |
2276 | { |
2277 | if (op->direction && (op->contr->run_on || op->contr->fire_on)) |
2277 | if (op->direction && (op->contr->run_on || op->contr->fire_on)) |
2278 | { |
2278 | { |
2279 | /* All move commands take 1 tick, at least for now */ |
2279 | /* All move commands take 1 tick, at least for now */ |
2280 | --op->speed_left; |
2280 | --op->speed_left; |
… | |
… | |
2283 | * of it. Also, some of the skill stuff is only put in |
2283 | * of it. Also, some of the skill stuff is only put in |
2284 | * there, as well as the confusion stuff. |
2284 | * there, as well as the confusion stuff. |
2285 | */ |
2285 | */ |
2286 | move_player (op, op->direction); |
2286 | move_player (op, op->direction); |
2287 | |
2287 | |
2288 | return op->speed_left > 0; |
2288 | return op->speed_left > 0.f; |
2289 | } |
2289 | } |
2290 | } |
2290 | } |
2291 | |
2291 | |
2292 | return 0; |
2292 | return 0; |
2293 | } |
2293 | } |
… | |
… | |
2923 | object *force; |
2923 | object *force; |
2924 | int at; |
2924 | int at; |
2925 | |
2925 | |
2926 | force = get_archetype (FORCE_NAME); |
2926 | force = get_archetype (FORCE_NAME); |
2927 | /* 50 ticks should be enough time for the spell to abate */ |
2927 | /* 50 ticks should be enough time for the spell to abate */ |
2928 | force->speed = 0.1; |
2928 | force->speed = 0.1f; |
2929 | force->speed_left = -5.0; |
2929 | force->speed_left = -5.f; |
2930 | SET_FLAG (force, FLAG_APPLIED); |
2930 | SET_FLAG (force, FLAG_APPLIED); |
2931 | for (at = 0; at < NROFATTACKS; at++) |
2931 | for (at = 0; at < NROFATTACKS; at++) |
2932 | if (will_kill_again & (1 << at)) |
2932 | if (will_kill_again & (1 << at)) |
2933 | force->resist[at] = 100; |
2933 | force->resist[at] = 100; |
2934 | |
2934 | |