mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 10:35:11 -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;
|
newSpeedX = accelX * (float)delta + speedX;
|
||||||
newSpeedY = accelY * (float)delta + speedY;
|
newSpeedY = accelY * (float)delta + speedY;
|
||||||
|
|
||||||
// High acceleration means velocity overshoots the correct position on low FPS,
|
/* High acceleration means velocity overshoots the correct position on low FPS, */
|
||||||
// causing wiggling. If newSpeed has opposite sign of speed, set speed to 0;
|
/* causing wiggling. If newSpeed has opposite sign of speed, set speed to 0 */
|
||||||
if (newSpeedX * speedX < 0) speedX = 0;
|
if (newSpeedX * speedX < 0) speedX = 0;
|
||||||
else speedX = newSpeedX;
|
else speedX = newSpeedX;
|
||||||
if (newSpeedY * speedY < 0) speedY = 0;
|
if (newSpeedY * speedY < 0) speedY = 0;
|
||||||
else speedY = newSpeedY;
|
else speedY = newSpeedY;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
speedX = (float)cam_deltaX;
|
speedX = (float)cam_deltaX;
|
||||||
speedY = (float)cam_deltaY;
|
speedY = (float)cam_deltaY;
|
||||||
}
|
}
|
||||||
|
@ -18,8 +18,6 @@ extern struct _CameraData {
|
|||||||
cc_bool Clipping;
|
cc_bool Clipping;
|
||||||
/* Whether to invert vertical mouse movement. */
|
/* Whether to invert vertical mouse movement. */
|
||||||
cc_bool Invert;
|
cc_bool Invert;
|
||||||
/* The mass (i.e. smoothness) of the smooth camera. */
|
|
||||||
float Mass;
|
|
||||||
|
|
||||||
/* Tilt effect applied to the camera. */
|
/* Tilt effect applied to the camera. */
|
||||||
struct Matrix TiltM;
|
struct Matrix TiltM;
|
||||||
@ -30,6 +28,8 @@ extern struct _CameraData {
|
|||||||
Vec3 CurrentPos;
|
Vec3 CurrentPos;
|
||||||
/* Camera user is currently using. */
|
/* Camera user is currently using. */
|
||||||
struct Camera* Active;
|
struct Camera* Active;
|
||||||
|
/* The mass (i.e. smoothness) of the smooth camera. */
|
||||||
|
float Mass;
|
||||||
} Camera;
|
} Camera;
|
||||||
|
|
||||||
struct Camera {
|
struct Camera {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user