style fixes

This commit is contained in:
UnknownShadow200 2020-04-15 23:22:23 +10:00
parent acf6f7bd18
commit 8593eeb74d
2 changed files with 5 additions and 6 deletions

View File

@ -63,14 +63,13 @@ static Vec2 PerspectiveCamera_GetMouseDelta(double delta) {
newSpeedX = accelX * (float)delta + speedX;
newSpeedY = accelY * (float)delta + speedY;
// High acceleration means velocity overshoots the correct position on low FPS,
// causing wiggling. If newSpeed has opposite sign of speed, set speed to 0;
/* High acceleration means velocity overshoots the correct position on low FPS, */
/* causing wiggling. If newSpeed has opposite sign of speed, set speed to 0 */
if (newSpeedX * speedX < 0) speedX = 0;
else speedX = newSpeedX;
if (newSpeedY * speedY < 0) speedY = 0;
else speedY = newSpeedY;
}
else {
} else {
speedX = (float)cam_deltaX;
speedY = (float)cam_deltaY;
}

View File

@ -18,8 +18,6 @@ extern struct _CameraData {
cc_bool Clipping;
/* Whether to invert vertical mouse movement. */
cc_bool Invert;
/* The mass (i.e. smoothness) of the smooth camera. */
float Mass;
/* Tilt effect applied to the camera. */
struct Matrix TiltM;
@ -30,6 +28,8 @@ extern struct _CameraData {
Vec3 CurrentPos;
/* Camera user is currently using. */
struct Camera* Active;
/* The mass (i.e. smoothness) of the smooth camera. */
float Mass;
} Camera;
struct Camera {