@@ -119,8 +119,6 @@ const float NEB_FOG_FAR_PCT = 0.1f;
119119
120120SCP_vector<poof> Neb2_poofs;
121121
122- int Neb2_detail = 2 ;
123-
124122int Neb2_background_color[3 ] = {0 , 0 , 255 }; // rgb background color (used for lame rendering)
125123
126124const SCP_vector<std::pair<int , SCP_string>> DetailLevelValues = {{ 0 , " Minimum" },
@@ -132,12 +130,8 @@ const SCP_vector<std::pair<int, SCP_string>> DetailLevelValues = {{ 0, "Minimum"
132130const auto ModelDetailOption = options::OptionBuilder<int >(" Graphics.NebulaDetail" ,
133131 " Nebula Detail" ,
134132 " Detail level of nebulas" ).category(" Graphics" ).values(
135- DetailLevelValues).default_val(MAX_DETAIL_LEVEL).importance(7 ).change_listener([](int val, bool initial ) {
133+ DetailLevelValues).default_val(MAX_DETAIL_LEVEL).importance(7 ).change_listener([](int val, bool ) {
136134 Detail.nebula_detail = val;
137- if (!initial) {
138- // This is only needed for changes after the game startup
139- neb2_set_detail_level (Detail.nebula_detail );
140- }
141135 return true ;
142136}).finish();
143137
@@ -261,22 +255,6 @@ bool poof_is_used(size_t idx) {
261255 return (Neb2_poof_flags & (1 << idx)) != 0 ;
262256}
263257
264- // set detail level
265- void neb2_set_detail_level (int level)
266- {
267- // sanity
268- if (level < 0 ) {
269- Neb2_detail = 0 ;
270- return ;
271- }
272- if (level > MAX_DETAIL_LEVEL) {
273- Neb2_detail = MAX_DETAIL_LEVEL;
274- return ;
275- }
276-
277- Neb2_detail = level;
278- }
279-
280258void neb2_get_fog_color (ubyte *r, ubyte *g, ubyte *b)
281259{
282260 if (r) *r = Neb2_fog_color[0 ];
@@ -313,7 +291,7 @@ void neb2_poof_setup() {
313291 }
314292 }
315293 Poof_density_multiplier = Poof_density_sum_square / (Poof_density_sum * Poof_density_sum);
316- Poof_density_multiplier *= (Neb2_detail + 0 .5f ) / (MAX_DETAIL_LEVEL + 0 .5f ); // scale the poofs down based on detail level
294+ Poof_density_multiplier *= (Detail. nebula_detail + 0 .5f ) / (MAX_DETAIL_LEVEL + 0 .5f ); // scale the poofs down based on detail level
317295}
318296
319297// initialize nebula stuff - call from game_post_level_init(), so the mission has been loaded
0 commit comments