--- deliantra/server/server/spell_attack.C 2007/11/08 19:43:28 1.49 +++ deliantra/server/server/spell_attack.C 2008/04/30 10:31:04 1.54 @@ -1,7 +1,7 @@ /* * This file is part of Deliantra, the Roguelike Realtime MMORPG. * - * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Deliantra team + * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * Copyright (©) 2002-2003,2007 Mark Wedel & Crossfire Development Team * Copyright (©) 1992,2007 Frank Tore Johansen * @@ -407,8 +407,9 @@ if (op->env) { - object *env = object_get_env_recursive (op); - if (env->map == NULL || out_of_map (env->map, env->x, env->y)) + object *env = op->outer_env (); + + if (!env->map || out_of_map (env->map, env->x, env->y)) { LOG (llevError, "BUG: explode_bullet(): env out of map\n"); op->destroy (); @@ -939,22 +940,16 @@ void animate_bomb (object *op) { - int i; - object *env, *tmp; - if (op->state != NUM_ANIMATIONS (op) - 1) return; - env = object_get_env_recursive (op); + object *env = op->outer_env (); if (op->env) { if (env->map == NULL) return; - if (env->type == PLAYER) - esrv_del_item (env->contr, op->count); - if (!(op = op->insert_at (env, op))) return; } @@ -974,12 +969,12 @@ */ if (archetype *at = archetype::find (SPLINT)) { - for (i = 1; i < 9; i++) + for (int i = 1; i < 9; i++) { if (out_of_map (op->map, op->x + freearr_x[i], op->y + freearr_x[i])) continue; - tmp = arch_to_object (at); + object *tmp = arch_to_object (at); tmp->direction = i; tmp->range = op->range; tmp->stats.dam = op->stats.dam; @@ -1003,7 +998,6 @@ int create_bomb (object *op, object *caster, int dir, object *spell) { - object *tmp; int mflags; sint16 dx = op->x + freearr_x[dir], dy = op->y + freearr_y[dir]; @@ -1015,6 +1009,7 @@ new_draw_info (NDI_UNIQUE, 0, op, "There is something in the way."); return 0; } + tmp = arch_to_object (spell->other_arch); /* level dependencies for bomb */ @@ -1605,7 +1600,9 @@ /* charm */ if (QUERY_FLAG (spell, FLAG_NO_ATTACK) && !QUERY_FLAG (head, FLAG_FRIENDLY)) { - /* Prevent uncontolled outbreaks of self replicating monsters. + INVOKE_OBJECT (KILL, head, ARG_OBJECT (caster)); + + /* Prevent uncontrolled outbreaks of self replicating monsters. Typical use case is charm, go somwhere, use aggravation to make hostile. This could lead to fun stuff like mice outbreak in bigworld and server crawl. */ CLEAR_FLAG (head, FLAG_GENERATOR);