Skip to content

Commit

Permalink
- backport cl_oldfreelooklimit from Skulltag - due to the advent of c…
Browse files Browse the repository at this point in the history
…apped skies, there really was no reason to keep the upper limit so low.
  • Loading branch information
madame-rachelle committed Mar 19, 2017
1 parent 0f93a5f commit e4814f2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/swrenderer/r_swrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ void gl_SetActorLights(AActor *);
void gl_PreprocessLevel();
void gl_CleanLevelData();

// [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

Expand Down Expand Up @@ -227,7 +235,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()
Expand Down

0 comments on commit e4814f2

Please sign in to comment.