wip: don't lock command mutex for each mass/spring in FillGraph()
This commit is contained in:
@ -37,12 +37,12 @@ auto StateManager::FillGraph() -> void {
|
||||
|
||||
std::pair<std::unordered_set<State>, std::vector<std::pair<State, State>>>
|
||||
closure = current_state.Closure();
|
||||
for (const auto &state : closure.first) {
|
||||
physics.AddMassCmd(state);
|
||||
}
|
||||
for (const auto &[from, to] : closure.second) {
|
||||
physics.AddSpringCmd(from, to);
|
||||
}
|
||||
|
||||
physics.AddMassSpringsCmd(closure.first, closure.second);
|
||||
|
||||
// TODO: We have only dispatched the commands, the states won't be downloaded
|
||||
// when calling this... Make FindWinningStates() another command?
|
||||
// Or recalculate whenever masses.size() changes?
|
||||
FindWinningStates();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user