mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Don't chose room kinds with dynamic_rng
This commit is contained in:
parent
2bc4f364bf
commit
771df2f0f1
@ -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(),
|
||||
|
Loading…
Reference in New Issue
Block a user