1 | /* |
1 | /* |
2 | * static char *rcsid_attack_c = |
2 | * static char *rcsid_attack_c = |
3 | * "$Id: attack.C,v 1.5 2006/08/29 08:01:37 root Exp $"; |
3 | * "$Id: attack.C,v 1.6 2006/08/29 11:58:02 elmex Exp $"; |
4 | */ |
4 | */ |
5 | /* |
5 | /* |
6 | CrossFire, A Multiplayer game for X-windows |
6 | CrossFire, A Multiplayer game for X-windows |
7 | |
7 | |
8 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
8 | Copyright (C) 2002 Mark Wedel & Crossfire Development Team |
… | |
… | |
277 | op_tag = op->count; |
277 | op_tag = op->count; |
278 | |
278 | |
279 | map = op->map; |
279 | map = op->map; |
280 | x = op->x + freearr_x[dir]; |
280 | x = op->x + freearr_x[dir]; |
281 | y = op->y + freearr_y[dir]; |
281 | y = op->y + freearr_y[dir]; |
282 | if (get_map_flags(map, &map, x, y, &x, &y) & P_OUT_OF_MAP) |
282 | |
|
|
283 | int mflags = get_map_flags(map, &map, x, y, &x, &y); |
|
|
284 | // elmex: a safe map tile can't be hit! |
|
|
285 | // this should prevent most harmful effects on items and players there. |
|
|
286 | if ((mflags & P_OUT_OF_MAP) || (mflags & P_SAFE)) |
283 | return 0; |
287 | return 0; |
284 | |
288 | |
285 | /* peterm: a few special cases for special attacktypes --counterspell |
289 | /* peterm: a few special cases for special attacktypes --counterspell |
286 | * must be out here because it strikes things which are not alive |
290 | * must be out here because it strikes things which are not alive |
287 | */ |
291 | */ |