Fix typo in nyan cat generation
authorPerttu Ahola <celeron55@gmail.com>
Sun, 20 May 2012 15:32:58 +0000 (18:32 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Sun, 20 May 2012 15:32:58 +0000 (18:32 +0300)
mods/default/mapgen.lua

index 7bea2717e9caaaa38d6b7142dfb0209e390df209..35fc0654937415f41a48426c5adac406ed3f44a1 100644 (file)
@@ -118,7 +118,7 @@ function generate_nyancats(seed, minp, maxp)
        local pr = PseudoRandom(seed + 9324342)
        local max_num_nyancats = math.floor(volume / (16*16*16))
        for i=1,max_num_nyancats do
-               if pr.next(0, 1000) == 0 then
+               if pr:next(0, 1000) == 0 then
                        local x0 = pr:next(minp.x, maxp.x)
                        local y0 = pr:next(minp.y, maxp.y)
                        local z0 = pr:next(minp.z, maxp.z)