'stallouts': 0,
'defenses': 0,
- 'interceptions': 0,
'points_played': 0,
'playing_time_ms': 0,
'offensive_playing_time_ms': 0,
}
}
+ if (type !== 'out' && type !== 'in' && p !== undefined && p.on_field_since === null) {
+ console.log('Event “' + type + '” on subbed-out player ' + p.name + ' in ' + our_score + '\u2013' + their_score + ' in ' + match['description']);
+ }
+ if (type === 'catch' && handler !== null && players[handler].on_field_since === null) {
+ // The handler subbed out and was replaced with another handler,
+ // so this wasn't a pass.
+ console.log('Pass from subbed-out player ' + players[handler].name + ' in ' + our_score + '\u2013' + their_score + ' in ' + match['description'] + '; ignoring.');
+ handler = null;
+ }
+
// Event management
if (type === 'catch' || type === 'goal') {
if (handler !== null) {
if (keep) ++p.defenses;
} else if (type === 'interception') {
if (keep) {
- ++p.interceptions;
+ ++p.catches;
++p.defenses;
++p.touches;
}