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.94 by root, Fri Dec 18 03:49:46 2009 UTC vs.
Revision 1.97 by root, Fri Mar 26 00:53:26 2010 UTC

93 * also be safe for objects. 93 * also be safe for objects.
94 * This does return if successful or not, but 94 * This does return if successful or not, but
95 * I don't see us doing anything useful with that information 95 * I don't see us doing anything useful with that information
96 * right now. 96 * right now.
97 */ 97 */
98 move_object (tmp, absdir (op->stats.sp)); 98 tmp->move (absdir (op->stats.sp));
99 } 99 }
100 100
101 } 101 }
102} 102}
103 103
660 return 0; 660 return 0;
661 } 661 }
662 662
663 tmp->map = newmap; 663 tmp->map = newmap;
664 664
665 // in case the bullet has direction 0 we explode it in place.
666 // direction 0 is possible for instance when a poison cloud trap springs.
667 if (tmp->direction == 0)
668 {
669 if (tmp->other_arch
670 && (tmp = tmp->insert_at (tmp, op))) // insert before explode cleanly
671 explode_bullet (tmp); // explode object will/should remove tmp
672 else
673 tmp->destroy ();
674
675 return 0;
676 }
677
665 if (OB_TYPE_MOVE_BLOCK (tmp, GET_MAP_MOVE_BLOCK (tmp->map, tmp->x, tmp->y))) 678 if (OB_TYPE_MOVE_BLOCK (tmp, GET_MAP_MOVE_BLOCK (tmp->map, tmp->x, tmp->y)))
666 { 679 {
667 if (!QUERY_FLAG (tmp, FLAG_REFLECTING)) 680 if (!QUERY_FLAG (tmp, FLAG_REFLECTING))
668 { 681 {
669 tmp->destroy (); 682 tmp->destroy ();
1287 else 1300 else
1288 op->skill = 0; 1301 op->skill = 0;
1289 1302
1290 op->change_skill (find_skill_by_name (op, op->skill)); 1303 op->change_skill (find_skill_by_name (op, op->skill));
1291 1304
1305 dynbuf buf;
1292 unordered_mapwalk (op, -range, -range, range, range) 1306 unordered_mapwalk (buf, op, -range, -range, range, range)
1293 { 1307 {
1294 mapspace &ms = m->at (nx, ny); 1308 mapspace &ms = m->at (nx, ny);
1295 1309
1296 if (ms.flags () & P_IS_ALIVE) 1310 if (ms.flags () & P_IS_ALIVE)
1297 for (object *next, *tmp = ms.bot; tmp; tmp = next) 1311 for (object *next, *tmp = ms.bot; tmp; tmp = next)
1456 else if (god && spell->race == shstr_GOD_FRIEND) 1470 else if (god && spell->race == shstr_GOD_FRIEND)
1457 race = god->race; 1471 race = god->race;
1458 else 1472 else
1459 race = spell->race; 1473 race = spell->race;
1460 1474
1475 dynbuf buf;
1461 unordered_mapwalk (op, -range, -range, range, range) 1476 unordered_mapwalk (buf, op, -range, -range, range, range)
1462 { 1477 {
1463 mapspace &ms = m->at (nx, ny); 1478 mapspace &ms = m->at (nx, ny);
1464 1479
1465 /* If there is nothing living on this space, no need to go further */ 1480 /* If there is nothing living on this space, no need to go further */
1466 if (!ms.flags () & P_IS_ALIVE) 1481 if (!ms.flags () & P_IS_ALIVE)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines