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.3 by elmex, Wed Mar 15 15:35:52 2006 UTC vs.
Revision 1.4 by root, Fri May 12 15:43:46 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.3 2006/03/15 15:35:52 elmex Exp $"; 3 * "$Id: spell_attack.c,v 1.4 2006/05/12 15:43:46 root 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
1670 if(basedir == 0) { 1670 if(basedir == 0) {
1671 /* spray in all directions! 8) */ 1671 /* spray in all directions! 8) */
1672 basedir = rndm(1, 8); 1672 basedir = rndm(1, 8);
1673 } 1673 }
1674 1674
1675#if 0
1676 // this is bogus: it causes wrong places to be checked below
1677 // (a wall 2 cells away will block the effect...) and
1678 // doesn't work for SP_BULLET anyhow, so again tests the wrong
1679 // space.
1680 // should be fixed later, but correctness before featurs...
1681 // (schmorp)
1682
1675 /* new offset calculation to make swarm element distribution 1683 /* new offset calculation to make swarm element distribution
1676 * more uniform 1684 * more uniform
1677 */ 1685 */
1678 if(op->duration) { 1686 if(op->duration) {
1679 if(basedir & 1) { 1687 if(basedir & 1) {
1709 if (op->spell->subtype == SP_BULLET) 1717 if (op->spell->subtype == SP_BULLET)
1710 fire_bullet(owner, op, basedir, op->spell); 1718 fire_bullet(owner, op, basedir, op->spell);
1711 else if (op->spell->subtype == SP_MAGIC_MISSILE) 1719 else if (op->spell->subtype == SP_MAGIC_MISSILE)
1712 fire_arch_from_position (owner, op, origin_x, origin_y, basedir, op->spell); 1720 fire_arch_from_position (owner, op, origin_x, origin_y, basedir, op->spell);
1713 } 1721 }
1722#endif
1723
1724 /* spell pointer is set up for the spell this casts. Since this
1725 * should just be a pointer to the spell in some inventory,
1726 * it is unlikely to disappear by the time we need it. However,
1727 * do some sanity checking anyways.
1728 */
1729
1730 if (op->spell && op->spell->type == SPELL)
1731 {
1732 /* Bullet spells have a bunch more customization that needs to be done */
1733 if (op->spell->subtype == SP_BULLET)
1734 fire_bullet(owner, op, basedir, op->spell);
1735 else if (op->spell->subtype == SP_MAGIC_MISSILE)
1736 fire_arch_from_position (owner, op, op->x, op->y, basedir, op->spell);
1737 }
1714} 1738}
1715 1739
1716 1740
1717 1741
1718 1742

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines