--- deliantra/server/ext/map-grid-move-random.ext 2007/09/30 16:24:29 1.2 +++ deliantra/server/ext/map-grid-move-random.ext 2010/04/22 12:50:24 1.3 @@ -18,7 +18,7 @@ for (1 .. $num) { my $ob = $ob->clone (0); - $who->map->insert ($ob, $x1 + rand $opt{width}, $y1 + rand $opt{height}); + $who->map->insert ($ob, $x1 + cf::rndm $opt{width}, $y1 + cf::rndm $opt{height}); push @{ $opt{ob} }, $ob; } @@ -32,10 +32,10 @@ for my $ob (@{$self->{ob}}) { my ($x, $y) = ($ob->x, $ob->y); - if (0.5 <= rand) { - $x += 1 - int rand 3; + if (0.5 <= cf::rndm) { + $x += 1 - cf::rndm 3; } else { - $y += 1 - int rand 3; + $y += 1 - cf::rndm 3; } $x = List::Util::max $x1, List::Util::min $x2, $x;