Commit 17dd27e 1 parent d561b59 commit 17dd27e Copy full SHA for 17dd27e
File tree 1 file changed +8
-5
lines changed
crates/control/src/behavior
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -103,11 +103,14 @@ impl Behavior {
103
103
104
104
pub fn cycle ( & mut self , mut context : CycleContext ) -> Result < MainOutputs > {
105
105
let world_state = context. world_state ;
106
- if let Some ( command) = & context. parameters . injected_motion_command {
107
- return Ok ( MainOutputs {
108
- motion_command : command. clone ( ) . into ( ) ,
109
- dribble_path : None . into ( ) ,
110
- } ) ;
106
+
107
+ if world_state. robot . primary_state == PrimaryState :: Playing {
108
+ if let Some ( command) = & context. parameters . injected_motion_command {
109
+ return Ok ( MainOutputs {
110
+ motion_command : command. clone ( ) . into ( ) ,
111
+ dribble_path : None . into ( ) ,
112
+ } ) ;
113
+ }
111
114
}
112
115
113
116
if let Some ( ball_state) = & world_state. ball {
You can’t perform that action at this time.
0 commit comments