Add Render Distance option. (#675)
* FOV option without debug menu Now located in Graphics section. Based on the FOV thing from discord idk * language * render distance option for graphics menu * oop * swf files on media * revert changes on language selector * nvm it was actually easy to fix * forgot this * Final probably Fixed visual bug and made the chunk updates depend to your view distance.
This commit is contained in:
@@ -74,7 +74,7 @@ ResourceLocation GameRenderer::SNOW_LOCATION = ResourceLocation(TN_ENVIRONMENT_S
|
||||
GameRenderer::GameRenderer(Minecraft *mc)
|
||||
{
|
||||
// 4J - added this block of initialisers
|
||||
renderDistance = 0;
|
||||
renderDistance = (float)(16 * 16 >> mc->options->viewDistance);
|
||||
_tick = 0;
|
||||
hovered = nullptr;
|
||||
thirdDistance = 4;
|
||||
@@ -614,7 +614,15 @@ void GameRenderer::getFovAndAspect(float& fov, float& aspect, float a, bool appl
|
||||
|
||||
void GameRenderer::setupCamera(float a, int eye)
|
||||
{
|
||||
renderDistance = (float)(16 * 16 >> (mc->options->viewDistance));
|
||||
if (mc->options->viewDistance >= 0)
|
||||
{
|
||||
renderDistance = (float)(16 * 16 >> mc->options->viewDistance);
|
||||
}
|
||||
else
|
||||
{
|
||||
renderDistance = (float)((16 * 16) << (-mc->options->viewDistance));
|
||||
}
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user