Skip to content

Commit

Permalink
Fix logging of passing TDs
Browse files Browse the repository at this point in the history
  • Loading branch information
dumbmatter committed Dec 23, 2024
1 parent bb927f1 commit 0e6d885
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/worker/core/GameSim.football/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2031,13 +2031,14 @@ class GameSim extends GameSimBase {
});
}

// Do safety before logging event, otherwise pts for safety show up on the next play (kickoff)
if (safety) {
// Do safety before logging event, otherwise pts for safety show up on the next play (kickoff)
this.doSafety();
this.playByPlay.logEvent(completeEvent);
} else if (!td) {
this.playByPlay.logEvent(completeEvent);
}

this.playByPlay.logEvent(completeEvent);

if (!td) {
this.doTackle({
loss: yds < 0,
});
Expand Down

0 comments on commit 0e6d885

Please sign in to comment.