Merge branch 'fix-fall-void' into 'master'

Temporary fix for falling into the void

See merge request veloren/veloren!122

Former-commit-id: ba8dc7b88bb06a0e9633475a40dbd58af53ecd69
This commit is contained in:
Imbris 2019-05-11 20:04:19 +00:00
commit 95a0c27d7d

View File

@ -28,6 +28,13 @@ impl<'a> System<'a> for Sys {
// Movement
pos.0 += vel.0 * dt.0;
// Don't fall into the void
// TODO: This shouldn't be needed when we have proper physics and chunk loading
if pos.0.z < 0.0 {
pos.0.z = 0.0;
vel.0.z = 0.0;
}
// Basic collision with terrain
let mut i = 0;
while terrain