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

Comparing deliantra/server/ext/map-per-player.ext (file contents):
Revision 1.3 by root, Sun Jan 14 01:09:46 2007 UTC vs.
Revision 1.10 by root, Thu Jun 7 19:12:22 2007 UTC

5sub init { 5sub init {
6 my ($self) = @_; 6 my ($self) = @_;
7 7
8 $self->{user} = $1; 8 $self->{user} = $1;
9 $self->{orig_path} = $2; 9 $self->{orig_path} = $2;
10 $self->{deny_reset} = 1; #d# for now 10}
11
12sub thawer_merge {
13 # we have to keep some variables in memory intact
14 local $_[0]{user};
15 local $_[0]{orig_path};
16
17 $_[0]->SUPER::thawer_merge ($_[1]);
11} 18}
12 19
13sub load_path { 20sub load_path {
14 my ($self) = @_; 21 my ($self) = @_;
15 22
16 sprintf "%s/%s/%s", cf::datadir, cf::mapdir, $self->{orig_path} 23 "$cf::MAPDIR/$self->{orig_path}.map"
17} 24}
18 25
19sub save_path { 26sub save_path {
20 my ($self) = @_; 27 my ($self) = @_;
21 28
22 (my $path = $_[0]{orig_path}) =~ s/\//$PATH_SEP/g; 29 (my $path = $_[0]{orig_path}) =~ s/\//$PATH_SEP/g;
23 sprintf "%s/%s/%s/%s", cf::localdir, cf::playerdir, $self->{user}, $path 30 "$cf::PLAYERDIR/$self->{user}/$path.map"
24} 31}
25 32
26sub uniq_path { 33sub uniq_path {
27 undef 34 undef
28} 35}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines