Modifing velocity clamping

This commit is contained in:
AnonymusRaccoon
2020-01-06 18:27:18 +01:00
parent e383fe3fb2
commit c534d3c190
+1 -1
View File
@@ -44,9 +44,9 @@ void *system __attribute__((unused)), gc_entity *entity, float dtime)
pos->position.y -= MIN(mov->velocity.y * -dtime, col->distance_down);
else
pos->position.y += MIN(mov->velocity.y * dtime, col->distance_top);
clamp_vel(mov, col);
mov->velocity.x += mov->acceleration.x * dtime;
mov->velocity.y += mov->acceleration.y * dtime;
clamp_vel(mov, col);
mov->acceleration.x = 0;
mov->acceleration.y = 0;
}