(svn r12004) -Codechange: refactor the random functions to reduce code duplication.

This commit is contained in:
rubidium
2008-01-29 00:27:25 +00:00
parent fde33b5547
commit 3b2145aafe
6 changed files with 61 additions and 40 deletions

View File

@@ -90,7 +90,7 @@ static void *_GenerateWorld(void *arg)
if (_network_dedicated) DEBUG(net, 0, "Generating map, please wait...");
/* Set the Random() seed to generation_seed so we produce the same map with the same seed */
if (_patches.generation_seed == GENERATE_NEW_SEED) _patches.generation_seed = _patches_newgame.generation_seed = InteractiveRandom();
_random_seeds[0][0] = _random_seeds[0][1] = _patches.generation_seed;
_random.SetSeed(_patches.generation_seed);
SetGeneratingWorldProgress(GWP_MAP_INIT, 2);
SetObjectToPlace(SPR_CURSOR_ZZZ, PAL_NONE, VHM_NONE, WC_MAIN_WINDOW, 0);