about summary refs log tree commit diff
path: root/src/game/g_game.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_game.h')
-rw-r--r--src/game/g_game.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/g_game.h b/src/game/g_game.h
index 3cb6639b..6b13fb7b 100644
--- a/src/game/g_game.h
+++ b/src/game/g_game.h
@@ -53,11 +53,12 @@ inline float get_angle(vec2 dir)
 }
 
 
-inline vec2 calc_pos(vec2 p, vec2 v, float gravity, float t)
+inline vec2 calc_pos(vec2 p, vec2 v, float curvature, float speed, float t)
 {
 	vec2 n;
+	t *= speed;
 	n.x = p.x + v.x*t;
-	n.y = p.y + v.y*t - gravity*(t*t);
+	n.y = p.y + v.y*t + curvature/10000*(t*t);
 	return n;
 }
 
@@ -88,7 +89,7 @@ inline T saturated_add(T min, T max, T current, T modifier)
 void move_point(vec2 *inout_pos, vec2 *inout_vel, float elasticity, int *bounces);
 void move_box(vec2 *inout_pos, vec2 *inout_vel, vec2 size, float elasticity);
 bool test_box(vec2 pos, vec2 size);
-
+float velocity_ramp(float value, float start, float range, float curvature);
 
 // hooking stuff
 enum