Improve random map seed generation

pull/479/head
kwolekr 2013-01-23 10:13:04 -05:00
parent 2868676693
commit a73905401a
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}