ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/spell_attack.C
(Generate patch)

Comparing deliantra/server/server/spell_attack.C (file contents):
Revision 1.2 by elmex, Tue Aug 15 15:00:20 2006 UTC vs.
Revision 1.3 by elmex, Tue Aug 15 16:19:55 2006 UTC

1/* 1/*
2 * static char *rcsid_spell_attack_c = 2 * static char *rcsid_spell_attack_c =
3 * "$Id: spell_attack.C,v 1.2 2006/08/15 15:00:20 elmex Exp $"; 3 * "$Id: spell_attack.C,v 1.3 2006/08/15 16:19:55 elmex Exp $";
4 */ 4 */
5 5
6 6
7/* 7/*
8 CrossFire, A Multiplayer game for X-windows 8 CrossFire, A Multiplayer game for X-windows
406 remove_ob (op); 406 remove_ob (op);
407 free_object (op); 407 free_object (op);
408 return; 408 return;
409 } 409 }
410 410
411 // elmex Tue Aug 15 17:46:51 CEST 2006: Prevent explosions of any kind on safe maps
412 // NOTE: If this breaks something important: remove this. I can't think of anything
413 // bad at the moment that might happen from this.
411 if (get_map_flags (op->map, NULL, op->x, op->y, NULL, NULL) & P_SAFE_MAP) 414 if (get_map_flags (op->map, NULL, op->x, op->y, NULL, NULL) & P_SAFE_MAP)
412 { 415 {
413 remove_ob (op); 416 remove_ob (op);
414 free_object (op); 417 free_object (op);
415 return; 418 return;
910 archetype *at; 913 archetype *at;
911 914
912 if(op->state!=NUM_ANIMATIONS(op)-1) 915 if(op->state!=NUM_ANIMATIONS(op)-1)
913 return; 916 return;
914 917
918
915 env = object_get_env_recursive(op); 919 env = object_get_env_recursive(op);
916 920
917 if (op->env) { 921 if (op->env) {
918 if (env->map == NULL) 922 if (env->map == NULL)
919 return; 923 return;
925 op->x = env->x; 929 op->x = env->x;
926 op->y = env->y; 930 op->y = env->y;
927 if ((op = insert_ob_in_map (op, env->map, op,0)) == NULL) 931 if ((op = insert_ob_in_map (op, env->map, op,0)) == NULL)
928 return; 932 return;
929 } 933 }
934
935 // elmex Tue Aug 15 17:46:51 CEST 2006: Prevent bomb from exploding
936 // on a safe map. I don't like this special casing, but it seems to be neccessary
937 // as bombs can be carried.
938 if (get_map_flags (op->map, NULL, op->x, op->y, NULL, NULL) & P_SAFE_MAP)
939 {
940 remove_ob (op);
941 free_object (op);
942 return;
943 }
930 944
931 /* This copies a lot of the code from the fire bullet, 945 /* This copies a lot of the code from the fire bullet,
932 * but using the cast_bullet isn't really feasible, 946 * but using the cast_bullet isn't really feasible,
933 * so just set up the appropriate values. 947 * so just set up the appropriate values.
934 */ 948 */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines