- Fixed: since the hardware renderer doesn't initialize some variables used by the software renderer, using the r_visibility console command while in OpenGL mode could cause a division by zero.

git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@1429 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
gez 2012-07-28 18:04:42 +00:00
parent a4b4d927b8
commit 10649f1eb7

View file

@ -263,7 +263,7 @@ void R_SetVisibility (float vis)
CurrentVisibility = vis;
if (FocalTangent == 0)
if (FocalTangent == 0 || FocalLengthY == 0)
{ // If r_visibility is called before the renderer is all set up, don't
// divide by zero. This will be called again later, and the proper
// values can be initialized then.