version 1.81 | | version 1.82 |
---|
| | |
/* | | /* |
* static char *rcsid_attack_c = | | * static char *rcsid_attack_c = |
* "$Id: attack.c,v 1.81 2003/01/08 08:28:59 garbled Exp $"; | | * "$Id: attack.c,v 1.82 2003/01/08 08:39:18 mwedel Exp $"; |
*/ | | */ |
/* | | /* |
CrossFire, A Multiplayer game for X-windows | | CrossFire, A Multiplayer game for X-windows |
| | |
map = op->map; | | map = op->map; |
x = op->x + freearr_x[dir]; | | x = op->x + freearr_x[dir]; |
y = op->y + freearr_y[dir]; | | y = op->y + freearr_y[dir]; |
if (out_of_map (map, x, y)) | | if (get_map_flags(map, &map, x, y, &x, &y) & P_OUT_OF_MAP) |
return 0; | | return 0; |
| | |
/* peterm: a few special cases for special attacktypes --counterspell | | /* peterm: a few special cases for special attacktypes --counterspell |
| | |
| | |
/* Else try to put arrow on victim's map square */ | | /* Else try to put arrow on victim's map square */ |
if ((victim_x != hitter->x || victim_y != hitter->y) | | if ((victim_x != hitter->x || victim_y != hitter->y) |
&& ! wall (hitter->map, victim_x, victim_y)) | | && !(get_map_flags(hitter->map, NULL, victim_x, victim_y, NULL, NULL) & P_WALL)) |
{ | | { |
remove_ob (hitter); | | remove_ob (hitter); |
hitter->x = victim_x; | | hitter->x = victim_x; |