ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/perl/schmorp-neko.ext
(Generate patch)

Comparing deliantra/maps/perl/schmorp-neko.ext (file contents):
Revision 1.8 by root, Thu Feb 9 05:06:17 2006 UTC vs.
Revision 1.9 by root, Fri Feb 17 15:21:21 2006 UTC

20 20
21sub on_move { 21sub on_move {
22 my ($data) = @_; 22 my ($data) = @_;
23 23
24 if (my $pl = $data->{who}->nearest_player) { 24 if (my $pl = $data->{who}->nearest_player) {
25 my (undef, undef, undef, $dir, undef) = $data->{who}->rangevector ($pl); 25 my ($d, undef, undef, $dir, undef) = $data->{who}->rangevector ($pl);
26
27 $dir = $dir % 8 + 1 unless $d > 1.5;
28
26 $data->{who}->move ($dir); 29 $data->{who}->move ($dir);
27 } 30 }
28 31
29 1 32 1
30} 33}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines