ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/ext/follow.ext
(Generate patch)

Comparing deliantra/server/ext/follow.ext (file contents):
Revision 1.22 by root, Tue May 18 21:45:37 2010 UTC vs.
Revision 1.23 by root, Fri May 21 00:42:03 2010 UTC

40 cf::wait_for_tick; 40 cf::wait_for_tick;
41 41
42 for (values %FOLLOW) { 42 for (values %FOLLOW) {
43 my ($who, $target, $queue) = @$_; 43 my ($who, $target, $queue) = @$_;
44 44
45 $target->active
46 or next;
47
45 my ($map, $x, $y) = ($target->map, $target->x, $target->y); 48 my ($map, $x, $y) = ($target->map, $target->x, $target->y);
46 49
47 # add new position to queue, if any 50 # add new position to queue, if any
48 push @$queue, [$map, $x, $y] 51 push @$queue, [$map, $x, $y]
49 if $map != $queue->[-1][0] 52 if $map != $queue->[-1][0]
52 55
53 # try to move to oldest position 56 # try to move to oldest position
54 if (@$queue > $MAX_QUEUE) { 57 if (@$queue > $MAX_QUEUE) {
55 $who->message ($target->name . " is too far away - you can't follow anymore!"); 58 $who->message ($target->name . " is too far away - you can't follow anymore!");
56 unfollow $target->name; 59 unfollow $target->name;
57 } else { 60 } elsif (@$queue) {
58 my ($map, $x, $y) = @{ $queue->[0] }; 61 my ($map, $x, $y) = @{ $queue->[0] };
59 62
60 $map->load; 63 $map->load;
61 64
62 if ( 65 if (

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines