@@ -44,7 +44,7 @@ public SettingsMenu() {
44
44
AO . topCentre ( ) ;
45
45
AO . clicked += ( ) => {
46
46
settings . AO = AO . getIndex ( ) == 1 ;
47
- remeshIfRequired ( ) ;
47
+ remeshIfRequired ( settings . renderDistance ) ;
48
48
} ;
49
49
AO . tooltip = "Ambient Occlusion makes block corners darker to simulate shadows." ;
50
50
settingElements . Add ( AO ) ;
@@ -55,7 +55,7 @@ public SettingsMenu() {
55
55
smoothLighting . topCentre ( ) ;
56
56
smoothLighting . clicked += ( ) => {
57
57
settings . smoothLighting = smoothLighting . getIndex ( ) == 1 ;
58
- remeshIfRequired ( ) ;
58
+ remeshIfRequired ( settings . renderDistance ) ;
59
59
} ;
60
60
smoothLighting . tooltip = "Smooth Lighting improves the game's look by smoothing the lighting between blocks." ;
61
61
settingElements . Add ( smoothLighting ) ;
@@ -92,7 +92,7 @@ public SettingsMenu() {
92
92
renderDistance . tooltip = "The maximum distance at which blocks are rendered.\n Higher values may reduce performance." ;
93
93
renderDistance . applied += ( ) => {
94
94
settings . renderDistance = ( int ) renderDistance . value ;
95
- remeshIfRequired ( ) ;
95
+ remeshIfRequired ( ( int ) renderDistance . value ) ;
96
96
} ;
97
97
renderDistance . getText = value => "Render Distance: " + value ;
98
98
settingElements . Add ( renderDistance ) ;
@@ -127,9 +127,9 @@ public SettingsMenu() {
127
127
layoutSettingsTwoCols ( settingElements , new Vector2D < int > ( 0 , 16 ) , vsync . GUIbounds . Width ) ;
128
128
}
129
129
130
- private void remeshIfRequired ( ) {
130
+ private void remeshIfRequired ( int oldRenderDist ) {
131
131
if ( Game . instance . currentScreen == Screen . GAME_SCREEN ) {
132
- Screen . GAME_SCREEN . remeshWorld ( ) ;
132
+ Screen . GAME_SCREEN . remeshWorld ( oldRenderDist ) ;
133
133
}
134
134
}
135
135
0 commit comments