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.47 by root, Fri Jun 2 22:13:47 2006 UTC vs.
Revision 1.48 by elmex, Sat Jun 3 21:59:55 2006 UTC

70 $::CFG->{map_shift_x} = $bw + $x - $ox; 70 $::CFG->{map_shift_x} = $bw + $x - $ox;
71 $::CFG->{map_shift_y} = $bh + $y - $oy; 71 $::CFG->{map_shift_y} = $bh + $y - $oy;
72 72
73 $self->update; 73 $self->update;
74 }; 74 };
75 } elsif ($ev->{button} == 1) {
76 my ($ox, $oy) = ($ev->{x}, $ev->{y});
77
78 my $fx = int ((($ev->{x} - $::CFG->{map_shift_x}) / (32 * $::CFG->{map_scale})) + 0.99);
79 my $fy = int ((($ev->{y} - $::CFG->{map_shift_y}) / (32 * $::CFG->{map_scale})) + 0.99);
80 $fx += $::MAP->x;
81 $fy += $::MAP->y;
82
83 $::CONN->send (sprintf "lookat %d %d", $fx, $fy);
84
85 warn "FOOX: $fx (".$::MAP->ox.")\n";
86 warn "FOOY: $fy (".$::MAP->oy.")\n";
75 } 87 }
76 88
77 1 89 1
78} 90}
79 91

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines