From 4784aae098a7d1230216a5b017cc2abe1f5978b9 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sun, 19 Mar 2017 00:31:30 -0400 Subject: [PATCH] - backport cl_oldfreelooklimit from Skulltag - due to the advent of capped skies, there really was no reason to keep the upper limit so low. --- src/swrenderer/r_swrenderer.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/swrenderer/r_swrenderer.cpp b/src/swrenderer/r_swrenderer.cpp index 93ac87f7dd..f8908178ba 100644 --- a/src/swrenderer/r_swrenderer.cpp +++ b/src/swrenderer/r_swrenderer.cpp @@ -51,6 +51,14 @@ #include "p_setup.h" #include "g_levellocals.h" +// [BB] Use ZDoom's freelook limit for the sotfware renderer. +// Note: ZDoom's limit is chosen such that the sky is rendered properly. +CUSTOM_CVAR (Bool, cl_oldfreelooklimit, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL) +{ + if (usergame) // [SP] Update pitch limits to the netgame/gamesim. + players[consoleplayer].SendPitchLimits(); +} + EXTERN_CVAR(Bool, r_shadercolormaps) EXTERN_CVAR(Float, maxviewpitch) // [SP] CVAR from GZDoom @@ -248,7 +256,7 @@ int FSoftwareRenderer::GetMaxViewPitch(bool down) { const int MAX_DN_ANGLE = 56; // Max looking down angle const int MAX_UP_ANGLE = 32; // Max looking up angle - return (r_polyrenderer) ? int(maxviewpitch) : (down ? MAX_DN_ANGLE : MAX_UP_ANGLE); + return (r_polyrenderer) ? int(maxviewpitch) : (down ? MAX_DN_ANGLE : ((cl_oldfreelooklimit) ? MAX_UP_ANGLE : MAX_DN_ANGLE)); } bool FSoftwareRenderer::RequireGLNodes()