Skip to content

Commit 825ecd3

Browse files
committed
If either action is stop, it should stop.
1 parent 75331a1 commit 825ecd3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

SerialPrograms/Source/PokemonBDSP/Programs/PokemonBDSP_EncounterDetection.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,14 @@ EncounterActionFull StandardEncounterDetection::get_action_doubles(){
244244
m_stream.log(str_left);
245245
m_stream.log(str_right);
246246

247+
// If either action is stop program, we stop program.
248+
if (action_left.action == EncounterAction::StopProgram){
249+
return action_left;
250+
}
251+
if (action_right.action == EncounterAction::StopProgram){
252+
return action_right;
253+
}
254+
247255
if (action_left != action_right){
248256
throw_and_log<FatalProgramException>(
249257
m_stream.logger(), ErrorReport::NO_ERROR_REPORT,

0 commit comments

Comments
 (0)