mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 01:55:19 -04:00
style fixes
This commit is contained in:
parent
acf6f7bd18
commit
8593eeb74d
@ -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;
|
||||
}
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user