version 1.32 | | version 1.33 |
---|
| | |
/* | | /* |
* static char *rcsid_spell_attack_c = | | * static char *rcsid_spell_attack_c = |
* "$Id: spell_attack.c,v 1.32 2006/01/07 12:49:21 akirschbaum Exp $"; | | * "$Id: spell_attack.c,v 1.33 2006/03/04 16:34:26 akirschbaum Exp $"; |
*/ | | */ |
| | |
| | |
| | |
| | |
if(get_map_flags(tmp->map,&m, tmp->x + freearr_x[t_dir],tmp->y + freearr_y[t_dir], | | if(get_map_flags(tmp->map,&m, tmp->x + freearr_x[t_dir],tmp->y + freearr_y[t_dir], |
&sx, &sy) & P_OUT_OF_MAP) | | &sx, &sy) & P_OUT_OF_MAP) |
new_dir = 0; | | return; |
| | |
if (OB_TYPE_MOVE_BLOCK(tmp, GET_MAP_MOVE_BLOCK(m, sx, sy))) | | if (OB_TYPE_MOVE_BLOCK(tmp, GET_MAP_MOVE_BLOCK(m, sx, sy))) |
new_dir = 0; | | return; |
| | |
if(new_dir) { /* OK, we made a fork */ | | /* OK, we made a fork */ |
object *new_bolt = get_object(); | | object *new_bolt = get_object(); |
| | |
copy_object(tmp,new_bolt); | | copy_object(tmp,new_bolt); |
| | |
new_bolt = insert_ob_in_map(new_bolt,m,op,0); | | new_bolt = insert_ob_in_map(new_bolt,m,op,0); |
update_turn_face(new_bolt); | | update_turn_face(new_bolt); |
} | | } |
} | | |
| | |
/* move_bolt: moves bolt 'op'. Basically, it just advances a space, | | /* move_bolt: moves bolt 'op'. Basically, it just advances a space, |
* and checks for various things that may stop it. | | * and checks for various things that may stop it. |