From 4ce1f9ee548b0a701bd7824d78fe5db1d66c78c4 Mon Sep 17 00:00:00 2001
From: timokoesters <timo@koesters.xyz>
Date: Sat, 11 May 2019 21:37:23 +0200
Subject: [PATCH] Temporary fix for falling into void

Former-commit-id: 8e3d9c0c34e897f13cc60d5968f390ed0107dd76
---
 common/src/sys/phys.rs | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/common/src/sys/phys.rs b/common/src/sys/phys.rs
index 0de3578576..191cf7e4ff 100644
--- a/common/src/sys/phys.rs
+++ b/common/src/sys/phys.rs
@@ -28,6 +28,12 @@ impl<'a> System<'a> for Sys {
             // Movement
             pos.0 += vel.0 * dt.0;
 
+            // Don't fall into the void
+            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