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.49 by root, Thu Nov 8 19:43:28 2007 UTC vs.
Revision 1.50 by root, Sun Apr 20 23:25:09 2008 UTC

405 return; 405 return;
406 } 406 }
407 407
408 if (op->env) 408 if (op->env)
409 { 409 {
410 object *env = object_get_env_recursive (op); 410 object *env = op->outer_env ();
411
411 if (env->map == NULL || out_of_map (env->map, env->x, env->y)) 412 if (!env->map || out_of_map (env->map, env->x, env->y))
412 { 413 {
413 LOG (llevError, "BUG: explode_bullet(): env out of map\n"); 414 LOG (llevError, "BUG: explode_bullet(): env out of map\n");
414 op->destroy (); 415 op->destroy ();
415 return; 416 return;
416 } 417 }
937 * op is the original bomb object. 938 * op is the original bomb object.
938 */ 939 */
939void 940void
940animate_bomb (object *op) 941animate_bomb (object *op)
941{ 942{
942 int i;
943 object *env, *tmp;
944
945 if (op->state != NUM_ANIMATIONS (op) - 1) 943 if (op->state != NUM_ANIMATIONS (op) - 1)
946 return; 944 return;
947 945
948 env = object_get_env_recursive (op); 946 object *env = op->outer_env ();
949 947
950 if (op->env) 948 if (op->env)
951 { 949 {
952 if (env->map == NULL) 950 if (env->map == NULL)
953 return; 951 return;
972 * but using the cast_bullet isn't really feasible, 970 * but using the cast_bullet isn't really feasible,
973 * so just set up the appropriate values. 971 * so just set up the appropriate values.
974 */ 972 */
975 if (archetype *at = archetype::find (SPLINT)) 973 if (archetype *at = archetype::find (SPLINT))
976 { 974 {
977 for (i = 1; i < 9; i++) 975 for (int i = 1; i < 9; i++)
978 { 976 {
979 if (out_of_map (op->map, op->x + freearr_x[i], op->y + freearr_x[i])) 977 if (out_of_map (op->map, op->x + freearr_x[i], op->y + freearr_x[i]))
980 continue; 978 continue;
981 979
982 tmp = arch_to_object (at); 980 object *tmp = arch_to_object (at);
983 tmp->direction = i; 981 tmp->direction = i;
984 tmp->range = op->range; 982 tmp->range = op->range;
985 tmp->stats.dam = op->stats.dam; 983 tmp->stats.dam = op->stats.dam;
986 tmp->duration = op->duration; 984 tmp->duration = op->duration;
987 tmp->attacktype = op->attacktype; 985 tmp->attacktype = op->attacktype;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines