summary refs log tree commit diff
path: root/src/GameLoop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GameLoop.cpp')
-rw-r--r--src/GameLoop.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/GameLoop.cpp b/src/GameLoop.cpp
index 3364bc2..9aaff92 100644
--- a/src/GameLoop.cpp
+++ b/src/GameLoop.cpp
@@ -20,7 +20,7 @@
 // along with Black Shades.  If not, see <https://www.gnu.org/licenses/>.
 
 #include "Game.h"
-#include "Support.h"
+#include "misc.h"
 
 extern float multiplier;
 extern int thirdperson;
@@ -194,9 +194,9 @@ void handleKey(Game* game, int key, int action, int mods)
 					0, person.playerrotation, 0);
 				joint.velocity += person.velocity;
 				joint.velocity += facing * 50;
-				joint.velocity.x += abs(Random() % 20) - 10;
-				joint.velocity.y += abs(Random() % 20) - 10;
-				joint.velocity.z += abs(Random() % 20) - 10;
+				joint.velocity.x += randInt(-9, 9);
+				joint.velocity.y += randInt(-9, 9);
+				joint.velocity.z += randInt(-9, 9);
 			}
 		}
 	} else if (key == keymap.switch_weapon) {