aboutsummaryrefslogtreecommitdiff
path: root/frontend/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/cmd')
-rw-r--r--frontend/cmd/search.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/frontend/cmd/search.cpp b/frontend/cmd/search.cpp
index f10709a..16e4592 100644
--- a/frontend/cmd/search.cpp
+++ b/frontend/cmd/search.cpp
@@ -7,14 +7,17 @@ using namespace std;
FollowupAction Player::cmd_search(string &) {
bool found = false;
+ List<Object *> to_unhide;
for (Object * object : this->location.get_hidden_objects()) {
if (!found) lprtf("Je vindt:\n");
lprtf("- %s\n", object->get_displayname().c_str());
- this->location.unhide_object(object);
+ to_unhide.push_back(object);
found = true;
}
if (!found)
lprtf("Je hebt niks gevonden.\n");
+ for (Object * object : to_unhide)
+ this->location.unhide_object(object);
return FollowupAction::UPDATE;
}