version 1.92 | | version 1.93 |
---|
| | |
/* | | /* |
* static char *rcsid_spell_effect_c = | | * static char *rcsid_spell_effect_c = |
* "$Id: spell_effect.c,v 1.92 2003/01/23 07:38:44 mwedel Exp $"; | | * "$Id: spell_effect.c,v 1.93 2003/01/27 07:34:34 mwedel Exp $"; |
*/ | | */ |
| | |
| | |
| | |
*/ | | */ |
| | |
void move_aura(object *aura) { | | void move_aura(object *aura) { |
int i; | | int i, mflags; |
object *env; | | object *env; |
| | |
/* auras belong in inventories */ | | /* auras belong in inventories */ |
| | |
int nx, ny; | | int nx, ny; |
nx = aura->x + freearr_x[i]; | | nx = aura->x + freearr_x[i]; |
ny = aura->y + freearr_y[i]; | | ny = aura->y + freearr_y[i]; |
if (!(get_map_flags(aura->map, NULL, nx, ny, NULL, NULL) & (P_WALL | P_OUT_OF_MAP))) | | mflags = get_map_flags(env->map, NULL, nx, ny, NULL, NULL); |
| | if ((mflags & (P_WALL | P_OUT_OF_MAP)) == 0) { |
hit_map(aura,i,aura->attacktype); | | hit_map(aura,i,aura->attacktype); |
if(aura->other_arch) { | | if(aura->other_arch) { |
object *new_ob; | | object *new_ob; |
| | |
insert_ob_in_map(new_ob,env->map,aura,0); | | insert_ob_in_map(new_ob,env->map,aura,0); |
} | | } |
} | | } |
| | } |
/* put the aura back in the player's inventory */ | | /* put the aura back in the player's inventory */ |
remove_ob(aura); | | remove_ob(aura); |
insert_ob_in_ob(aura, env); | | insert_ob_in_ob(aura, env); |