Skip to content

Commit a9ca468

Browse files
committed
Avoid spamming penalty kick failed events
1 parent e3a3c03 commit a9ca468

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/app/engine/process_penalty.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import (
66
)
77

88
func (e *Engine) processPenalty() {
9-
if *e.currentState.GameState.Type == state.GameState_PENALTY &&
9+
if e.IsGameEventEnabled(state.GameEvent_PENALTY_KICK_FAILED) &&
10+
*e.currentState.GameState.Type == state.GameState_PENALTY &&
1011
goDur(e.currentState.CurrentActionTimeRemaining) < 0 {
1112
var location *geom.Vector2
1213
if e.gcState.TrackerStateGc.Ball != nil {

0 commit comments

Comments
 (0)