about summary refs log tree commit diff
path: root/src/game/game.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/game.cpp')
-rw-r--r--src/game/game.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp
index d5b74a92..c8c6acb3 100644
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -79,13 +79,13 @@ void move_box(vec2 *inout_pos, vec2 *inout_vel, vec2 size, float elasticity)
 				if(test_box(vec2(pos.x, new_pos.y), size))
 				{
 					new_pos.y = pos.y;
-					vel.y = 0;
+					vel.y *= -elasticity;
 				}
 				
 				if(test_box(vec2(new_pos.x, pos.y), size))
 				{
 					new_pos.x = pos.x;
-					vel.x = 0;
+					vel.x *= -elasticity;
 				}
 			}