summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-17 22:54:42 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-17 22:54:42 +0000
commit3b29df9eccc5cd4998355f858c2ab7d03f350932 (patch)
tree2f2934dedc15ed4d8bde60a9a48649504556f050
parent2bad330ab6184ddb6a90571c3cf27cfc5f7deafa (diff)
downloadcrawl-ref-0.4.1.tar.gz
crawl-ref-0.4.1.zip
Update 0.4.1 tag -- fixes some bugs, including a serious memory0.4.1
corruption and a scoring one. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/tags/stone_soup-0.4.1@6594 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/docs/changes.stone_soup1
-rw-r--r--crawl-ref/source/describe.cc1
-rw-r--r--crawl-ref/source/food.cc2
-rw-r--r--crawl-ref/source/hiscores.cc6
-rw-r--r--crawl-ref/source/itemname.cc2
-rw-r--r--crawl-ref/source/items.cc10
-rw-r--r--crawl-ref/source/religion.cc9
7 files changed, 18 insertions, 13 deletions
diff --git a/crawl-ref/docs/changes.stone_soup b/crawl-ref/docs/changes.stone_soup
index deed7f6ec8..75e0367e2e 100644
--- a/crawl-ref/docs/changes.stone_soup
+++ b/crawl-ref/docs/changes.stone_soup
@@ -13,6 +13,7 @@ Disclaimer: These are merely the highlights, not an exhaustive list of changes.
* Fixed item quotes causing overlong descriptions.
* Fixed vampire bat jewellery exploit.
* Fixed secondary monster attacks being branded according to their weapon.
+* Fixed runes not being counted correctly in scoring.
* Fixed kills by hell effects counting as player kills.
* Fixed persistent --more-- in wizard mode.
* Fixed cold/fire always destroying all potions/scrolls on the floor.
diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc
index cf4f1e96b8..7d59e1a6a3 100644
--- a/crawl-ref/source/describe.cc
+++ b/crawl-ref/source/describe.cc
@@ -1638,6 +1638,7 @@ std::string get_item_description( const item_def &item, bool verbose,
<< std::dec << "$"
<< "x: " << item.x << " y: " << item.y
<< " link: " << item.link
+ << " slot: " << item.slot
<< " ident_type: "
<< static_cast<int>(get_ident_type(item));
}
diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc
index 8aac6e201f..2bab786c40 100644
--- a/crawl-ref/source/food.cc
+++ b/crawl-ref/source/food.cc
@@ -1953,7 +1953,7 @@ static int _player_likes_food_type(int type)
return 0;
}
- mprf(MSGCH_ERROR, "Couldn't handle food type: %d");
+// mprf(MSGCH_ERROR, "Couldn't handle food type: %d", type);
return 0;
}
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc
index 3d2f7dc281..6267202d22 100644
--- a/crawl-ref/source/hiscores.cc
+++ b/crawl-ref/source/hiscores.cc
@@ -972,8 +972,7 @@ void scorefile_entry::init()
num_diff_runes = 0;
FixedVector< int, NUM_RUNE_TYPES > rune_array;
- for (int i = 0; i < NUM_RUNE_TYPES; i++)
- rune_array[i] = 0;
+ rune_array.init(0);
// inventory value is only calculated for winners
const bool calc_item_values = (death_type == KILLED_BY_WINNING);
@@ -1003,9 +1002,10 @@ void scorefile_entry::init()
continue;
}
- rune_array[ you.inv[d].plus ] += you.inv[d].quantity;
if (rune_array[ you.inv[d].plus ] == 0)
num_diff_runes++;
+
+ rune_array[ you.inv[d].plus ] += you.inv[d].quantity;
}
}
}
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index a8f79190b3..2d02dccdef 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -2624,6 +2624,8 @@ const std::string menu_colour_item_prefix(const item_def &item, bool temp)
prefixes.push_back("equipped");
if (is_artefact(item))
prefixes.push_back("artefact");
+ break;
+
default:
break;
}
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc
index 7ee40289ca..4c1fb06865 100644
--- a/crawl-ref/source/items.cc
+++ b/crawl-ref/source/items.cc
@@ -2389,7 +2389,9 @@ static bool _find_subtype_by_name(item_def &item,
item.special = 0;
item.flags = 0;
item.quantity = 1;
- set_ident_flags( item, ISFLAG_KNOW_TYPE | ISFLAG_KNOW_PROPERTIES );
+ // Don't use set_ident_flags in order to avoid triggering notes.
+ // FIXME - is this the proper solution?
+ item.flags |= (ISFLAG_KNOW_TYPE | ISFLAG_KNOW_PROPERTIES);
int type_wanted = -1;
@@ -2475,14 +2477,12 @@ bool item_is_equipped(const item_def &item)
if (you.equip[i] == EQ_NONE)
continue;
- item_def& eq(you.inv[you.equip[i]]);
+ const item_def& eq(you.inv[you.equip[i]]);
if (!is_valid_item(eq))
continue;
- if (eq.slot == item.slot)
- return (true);
- else if (&eq == &item)
+ if (&eq == &item)
return (true);
}
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index d0f9d7dee0..7317e0c5f5 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -3091,16 +3091,17 @@ bool god_dislikes_item_handling(const item_def &item)
{
const int item_brand = get_weapon_brand(item);
- if (item_brand == SPWPN_VENOM)
+ if (item_brand == SPWPN_VENOM && item_type_known(item))
return (true);
}
else if (item.base_type == OBJ_MISSILES)
{
const int item_brand = get_ammo_brand(item);
- if (item_brand == SPMSL_POISONED
- || item_brand == SPMSL_POISONED_II
- || item_brand == SPMSL_CURARE)
+ if (item_type_known(item) &&
+ (item_brand == SPMSL_POISONED
+ || item_brand == SPMSL_POISONED_II
+ || item_brand == SPMSL_CURARE))
{
return (true);
}