Skip to content

Commit deae38b

Browse files
committed
[bugfix] Create separate instances for blue and yellow for subst. event
1 parent 260647f commit deae38b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/app/controller/engine.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,18 +289,18 @@ func (e *Engine) Continue() {
289289
substitutionIntend := e.State.BotSubstitutionIntend()
290290
if substitutionIntend != TeamUnknown {
291291
if substitutionIntend == TeamBoth {
292-
teamProto := TeamYellow.toProto()
292+
yellowTeam := TeamYellow.toProto()
293293
event := GameEvent{
294294
Type: GameEventBotSubstitution,
295295
Details: GameEventDetails{
296-
BotSubstitution: &refproto.GameEvent_BotSubstitution{ByTeam: &teamProto}}}
296+
BotSubstitution: &refproto.GameEvent_BotSubstitution{ByTeam: &yellowTeam}}}
297297
e.AddGameEvent(&event)
298298

299-
teamProto = TeamBlue.toProto()
299+
blueTeam := TeamBlue.toProto()
300300
event = GameEvent{
301301
Type: GameEventBotSubstitution,
302302
Details: GameEventDetails{
303-
BotSubstitution: &refproto.GameEvent_BotSubstitution{ByTeam: &teamProto}}}
303+
BotSubstitution: &refproto.GameEvent_BotSubstitution{ByTeam: &blueTeam}}}
304304
e.AddGameEvent(&event)
305305
} else {
306306
teamProto := substitutionIntend.toProto()

0 commit comments

Comments
 (0)