From 4e43c322c67e8426100bb90d46fd43630a0608f2 Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Wed, 27 Dec 2006 13:24:15 +0000 Subject: [PATCH] empty row each 24 ticks --- calls.pl | 6 ++++++ templates/calls.tmpl | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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}); diff --git a/templates/calls.tmpl b/templates/calls.tmpl index 43a759c..9796e8a 100644 --- a/templates/calls.tmpl +++ b/templates/calls.tmpl @@ -75,7 +75,7 @@ - () + ()-New Day- -- 2.39.2