Merge branch 'juliancoffee/deterministic_dungeons' into 'master'

Don't chose room kinds with dynamic_rng

See merge request veloren/veloren!2750
This commit is contained in:
Marcel 2021-08-09 23:33:13 +00:00
commit cde1283e04

View File

@ -498,7 +498,8 @@ impl Floor {
ctx.rng.gen_range(0..floor_sz + 1 - room_sz)
});
let area = Rect::from((pos, Extent2::from(sz)));
let area_border = Rect::from((pos - 1, Extent2::from(sz) + 2)); // The room, but with some personal space
// The room, but with some personal space
let area_border = Rect::from((pos - 1, Extent2::from(sz) + 2));
// Ensure no overlap
if self
@ -514,9 +515,8 @@ impl Floor {
Some(area) => area,
None => return,
};
let mut dynamic_rng = rand::thread_rng();
match dynamic_rng.gen_range(0..5) {
match ctx.rng.gen_range(0..5) {
// Miniboss room
0 => self.create_room(Room {
seed: ctx.rng.gen(),