Skip to content

Commit

Permalink
Update change_position (#723)
Browse files Browse the repository at this point in the history
* Update change_position

* erase outside the loop
  • Loading branch information
Wind2009-Louse authored Feb 15, 2025
1 parent fe48b4f commit bcbe69d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion operations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4965,8 +4965,12 @@ int32_t field::change_position(uint16_t step, group * targets, effect * reason_e
process_single_event();
if(flips.size())
raise_event(flips, EVENT_FLIP, reason_effect, 0, reason_player, 0, 0);
if(ssets.size())
if(ssets.size()) {
for(auto& pcard : ssets) {
targets->container.erase(pcard);
}
raise_event(ssets, EVENT_SSET, reason_effect, 0, reason_player, 0, 0);
}
if(pos_changed.size())
raise_event(pos_changed, EVENT_CHANGE_POS, reason_effect, 0, reason_player, 0, 0);
process_instant_event();
Expand Down

0 comments on commit bcbe69d

Please sign in to comment.