projects
/
oweals
/
minetest.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae929ce
)
Dungeongen: Fix selection of diagonal corridors
author
paramat
<mat.gregory@virginmedia.com>
Thu, 26 Jan 2017 15:38:18 +0000
(15:38 +0000)
committer
paramat
<mat.gregory@virginmedia.com>
Thu, 26 Jan 2017 20:19:05 +0000
(20:19 +0000)
The do .. while loop is waiting for both dir.X and dir.Z to be non-zero,
so should continue to loop if either dir.X or dir.Z are zero. The brackets
present suggest this was intended to be OR not AND.
src/dungeongen.cpp
patch
|
blob
|
history
diff --git
a/src/dungeongen.cpp
b/src/dungeongen.cpp
index b8ee2b92471cca5496511cf91841b1b4b8cd47df..7825e9e2ce53013639bdc44400b9e36e0a2d738f 100644
(file)
--- a/
src/dungeongen.cpp
+++ b/
src/dungeongen.cpp
@@
-622,7
+622,7
@@
v3s16 rand_ortho_dir(PseudoRandom &random, bool diagonal_dirs)
dir.Z = random.next() % 3 - 1;
dir.Y = 0;
dir.X = random.next() % 3 - 1;
- } while ((dir.X == 0
&&
dir.Z == 0) && trycount < 10);
+ } while ((dir.X == 0
||
dir.Z == 0) && trycount < 10);
return dir;
} else {