File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
internal/app/statemachine Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,11 @@ func (s *BallPlacementPosDeterminer) Location() *geom.Vector2 {
114
114
state .GameEvent_UNSPORTING_BEHAVIOR_MAJOR :
115
115
return s .keepCurrentPlacementPos ()
116
116
case state .GameEvent_EXCESSIVE_BOT_SUBSTITUTION :
117
+ if s .State .NextCommand != nil && * s .State .NextCommand .Type != state .Command_DIRECT {
118
+ // if next command is not a free kick, keep current placement pos.
119
+ // next command is not changed if it was free kick or penalty kick.
120
+ return s .keepCurrentPlacementPos ()
121
+ }
117
122
if s .State .HasGameEventByTeam (state .GameEvent_EXCESSIVE_BOT_SUBSTITUTION , s .Event .ByTeam ().Opposite ()) {
118
123
// both teams have excessive bot substitution. Recover original placement pos
119
124
// As we do not know the original placement pos, we have to iterate over all game events
You can’t perform that action at this time.
0 commit comments