Skip to content

Commit 17adfbd

Browse files
committed
undo change of if condition
1 parent 967a76c commit 17adfbd

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

crates/control/src/behavior/node.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,12 @@ impl Behavior {
121121
(Some(_), PrimaryState::Ready | PrimaryState::Set | PrimaryState::Playing) => {}
122122
(Some(_), _) => self.active_since = None,
123123
}
124-
125-
if self.previous_role != context.world_state.robot.role {
124+
125+
if self.previous_role != context.world_state.robot.role
126+
&& context.world_state.robot.role != Role::Searcher
127+
&& context.world_state.robot.role != Role::Loser
128+
&& self.previous_role != Role::Keeper
129+
{
126130
self.previous_role = context.world_state.robot.role;
127131
self.last_time_role_changed = now;
128132
}

0 commit comments

Comments
 (0)