File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -506,10 +506,6 @@ func (e *Engine) processGameEvent(event *GameEvent) error {
506
506
return errors .Errorf ("Incomplete game event: %v" , event )
507
507
}
508
508
509
- if e .State .GameState () != GameStateStopped && e .State .GameState () != GameStateHalted && ! event .IsContinued () {
510
- e .SendCommand (CommandStop , "" )
511
- }
512
-
513
509
if event .IncrementsFoulCounter () {
514
510
team := event .ByTeam ()
515
511
if team .Unknown () {
@@ -540,6 +536,15 @@ func (e *Engine) processGameEvent(event *GameEvent) error {
540
536
e .SendGameEventSecondary (* event )
541
537
} else {
542
538
e .SendGameEventPrimary (* event )
539
+ e .State .PlacementPos = e .BallPlacementPos ()
540
+ }
541
+
542
+ if e .State .GameState () != GameStateHalted && ! event .IsContinued () {
543
+ if e .State .PlacementPos != nil {
544
+ e .SendCommand (CommandBallPlacement , e .State .GameEvent .ByTeam ().Opposite ())
545
+ } else if e .State .GameState () != GameStateStopped {
546
+ e .SendCommand (CommandStop , "" )
547
+ }
543
548
}
544
549
545
550
log .Printf ("Processed game event %v" , event )
You can’t perform that action at this time.
0 commit comments