ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/maps/perl/map-grid-move-torus.ext
(Generate patch)

Comparing deliantra/maps/perl/map-grid-move-torus.ext (file contents):
Revision 1.1 by root, Fri Feb 10 07:37:13 2006 UTC vs.
Revision 1.2 by root, Fri Mar 31 22:47:19 2006 UTC

11 $_->contr->MapNewmapCmd 11 $_->contr->MapNewmapCmd
12 for grep $_->isa (cf::object::player::), @$as; 12 for grep $_->isa (cf::object::player::), @$as;
13} 13}
14 14
15sub on_move { 15sub on_move {
16 my ($data) = @_; 16 my ($event, $who) = @_;
17
18 my $who = $data->{who};
19 17
20 # on first call (there is no initialiser callback), initialise 18 # on first call (there is no initialiser callback), initialise
21 my $self = $who->{map_grid_move} ||= { 19 my $self = $who->{map_grid_move} ||= {
22 x1 => $who->x, 20 x1 => $who->x,
23 y1 => $who->y, 21 y1 => $who->y,
24 split /(?:\s+|=)/, $data->{options}, 22 split /(?:\s+|=)/, $event->options,
25 }; 23 };
26 24
27 my ($x1, $y1) = ($self->{x1}, $self->{y1}); 25 my ($x1, $y1) = ($self->{x1}, $self->{y1});
28 26
29 # this is horribly ugly code.. why can't there be a simple function to just move objects, 27 # this is horribly ugly code.. why can't there be a simple function to just move objects,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines