ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/lib/cf.pm
(Generate patch)

Comparing deliantra/server/lib/cf.pm (file contents):
Revision 1.178 by root, Thu Jan 18 00:06:55 2007 UTC vs.
Revision 1.182 by root, Fri Jan 19 15:38:01 2007 UTC

957 957
958sub exists($) { 958sub exists($) {
959 my ($login) = @_; 959 my ($login) = @_;
960 960
961 $cf::PLAYER{$login} 961 $cf::PLAYER{$login}
962 or cf::sync_job { !aio_stat $login } 962 or cf::sync_job { !aio_stat path $login }
963} 963}
964 964
965sub find($) { 965sub find($) {
966 return $cf::PLAYER{$_[0]} || do { 966 return $cf::PLAYER{$_[0]} || do {
967 my $login = $_[0]; 967 my $login = $_[0];
1812 1812
1813sub parse_random_map_params { 1813sub parse_random_map_params {
1814 my ($spec) = @_; 1814 my ($spec) = @_;
1815 1815
1816 my $rmp = { # defaults 1816 my $rmp = { # defaults
1817 xsize => -1, 1817 xsize => (cf::rndm 15, 40),
1818 ysize => -1, 1818 ysize => (cf::rndm 15, 40),
1819 symmetry => (cf::rndm 1, cf::SYMMETRY_XY),
1820 #layout => string,
1819 }; 1821 };
1820 1822
1821 for (split /\n/, $spec) { 1823 for (split /\n/, $spec) {
1822 my ($k, $v) = split /\s+/, $_, 2; 1824 my ($k, $v) = split /\s+/, $_, 2;
1823 1825
1827 $rmp 1829 $rmp
1828} 1830}
1829 1831
1830sub prepare_random_map { 1832sub prepare_random_map {
1831 my ($exit) = @_; 1833 my ($exit) = @_;
1834
1835 my $guard = cf::lock_acquire "exit_prepare:$exit";
1832 1836
1833 # all this does is basically replace the /! path by 1837 # all this does is basically replace the /! path by
1834 # a new random map path (?random/...) with a seed 1838 # a new random map path (?random/...) with a seed
1835 # that depends on the exit object 1839 # that depends on the exit object
1836 1840

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines