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.1 by elmex, Sun Aug 13 17:16:04 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.1 2006/08/13 17:16:04 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.
414 if (get_map_flags (op->map, NULL, op->x, op->y, NULL, NULL) & P_SAFE_MAP)
415 {
416 remove_ob (op);
417 free_object (op);
418 return;
419 }
420
411 if (op->attacktype) { 421 if (op->attacktype) {
412 hit_map (op, 0, op->attacktype, 1); 422 hit_map (op, 0, op->attacktype, 1);
413 if (was_destroyed (op, op_tag)) 423 if (was_destroyed (op, op_tag))
414 return; 424 return;
415 } 425 }
903 archetype *at; 913 archetype *at;
904 914
905 if(op->state!=NUM_ANIMATIONS(op)-1) 915 if(op->state!=NUM_ANIMATIONS(op)-1)
906 return; 916 return;
907 917
918
908 env = object_get_env_recursive(op); 919 env = object_get_env_recursive(op);
909 920
910 if (op->env) { 921 if (op->env) {
911 if (env->map == NULL) 922 if (env->map == NULL)
912 return; 923 return;
918 op->x = env->x; 929 op->x = env->x;
919 op->y = env->y; 930 op->y = env->y;
920 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)
921 return; 932 return;
922 } 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 }
923 944
924 /* This copies a lot of the code from the fire bullet, 945 /* This copies a lot of the code from the fire bullet,
925 * but using the cast_bullet isn't really feasible, 946 * but using the cast_bullet isn't really feasible,
926 * so just set up the appropriate values. 947 * so just set up the appropriate values.
927 */ 948 */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines