mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
comments addressed
This commit is contained in:
parent
d27c73ddb1
commit
1b8265803e
@ -62,9 +62,9 @@ impl EventMapper for BlockEventMapper {
|
||||
});
|
||||
|
||||
// For determining if crickets should chirp
|
||||
let temp = match client.current_chunk() {
|
||||
Some(chunk) => chunk.meta().temp(),
|
||||
None => 0.0,
|
||||
let (terrain_alt, temp) = match client.current_chunk() {
|
||||
Some(chunk) => (chunk.meta().alt(), chunk.meta().temp()),
|
||||
None => (0.0, 0.0),
|
||||
};
|
||||
|
||||
struct BlockSounds<'a> {
|
||||
@ -174,6 +174,7 @@ impl EventMapper for BlockEventMapper {
|
||||
// If the timing condition is false, continue
|
||||
// TODO Address bird hack properly. See TODO below
|
||||
if !(sounds.cond)(state)
|
||||
|| (!(sounds.sfx == SfxEvent::Lavapool) && player_pos.0.z < (terrain_alt - 30.0))
|
||||
|| (sounds.sfx == SfxEvent::Birdcall && thread_rng().gen_bool(0.995))
|
||||
|| (sounds.sfx == SfxEvent::Owl && thread_rng().gen_bool(0.998))
|
||||
|| (sounds.sfx == SfxEvent::Frog && thread_rng().gen_bool(0.95))
|
||||
|
@ -126,14 +126,17 @@ impl BlocksOfInterest {
|
||||
BlockKind::Water if river_speed_sq > 0.3_f32.powi(2) => slow_river.push(pos),
|
||||
BlockKind::Snow if rng.gen_range(0..16) == 0 => snow.push(pos),
|
||||
BlockKind::Lava
|
||||
if rng.gen_range(0..5) == 0
|
||||
&& chunk
|
||||
.get(pos + Vec3::unit_z())
|
||||
.map_or(true, |b| !b.is_filled()) =>
|
||||
if chunk
|
||||
.get(pos + Vec3::unit_z())
|
||||
.map_or(true, |b| !b.is_filled()) =>
|
||||
{
|
||||
fires.push(pos + Vec3::unit_z())
|
||||
if rng.gen_range(0..5) == 0 {
|
||||
fires.push(pos + Vec3::unit_z())
|
||||
}
|
||||
if rng.gen_range(0..16) == 0 {
|
||||
lavapool.push(pos)
|
||||
}
|
||||
},
|
||||
BlockKind::Lava if rng.gen_range(0..8) == 0 => lavapool.push(pos),
|
||||
BlockKind::Snow | BlockKind::Ice if rng.gen_range(0..16) == 0 => snow.push(pos),
|
||||
_ => match block.get_sprite() {
|
||||
Some(SpriteKind::Ember) => {
|
||||
|
Loading…
Reference in New Issue
Block a user