From 445895d95df53255dd570691f1ebb3eb538348d0 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Wed, 2 Jul 2008 12:48:15 +0000 Subject: Revert the change on ammo handling for Tiles, and replace it with a more generic logic that uses item tiles for BEAM_MISSILE, else bolts according to flavour. Identify monster fired ammunition ego if the launcher ego is known, not that it has much of an effect because plain ammo gets no special description. In the message list the fired item as it will look to the player (i.e. "arrow of ice" for a plain arrow fired off a bow of frost), even though the item actually dropped will still be a plain one. I hope this isn't too confusing. (And if it is, it should be easy to revert. :p) git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6331 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/tile1.cc | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) (limited to 'crawl-ref/source/tile1.cc') diff --git a/crawl-ref/source/tile1.cc b/crawl-ref/source/tile1.cc index c5ecc5384b..5dcea8891f 100644 --- a/crawl-ref/source/tile1.cc +++ b/crawl-ref/source/tile1.cc @@ -1892,17 +1892,14 @@ int tileidx_item(const item_def &item) } } -/* - Determine Octant of missile direction - ---> X+ - | - | 701 - Y 6O2 - + 543 - - the octant boundary slope tan(pi/8)=sqrt(2)-1 = 0.414 is approximated by 2/5 - -*/ +// Determine Octant of missile direction +// .---> X+ +// | +// | 701 +// Y 6O2 +// + 543 +// +// The octant boundary slope tan(pi/8)=sqrt(2)-1 = 0.414 is approximated by 2/5. static int _tile_bolt_dir(int dx, int dy) { int ax = abs(dx); @@ -1925,16 +1922,6 @@ int tileidx_item_throw(const item_def &item, int dx, int dy) int ch = -1; int dir = _tile_bolt_dir(dx, dy); - switch (get_ammo_brand(item)) - { - case SPMSL_FLAME: - return (tileidx_zap(RED)); - case SPMSL_ICE: - return (tileidx_zap(WHITE)); - default: - break; - } - // Thrown items with multiple directions switch (item.sub_type) { -- cgit v1.2.3-54-g00ecf