--- deliantra/server/random_maps/special.C 2010/04/14 18:53:37 1.49 +++ deliantra/server/random_maps/special.C 2010/06/26 22:10:18 1.50 @@ -223,7 +223,6 @@ if (!hole_type) hole_type = rmg_rndm (NR_OF_HOLE_TYPES) + 1; - char buf[16384]; const char *style, *decor, *mon; int g_xsize, g_ysize; @@ -270,19 +269,21 @@ max_it (g_xsize, MIN_RANDOM_MAP_SIZE); max_it (g_ysize, MIN_RANDOM_MAP_SIZE); + dynbuf_text buf; + { random_map_params &rp = *new random_map_params; // for zero_intiialised to work... + //TODO: deep copy + rp.hv = (HV *)SvREFCNT_inc_NN ((SV *)RP->hv); + rp.xsize = g_xsize; rp.ysize = g_ysize; - assign (rp.wallstyle , RP->wallstyle); - assign (rp.floorstyle , RP->floorstyle); assign (rp.monsterstyle , mon); assign (rp.treasurestyle, "none"); assign (rp.layoutstyle , style); assign (rp.decorstyle , decor); - assign (rp.exitstyle , RP->exitstyle); rp.layoutoptions1 = RMOPT_WALLS_ONLY; rp.symmetry = SYMMETRY_NONE; @@ -293,7 +294,7 @@ rp.difficulty_increase = RP->difficulty_increase; rp.decoroptions = -1; rp.orientation = 1; - rp.random_seed = RP->random_seed ^ 0xdeadbeef; + rp.random_seed = RP->random_seed + 0xdeadbeef; rp.region = RP->region; write_map_parameters_to_string (buf, &rp);