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.24 by root, Tue May 25 20:10:29 2010 UTC vs.
Revision 1.26 by root, Wed May 4 19:04:44 2011 UTC

35sub start_follow_handler { 35sub start_follow_handler {
36 $FOLLOW_HANDLER = cf::async_ext { 36 $FOLLOW_HANDLER = cf::async_ext {
37 $Coro::current->{desc} = "follow handler"; 37 $Coro::current->{desc} = "follow handler";
38 38
39 while () { 39 while () {
40 cf::wait_for_tick; 40 $cf::WAIT_FOR_TICK->wait;
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 45 $target->active
55 || $y != $queue->[-1][2]; 55 || $y != $queue->[-1][2];
56 56
57 # try to move to oldest position 57 # try to move to oldest position
58 if (@$queue > $MAX_QUEUE) { 58 if (@$queue > $MAX_QUEUE) {
59 $who->message ($target->name . " is too far away - you can't follow anymore!"); 59 $who->message ($target->name . " is too far away - you can't follow anymore!");
60 unfollow $target->name; 60 unfollow $who->name;
61 } elsif (@$queue) { 61 } elsif (@$queue) {
62 my ($map, $x, $y) = @{ $queue->[0] }; 62 my ($map, $x, $y) = @{ $queue->[0] };
63 63
64 $map->load; 64 $map->load;
65 65

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines