… | |
… | |
374 | /* |
374 | /* |
375 | * get_nearest_part(multi-object, object 2) returns the part of the |
375 | * get_nearest_part(multi-object, object 2) returns the part of the |
376 | * multi-object 1 which is closest to the second object. |
376 | * multi-object 1 which is closest to the second object. |
377 | * If it's not a multi-object, it is returned. |
377 | * If it's not a multi-object, it is returned. |
378 | */ |
378 | */ |
379 | |
|
|
380 | object * |
379 | object * |
381 | get_nearest_part (object *op, const object *pl) |
380 | get_nearest_part (object *op, const object *pl) |
382 | { |
381 | { |
383 | object *tmp, *closest; |
382 | object *tmp, *closest; |
384 | int last_dist, i; |
383 | int last_dist, i; |
… | |
… | |
579 | object::copy_to (object *dst) |
578 | object::copy_to (object *dst) |
580 | { |
579 | { |
581 | *dst = *this; |
580 | *dst = *this; |
582 | |
581 | |
583 | if (speed < 0) |
582 | if (speed < 0) |
584 | dst->speed_left = speed_left - rndm (); |
583 | dst->speed_left -= rndm (); |
585 | |
584 | |
586 | dst->set_speed (dst->speed); |
585 | dst->set_speed (dst->speed); |
587 | } |
586 | } |
588 | |
587 | |
589 | void |
588 | void |