OSDN Git Service

Streamers of dungeon become zigzag lines.
authordeskull <deskull@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 2 Feb 2013 08:16:04 +0000 (08:16 +0000)
committerdeskull <deskull@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 2 Feb 2013 08:16:04 +0000 (08:16 +0000)
src/streams.c

index 506ad39..1537201 100644 (file)
@@ -223,7 +223,7 @@ void build_streamer(int feat, int chance)
        x = rand_spread(cur_wid / 2, cur_wid / 6);
 
        /* Choose a random compass direction */
-       dir = ddd[randint0(8)];
+       dir = randint0(8);
 
        /* Place streamer into dungeon */
        while (dummy < SAFE_MAX_ATTEMPTS)
@@ -350,8 +350,14 @@ msg_print("
 
 
                /* Advance the streamer */
-               y += ddy[dir];
-               x += ddx[dir];
+               y += ddy[cdd[dir]];
+               x += ddx[cdd[dir]];
+
+               if(one_in_(10))
+               {
+                       if(one_in_(2)) dir = (dir + 1) % 8;
+                       else dir = (dir > 0) ? dir - 1 : 7; 
+               }
 
                /* Quit before leaving the dungeon */
                if (!in_bounds(y, x)) break;