ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/Deliantra-Client/DC/MapWidget.pm
(Generate patch)

Comparing deliantra/Deliantra-Client/DC/MapWidget.pm (file contents):
Revision 1.58 by elmex, Tue Jun 13 14:35:17 2006 UTC vs.
Revision 1.59 by root, Wed Jun 14 16:20:22 2006 UTC

60 %{$self->{completer}{command}} = (); 60 %{$self->{completer}{command}} = ();
61} 61}
62 62
63sub button_down { 63sub button_down {
64 my ($self, $ev, $x, $y) = @_; 64 my ($self, $ev, $x, $y) = @_;
65
66 return unless $::CONN;
65 67
66 $self->focus_in; 68 $self->focus_in;
67 69
68 if ($ev->{button} == 1) { 70 if ($ev->{button} == 1) {
69 my $x = int +($ev->{x} - $::CFG->{map_shift_x}) / (32 * $::CFG->{map_scale}); 71 my $x = int +($ev->{x} - $::CFG->{map_shift_x}) / (32 * $::CFG->{map_scale});
255 257
256 my $focused = $CFClient::UI::FOCUS == $self 258 my $focused = $CFClient::UI::FOCUS == $self
257 || $CFClient::UI::FOCUS == $self->{completer}{entry}; 259 || $CFClient::UI::FOCUS == $self->{completer}{entry};
258 260
259 return 261 return
260 unless $focused || !$::FAST; 262 unless $::CONN && ($focused || !$::FAST);
261 263
262 if (delete $self->{need_update}) { 264 if (delete $self->{need_update}) {
265 $self->{fow_texture} ||= glGenTexture;
266
263 glNewList $self->{list}; 267 glNewList $self->{list};
264 268
265 if ($::MAP) { 269 if ($::MAP) {
266 my $sw = $self->{sw} = int $::WIDTH / (32 * $::CFG->{map_scale}) + 0.99; 270 my $sw = $self->{sw} = int $::WIDTH / (32 * $::CFG->{map_scale}) + 0.99;
267 my $sh = $self->{sh} = int $::HEIGHT / (32 * $::CFG->{map_scale}) + 0.99; 271 my $sh = $self->{sh} = int $::HEIGHT / (32 * $::CFG->{map_scale}) + 0.99;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines