Merge branch 'qutrin/lantern-limit' into 'master'

Add a lantern strength limit to prevent shader overflows

Closes #219

See merge request veloren/veloren!421
This commit is contained in:
Forest Anderson 2019-08-08 15:07:58 +00:00
commit d6a2129c84

View File

@ -658,7 +658,11 @@ fn handle_lantern(server: &mut Server, entity: EcsEntity, args: String, action:
comp::LightEmitter {
offset: Vec3::new(0.5, 0.2, 0.8),
col: Rgb::new(1.0, 0.75, 0.3),
strength: if let Some(s) = opt_s { s.max(0.0) } else { 6.0 },
strength: if let Some(s) = opt_s {
s.max(0.0).min(20.0)
} else {
6.0
},
},
);