map: improve polyline duplicate detection

This commit is contained in:
Daniel Friesel 2020-01-29 19:54:32 +01:00
parent 993f6be6c9
commit dadb0f6637

View file

@ -488,8 +488,7 @@ sub map_history {
next; next;
} }
my $key my $key = $from_eva . '!' . $to_eva . '!' . ( $to_index - $from_index );
= $from_eva . '!' . $to_eva . '!' . $from_index . '!' . $to_index;
if ( $seen{$key} ) { if ( $seen{$key} ) {
next; next;
@ -498,7 +497,7 @@ sub map_history {
$seen{$key} = 1; $seen{$key} = 1;
# direction does not matter at the moment # direction does not matter at the moment
$key = $to_eva . '!' . $from_eva . '!' . $to_index . '!' . $from_index; $key = $to_eva . '!' . $from_eva . '!' . ( $to_index - $from_index );
$seen{$key} = 1; $seen{$key} = 1;
@polyline = @polyline[ $from_index .. $to_index ]; @polyline = @polyline[ $from_index .. $to_index ];