projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2868676
)
Improve random map seed generation
author
kwolekr
<mirrorisim@gmail.com>
Wed, 23 Jan 2013 15:13:04 +0000
(10:13 -0500)
committer
kwolekr
<mirrorisim@gmail.com>
Wed, 6 Feb 2013 06:10:37 +0000
(
01:10
-0500)
src/map.cpp
patch
|
blob
|
history
diff --git
a/src/map.cpp
b/src/map.cpp
index ea82194b85ccca4211797f6de18d51d08d256674..ab9cb25dd20b97b37cb76db7379c42ecd0f1e408 100644
(file)
--- a/
src/map.cpp
+++ b/
src/map.cpp
@@
-2013,10
+2013,10
@@
ServerMap::ServerMap(std::string savedir, IGameDef *gamedef, EmergeManager *emer
if (g_settings->get("fixed_map_seed").empty())
{
- m_seed = (((u64)(myrand()
%0xffff)<<
0)
-
+ ((u64)(myrand()%0xffff)<<
16)
-
+ ((u64)(myrand()%0xffff)<<
32)
-
+ ((u64)(myrand()&0xffff)<<
48));
+ m_seed = (((u64)(myrand()
& 0xffff) <<
0)
+
| ((u64)(myrand() & 0xffff) <<
16)
+
| ((u64)(myrand() & 0xffff) <<
32)
+
| ((u64)(myrand() & 0xffff) <<
48));
m_mgparams->seed = m_seed;
}