version 1.144 | | version 1.145 |
---|
| | |
/* | | /* |
* static char *rcsid_spell_effect_c = | | * static char *rcsid_spell_effect_c = |
* "$Id: spell_effect.c,v 1.144 2005/11/16 08:16:09 mwedel Exp $"; | | * "$Id: spell_effect.c,v 1.145 2006/01/02 06:45:53 mwedel Exp $"; |
*/ | | */ |
| | |
| | |
| | |
m = op->map; | | m = op->map; |
| | |
if ((spell_ob->move_block || x != op->x || y != op->y) && | | if ((spell_ob->move_block || x != op->x || y != op->y) && |
(get_map_flags(m, &m, x, y, &x, &y) & P_OUT_OF_MAP || | | (get_map_flags(m, &m, x, y, &x, &y) & (P_OUT_OF_MAP|P_IS_ALIVE) || |
((spell_ob->move_block & GET_MAP_MOVE_BLOCK(m, x, y)) == spell_ob->move_block))) { | | ((spell_ob->move_block & GET_MAP_MOVE_BLOCK(m, x, y)) == spell_ob->move_block))) { |
new_draw_info(NDI_UNIQUE, 0,op,"Something is in the way."); | | new_draw_info(NDI_UNIQUE, 0,op,"Something is in the way."); |
return 0; | | return 0; |
| | |
y = tmp->y+i*freearr_y[dir2]; | | y = tmp->y+i*freearr_y[dir2]; |
m = tmp->map; | | m = tmp->map; |
| | |
if(!(get_map_flags(m, &m, x, y, &x, &y) & P_OUT_OF_MAP) && | | if(!(get_map_flags(m, &m, x, y, &x, &y) & (P_OUT_OF_MAP|P_IS_ALIVE)) && |
((tmp->move_block & GET_MAP_MOVE_BLOCK(m, x, y)) != tmp->move_block) && | | ((spell_ob->move_block & GET_MAP_MOVE_BLOCK(m, x, y)) != spell_ob->move_block) && |
!posblocked) { | | !posblocked) { |
tmp2 = get_object(); | | tmp2 = get_object(); |
copy_object(tmp,tmp2); | | copy_object(tmp,tmp2); |
| | |
y = tmp->y-i*freearr_y[dir2]; | | y = tmp->y-i*freearr_y[dir2]; |
m = tmp->map; | | m = tmp->map; |
| | |
if(!(get_map_flags(m, &m, x, y, &x, &y) & P_OUT_OF_MAP) && | | if(!(get_map_flags(m, &m, x, y, &x, &y) & (P_OUT_OF_MAP|P_IS_ALIVE)) && |
((tmp->move_block & GET_MAP_MOVE_BLOCK(m, x, y)) != tmp->move_block) && | | ((spell_ob->move_block & GET_MAP_MOVE_BLOCK(m, x, y)) != spell_ob->move_block) && |
!negblocked) { | | !negblocked) { |
tmp2 = get_object(); | | tmp2 = get_object(); |
copy_object(tmp,tmp2); | | copy_object(tmp,tmp2); |