|
@@ -209,69 +209,6 @@ function gamepadPitch(%val)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-function toggleZoomFOV()
|
|
|
|
-{
|
|
|
|
- $Player::CurrentFOV = $Player::CurrentFOV / 2;
|
|
|
|
-
|
|
|
|
- if($Player::CurrentFOV < 5)
|
|
|
|
- resetCurrentFOV();
|
|
|
|
-
|
|
|
|
- if(ServerConnection.zoomed)
|
|
|
|
- setFOV($Player::CurrentFOV);
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- setFov(ServerConnection.getControlCameraDefaultFov());
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-function resetCurrentFOV()
|
|
|
|
-{
|
|
|
|
- $Player::CurrentFOV = ServerConnection.getControlCameraDefaultFov() / 2;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-function turnOffZoom()
|
|
|
|
-{
|
|
|
|
- ServerConnection.zoomed = false;
|
|
|
|
- setFov(ServerConnection.getControlCameraDefaultFov());
|
|
|
|
- Reticle.setVisible(true);
|
|
|
|
- zoomReticle.setVisible(false);
|
|
|
|
-
|
|
|
|
- // Rather than just disable the DOF effect, we want to set it to the level's
|
|
|
|
- // preset values.
|
|
|
|
- //DOFPostEffect.disable();
|
|
|
|
- ppOptionsUpdateDOFSettings();
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-function setZoomFOV(%val)
|
|
|
|
-{
|
|
|
|
- if(%val)
|
|
|
|
- toggleZoomFOV();
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-function toggleZoom(%val)
|
|
|
|
-{
|
|
|
|
- if (%val)
|
|
|
|
- {
|
|
|
|
- ServerConnection.zoomed = true;
|
|
|
|
- setFov($Player::CurrentFOV);
|
|
|
|
- Reticle.setVisible(false);
|
|
|
|
- zoomReticle.setVisible(true);
|
|
|
|
-
|
|
|
|
- DOFPostEffect.setAutoFocus( true );
|
|
|
|
- DOFPostEffect.setFocusParams( 0.5, 0.5, 50, 500, -5, 5 );
|
|
|
|
- DOFPostEffect.enable();
|
|
|
|
- }
|
|
|
|
- else
|
|
|
|
- {
|
|
|
|
- turnOffZoom();
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-function mouseButtonZoom(%val)
|
|
|
|
-{
|
|
|
|
- toggleZoom(%val);
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
function startRecordingDemo( %val )
|
|
function startRecordingDemo( %val )
|
|
{
|
|
{
|
|
if ( %val )
|
|
if ( %val )
|