Style: reduce hardcoding

This commit is contained in:
UnknownShadow200 2016-10-17 09:47:55 +11:00
parent 1342b92d8b
commit fcc443fbcf
2 changed files with 1 additions and 6 deletions

View file

@ -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();
}

View file

@ -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;