]> git.sesse.net Git - pkanalytics/commitdiff
Goal counts as a touch.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 27 Jul 2023 10:59:34 +0000 (12:59 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Thu, 27 Jul 2023 10:59:34 +0000 (12:59 +0200)
ultimate.js

index 200303c32fdbada7d3df8738ee240d3903be4d06..f913e3d87df150468417207c8fdfab41c99f6d91 100644 (file)
@@ -374,6 +374,9 @@ function calc_stats(json, filters) {
                                last_pull_was_ours = !offense;
                                between_points = false;
                        } else if (type === 'goal' || type === 'their_goal' || type === 'stoppage') {
+                               if (type === 'goal') {
+                                       if (keep) ++p.touches;
+                               }
                                for (const [q,p] of Object.entries(players)) {
                                        if (p.on_field_since === null) {
                                                continue;