--- deliantra/server/server/spell_attack.C 2006/08/15 15:00:20 1.2 +++ deliantra/server/server/spell_attack.C 2006/08/15 16:19:55 1.3 @@ -1,6 +1,6 @@ /* * static char *rcsid_spell_attack_c = - * "$Id: spell_attack.C,v 1.2 2006/08/15 15:00:20 elmex Exp $"; + * "$Id: spell_attack.C,v 1.3 2006/08/15 16:19:55 elmex Exp $"; */ @@ -408,6 +408,9 @@ return; } + // elmex Tue Aug 15 17:46:51 CEST 2006: Prevent explosions of any kind on safe maps + // NOTE: If this breaks something important: remove this. I can't think of anything + // bad at the moment that might happen from this. if (get_map_flags (op->map, NULL, op->x, op->y, NULL, NULL) & P_SAFE_MAP) { remove_ob (op); @@ -912,6 +915,7 @@ if(op->state!=NUM_ANIMATIONS(op)-1) return; + env = object_get_env_recursive(op); if (op->env) { @@ -928,6 +932,16 @@ return; } + // elmex Tue Aug 15 17:46:51 CEST 2006: Prevent bomb from exploding + // on a safe map. I don't like this special casing, but it seems to be neccessary + // as bombs can be carried. + if (get_map_flags (op->map, NULL, op->x, op->y, NULL, NULL) & P_SAFE_MAP) + { + remove_ob (op); + free_object (op); + return; + } + /* This copies a lot of the code from the fire bullet, * but using the cast_bullet isn't really feasible, * so just set up the appropriate values.