From dbf425f1aa767de7f6415b45d1321d8dd6c05e97 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Tue, 25 Sep 2007 21:53:14 +0000 Subject: updated ctf a bit --- src/game/game.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/game/game.cpp') 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; } } -- cgit 1.4.1