mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-23 17:43:08 -05:00
Style: reduce hardcoding
This commit is contained in:
parent
1342b92d8b
commit
fcc443fbcf
2 changed files with 1 additions and 6 deletions
|
@ -264,17 +264,12 @@ namespace ClassicalSharp {
|
|||
|
||||
public void CycleCamera() {
|
||||
if( ClassicMode ) return;
|
||||
PerspectiveCamera oldCam = (PerspectiveCamera)Camera;
|
||||
|
||||
int i = Cameras.IndexOf( Camera );
|
||||
i = (i + 1) % Cameras.Count;
|
||||
Camera = Cameras[i];
|
||||
if( !LocalPlayer.Hacks.CanUseThirdPersonCamera || !LocalPlayer.Hacks.Enabled )
|
||||
Camera = Cameras[0];
|
||||
|
||||
PerspectiveCamera newCam = (PerspectiveCamera)Camera;
|
||||
newCam.delta = oldCam.delta;
|
||||
newCam.previous = oldCam.previous;
|
||||
UpdateProjection();
|
||||
}
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace ClassicalSharp {
|
|||
Picking.CalculatePickedBlock( game, eyePos, dir, reach, pos );
|
||||
}
|
||||
|
||||
internal Point previous, delta;
|
||||
protected static Point previous, delta;
|
||||
void CentreMousePosition() {
|
||||
if( !game.Focused ) return;
|
||||
Point current = game.DesktopCursorPos;
|
||||
|
|
Loading…
Add table
Reference in a new issue