X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=calls.pl;h=5fa57dff1ae9809ab5055664b5d511812379263f;hb=2786d1732fb6a4f729db332b49766e0f86e574be;hp=1092d395843b4d5c256593f28fce32b48a53e7a6;hpb=bb3ed008868592ef478d8432b86a39c293efae2d;p=ndwebbie.git diff --git a/calls.pl b/calls.pl index 1092d39..5fa57df 100644 --- a/calls.pl +++ b/calls.pl @@ -199,6 +199,7 @@ ORDER BY c.landing_tick DESC $query->execute or $error .= $DBH->errstr; my @calls; my $i = 0; + my $tick = $ND::TICK; while (my $call = $query->fetchrow_hashref){ if ($call->{defense_points} < $minpoints){ $call->{DefPrio} = 'LowestPrio'; @@ -207,6 +208,11 @@ ORDER BY c.landing_tick DESC }else{ $call->{DefPrio} = 'HighestPrio'; } + while ($tick - 24 > $call->{landing_tick}){ + $tick -= 24; + push @calls,{}; + $i = 0; + } $i++; $call->{ODD} = $i % 2; $call->{shiptype} = escapeHTML($call->{shiptype});