]> git.sesse.net Git - pkanalytics/commitdiff
Hack around the fact that pulls were not counted as part of D-line.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 30 Jul 2023 12:42:08 +0000 (14:42 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 30 Jul 2023 12:42:08 +0000 (14:42 +0200)
ultimate.js

index 460884cef139b78477218de071188aa0780b6147..cb03126696ebb27c98b071cdd17c0d5e302a68f5 100644 (file)
@@ -481,6 +481,7 @@ function calc_stats(json, filters) {
                        if (type === 'pull') {
                                puller = e['player'];
                                pull_started = t;
+                               keep = keep_event(players, formations_used_this_point, /*last_pull_was_ours=*/true, filters);  // Will change below. This is an ugly hack.
                                if (keep) ++p.pulls;
                        } else if (type === 'in' || type === 'out' || type === 'stoppage' || type === 'restart' || type === 'unknown' || type === 'set_defense' || type === 'set_offense') {
                                // No effect on pull.
@@ -578,6 +579,7 @@ function calc_stats(json, filters) {
                                possession_started = t;
                        }
 
+                       // O/D-point management.
                        if (type === 'pull') {
                                last_pull_was_ours = true;
                        } else if (type === 'their_pull') {