Fix use of a static bitset to record whether items (in a dynamic vector) have been taken
This commit is contained in:
@@ -248,7 +248,7 @@ short dist_from_party(location where) {
|
||||
void set_item_flag(cItem* item) {
|
||||
if((item->is_special > 0) && (item->is_special < 65)) {
|
||||
item->is_special--;
|
||||
univ.town->item_taken.set(item->is_special);
|
||||
univ.town->set_item_taken(item->is_special);
|
||||
item->is_special = 0;
|
||||
}
|
||||
}
|
||||
|
@@ -383,7 +383,7 @@ void start_town_mode(short which_town, short entry_dir) {
|
||||
continue;
|
||||
}
|
||||
// Don't place the item if the party already took it, unless it's always there
|
||||
if(univ.town->item_taken[i] && !preset.always_there) {
|
||||
if(univ.town->is_item_taken(i) && !preset.always_there) {
|
||||
univ.town.items.pop_back();
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user