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.65 by root, Mon Sep 29 10:20:49 2008 UTC vs.
Revision 1.66 by root, Mon Sep 29 10:31:32 2008 UTC

165 sint16 x, y; 165 sint16 x, y;
166 maptile *m; 166 maptile *m;
167 167
168 if (--op->duration < 0) 168 if (--op->duration < 0)
169 { 169 {
170 op->destroy_inv (true); // be explicit about dropping
171 op->destroy (true); 170 op->drop_and_destroy ();
172 return; 171 return;
173 } 172 }
174 173
175 hit_map (op, 0, op->attacktype, 1); 174 hit_map (op, 0, op->attacktype, 1);
176 175
308 307
309 maptile *newmap; 308 maptile *newmap;
310 mflags = get_map_flags (tmp->map, &newmap, tmp->x, tmp->y, &tmp->x, &tmp->y); 309 mflags = get_map_flags (tmp->map, &newmap, tmp->x, tmp->y, &tmp->x, &tmp->y);
311 if (mflags & P_OUT_OF_MAP) 310 if (mflags & P_OUT_OF_MAP)
312 { 311 {
313 tmp->destroy_inv (true); // be explicit about dropping
314 tmp->destroy (true); 312 tmp->drop_and_destroy ();
315 return 0; 313 return 0;
316 } 314 }
317 315
318 tmp->map = newmap; 316 tmp->map = newmap;
319 317
320 if (OB_TYPE_MOVE_BLOCK (tmp, GET_MAP_MOVE_BLOCK (tmp->map, tmp->x, tmp->y))) 318 if (OB_TYPE_MOVE_BLOCK (tmp, GET_MAP_MOVE_BLOCK (tmp->map, tmp->x, tmp->y)))
321 { 319 {
322 if (!QUERY_FLAG (tmp, FLAG_REFLECTING)) 320 if (!QUERY_FLAG (tmp, FLAG_REFLECTING))
323 { 321 {
324 tmp->destroy_inv (true); // be explicit about dropping
325 tmp->destroy (true); 322 tmp->drop_and_destroy ();
326 return 0; 323 return 0;
327 } 324 }
328 325
329 tmp->x = op->x; 326 tmp->x = op->x;
330 tmp->y = op->y; 327 tmp->y = op->y;
1186void 1183void
1187move_missile (object *op) 1184move_missile (object *op)
1188{ 1185{
1189 if (op->range-- <= 0) 1186 if (op->range-- <= 0)
1190 { 1187 {
1191 op->destroy_inv (true); // be explicit about dropping
1192 op->destroy (true); 1188 op->drop_and_destroy ();
1193 return; 1189 return;
1194 } 1190 }
1195 1191
1196 mapxy pos (op); 1192 mapxy pos (op);
1197 pos.move (op->direction); 1193 pos.move (op->direction);
1747 return; 1743 return;
1748 } 1744 }
1749 1745
1750 if (!op->duration || !owner->is_on_map ()) 1746 if (!op->duration || !owner->is_on_map ())
1751 { 1747 {
1752 op->destroy_inv (true); // be explicit about dropping
1753 op->destroy (true); 1748 op->drop_and_destroy ();
1754 return; 1749 return;
1755 } 1750 }
1756 1751
1757 op->duration--; 1752 op->duration--;
1758 1753

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines