--- deliantra/Deliantra-Client/DC/MapWidget.pm 2007/07/27 18:04:42 1.115 +++ deliantra/Deliantra-Client/DC/MapWidget.pm 2007/08/06 05:06:33 1.116 @@ -446,7 +446,7 @@ sub refresh_hook { my ($self) = @_; - if ($::MAP) { + if ($::MAP && $::CONN) { if (delete $self->{need_update}) { my $tilesize = $self->{ctilesize} = (int $self->{tilesize} * $::CFG->{map_scale}) || 1; @@ -481,7 +481,7 @@ glTranslate $sx0, $sy0; glScale $::CFG->{map_scale}, $::CFG->{map_scale}; - $::MAP->draw ($dx, $dy, $sw, $sh, $self->{tilesize}); + my $missing = $::MAP->draw ($dx, $dy, $sw, $sh, $self->{tilesize}); glScale $self->{tilesize}, $self->{tilesize}; @@ -511,6 +511,13 @@ glPopMatrix; glEndList; + + for my $tile (@$missing) { + $tile = $::CONN->{texture}[$tile] + or next; + next if $tile->{loading}; + $tile->upload; + } } } else { glDeleteList delete $self->{list}