Page 1 of 1

[r????-r1360] r_visibility : crash on change

Posted: Fri Apr 20, 2012 0:01
by jpalomo
The r_visibility CVar seems to have broken in GZDoom. I can enter 'r_visibility' (with no arguments) just fine, but as soon as I change it to anything, the game crashes. Even if I change it to the value that it currently is. It works just fine in software mode. Attached a crash log.

Re: [r????-r1360] r_visibility : crash on change

Posted: Fri Apr 20, 2012 0:48
by Gez
r_visibility is actually a console command, as odd as it seems. Just one that imitates a cvar.

I think the crash happens because it uses values not set by the hardware renderer:

Code: Select all

	r_FloorVisibility = Scale (160*FRACUNIT, r_FloorVisibility, FocalLengthY);
r_FloorVisibility and FocalLengthY are both 0 here; so you get a division by zero.

Re: [r????-r1360] r_visibility : crash on change

Posted: Sat Jul 28, 2012 19:06
by Gez
Forgot about that. Fixed in r1429. Not that there's any reason to use this console command in OpenGL mode anyway since the changed values are all entirely ignored by the hardware renderer; but that is not a reason to make it crash.