chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.main.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Calculate total distance correctly
[ypp-sc-tools.main.git]
/
yarrg
/
web
/
routetrade
diff --git
a/yarrg/web/routetrade
b/yarrg/web/routetrade
index 482c13a3e9969e98e51afab2e8a8878be03bfeb3..7f7d27f45d26d51a25c20b42ff66003e60d6848a 100644
(file)
--- a/
yarrg/web/routetrade
+++ b/
yarrg/web/routetrade
@@
-597,11
+597,11
@@
$addcols->({ Total => 0, DoReverse => 1 }, qw(
<tr><td colspan=3>
% $iquery->execute($islandids[$i]);
% my ($islandname) = $iquery->fetchrow_array();
<tr><td colspan=3>
% $iquery->execute($islandids[$i]);
% my ($islandname) = $iquery->fetchrow_array();
-% my $this_dist= $distance->($islandids[$i-1],$islandids[$i]);
-% $total_dist += $this_dist;
% if (!$i) {
<strong>Start at <% $islandname |h %></strong>
% } else {
% if (!$i) {
<strong>Start at <% $islandname |h %></strong>
% } else {
+% my $this_dist= $distance->($islandids[$i-1],$islandids[$i]);
+% $total_dist += $this_dist;
<strong>Sail to <% $islandname |h %></strong>
- <% $this_dist |h %> leagues </td>
% }
<strong>Sail to <% $islandname |h %></strong>
- <% $this_dist |h %> leagues </td>
% }