--- deliantra/server/server/spell_attack.C 2006/09/14 22:34:05 1.13 +++ deliantra/server/server/spell_attack.C 2006/09/14 23:13:49 1.14 @@ -404,7 +404,6 @@ void explode_bullet (object *op) { - tag_t op_tag = op->count; object *tmp, *owner; if (op->other_arch == NULL) @@ -453,7 +452,7 @@ if (op->attacktype) { hit_map (op, 0, op->attacktype, 1); - if (was_destroyed (op, op_tag)) + if (op->destroyed ()) return; } @@ -506,7 +505,7 @@ insert_ob_in_map (tmp, op->map, op, 0); /* remove the firebullet */ - if (!was_destroyed (op, op_tag)) + if (!op->destroyed ()) { remove_ob (op); free_object (op); @@ -522,7 +521,6 @@ void check_bullet (object *op) { - tag_t op_tag = op->count, tmp_tag; object *tmp; int dam, mflags; mapstruct *m; @@ -548,9 +546,8 @@ { if (QUERY_FLAG (tmp, FLAG_ALIVE)) { - tmp_tag = tmp->count; dam = hit_player (tmp, op->stats.dam, op, op->attacktype, 1); - if (was_destroyed (op, op_tag) || !was_destroyed (tmp, tmp_tag) || (op->stats.dam -= dam) < 0) + if (op->destroyed () || !tmp->destroyed () || (op->stats.dam -= dam) < 0) { if (!QUERY_FLAG (op, FLAG_REMOVED)) { @@ -585,7 +582,7 @@ if (op->stats.sp == SP_METEOR) { replace_insert_ob_in_map ("fire_trail", op); - if (was_destroyed (op, op_tag)) + if (op->destroyed ()) return; } /* end addition. */ #endif @@ -758,7 +755,6 @@ move_cone (object *op) { int i; - tag_t tag; /* if no map then hit_map will crash so just ignore object */ if (!op->map) @@ -789,7 +785,6 @@ } #endif - tag = op->count; hit_map (op, 0, op->attacktype, 0); /* Check to see if we should push anything. @@ -799,7 +794,7 @@ if (op->weight) check_spell_knockback (op); - if (was_destroyed (op, tag)) + if (op->destroyed ()) return; if ((op->duration--) < 0) @@ -1302,26 +1297,24 @@ if (!(mflags & P_OUT_OF_MAP) && ((mflags & P_IS_ALIVE) || OB_TYPE_MOVE_BLOCK (op, GET_MAP_MOVE_BLOCK (m, new_x, new_y)))) { - tag_t tag = op->count; - hit_map (op, op->direction, AT_MAGIC, 1); /* Basically, missile only hits one thing then goes away. * we need to remove it if someone hasn't already done so. */ - if (!was_destroyed (op, tag)) - { - remove_ob (op); - free_object (op); - } + if (!op->destroyed ()) + free_object (op); + return; } remove_ob (op); + if (!op->direction || (mflags & P_OUT_OF_MAP)) { free_object (op); return; } + op->x = new_x; op->y = new_y; op->map = m; @@ -1331,6 +1324,7 @@ op->direction = i; SET_ANIMATION (op, op->direction); } + insert_ob_in_map (op, op->map, op, 0); }