Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions AirLib/include/common/common_utils/Signal.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ class Signal {

// calls all connected functions
void emit(Args... p) {
for (auto it : slots_) {
it.second(p...);
for(auto it=slots_.begin(); it!=slots_.end(); ) {
// Increment here so that the entry can be erased from inside the method as well
(it++)->second(p...);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ void AFlyingPawn::EndPlay(const EEndPlayReason::Type EndPlayReason)
camera_back_center_ = nullptr;
camera_bottom_center_ = nullptr;

pawn_events_.getActuatorSignal().disconnect_all();
rotating_movements_.Empty();

Super::EndPlay(EndPlayReason);
}

Expand Down