"verbose|v!" => \$SHOWWARN,
);
+use constant { APM_FIRSTFRAME => 80 / .042 };
+
{
package Data::StarCraft::Replay;
my %stats; # player => count
for (@$map) {
$stats{$_->[1]}{actions}++;
- $stats{$_->[1]}{gameactions}++ if $_->[0] > 80 / .042;
+ $stats{$_->[1]}{gameactions}++ if $_->[0] >= APM_FIRSTFRAME;
$stats{$_->[1]}{last} = $_->[0] if $_->[2] eq "part";
$stats{$_->[1]}{$cmdmacro{$_->[2]} ? "macro" : "micro"}++;
$stats{$_->[1]}{count}{$_->[2]}++;
showtime($row->{last}),
# $row->{micro} / $row->{last} * 60 / .042 * 1.05,
# $row->{macro} / $row->{last} * 60 / .042 * 1.05,
- $row->{gameactions} / $row->{last} * 60 / .042 * 1.042,
- # $row->{gameactions} / $map->[-1][0] * 60 / .042,
+ $row->{gameactions} / ($row->{last} - APM_FIRSTFRAME) * 60 / .042,
);
if (0) {