@@ -1354,8 +1354,8 @@ void UpdateMeshCoords(void){
13541354 float dz_scene = global_scase .zbar - global_scase .zbar0 ;
13551355 xyzmaxdiff = MAX (MAX (dx_scene ,dy_scene ),dz_scene );
13561356 // set fire_half depth to max of 1/40 domain size (rounded to 0.1 m) and 0.3
1357- fire_halfdepth = (float )((int )(10 .0* xyzmaxdiff /40.0 + 0.5 ))/10 .0 ;
1358- fire_halfdepth = MAX (fire_halfdepth , 0.3 );
1357+ fire_halfdepth = (float )((int )(100 .0* xyzmaxdiff /40.0 + 0.5 ))/100 .0 ;
1358+ fire_halfdepth = MAX (fire_halfdepth , 0.05 );
13591359 vector_scalelength = MIN (dx_scene , dz_scene );
13601360 if (global_scase .meshescoll .meshinfo [0 ].jbar > 1 ) {
13611361 vector_scalelength = MIN (vector_scalelength , dy_scene );
@@ -6122,12 +6122,11 @@ int ReadIni2(const char *inifile, int localfile){
61226122 global_scase .smoke_albedo = CLAMP (global_scase .smoke_albedo , 0.0 , 1.0 );
61236123 continue ;
61246124 }
6125- if (MatchINI (buffer , "SMOKEFIREPROP" ) == 1 ){
6126- int dummy ;
6127-
6125+ if (MatchINI (buffer , "FIREPROP" ) == 1 ){
61286126 if (fgets (buffer , 255 , stream ) == NULL )break ;
6129- sscanf (buffer , "%i %i " , & dummy , & use_soot_multiplier );
6127+ sscanf (buffer , "%i %f " , & use_soot_multiplier , & soot_multiplier );
61306128 use_soot_multiplier = CLAMP (use_soot_multiplier , 0 , 1 );
6129+ soot_multiplier = CLAMP (soot_multiplier , MIN_SOOT_MULTIPLIER , MAX_SOOT_MULTIPLIER );
61316130 update_use_soot_multiplier = 1 ;
61326131 continue ;
61336132 }
@@ -8342,14 +8341,16 @@ void WriteIni(int flag,char *filename){
83428341 mmin [0 ], mmin [1 ], mmin [2 ],
83438342 mmax [0 ], mmax [1 ], mmax [2 ]);
83448343 }
8344+ fprintf (fileout , "FDEPTH2\n" );
8345+ fprintf (fileout , " %f %f %f %i %i\n" , fire_halfdepth , co2_halfdepth , soot_multiplier , use_fire_alpha , force_alpha_opaque );
83458346 fprintf (fileout , "FIRECOLOR\n" );
83468347 fprintf (fileout , " %i %i %i\n" , fire_color_int255 [0 ], fire_color_int255 [1 ], fire_color_int255 [2 ]);
83478348 if (colorbars .fire_colorbar_index >= 0 && colorbars .fire_colorbar_index < colorbars .ncolorbars ){
83488349 fprintf (fileout , "FIRECOLORMAP\n" );
83498350 fprintf (fileout , " FIRE %i %s\n" , fire_colormap_type , colorbars .colorbarinfo [colorbars .fire_colorbar_index ].menu_label );
83508351 }
8351- fprintf (fileout , "FDEPTH2 \n" );
8352- fprintf (fileout , " %f %f %f % i %i \n" , fire_halfdepth , co2_halfdepth , soot_multiplier , use_fire_alpha , force_alpha_opaque );
8352+ fprintf (fileout , "FIREPROP \n" );
8353+ fprintf (fileout , " %i %f \n" , use_soot_multiplier , soot_multiplier );
83538354 if (colorbars .ncolorbars > colorbars .ndefaultcolorbars ){
83548355 colorbardata * cbi ;
83558356 unsigned char * rrgb ;
@@ -8385,11 +8386,6 @@ void WriteIni(int flag,char *filename){
83858386 fprintf (fileout , "SMOKEALBEDO\n" );
83868387 fprintf (fileout , " %f\n" , global_scase .smoke_albedo );
83878388 }
8388-
8389- if ((have_fire == NO_FIRE && have_smoke == NO_SMOKE )|| (have_fire != NO_FIRE && have_smoke != NO_SMOKE )){
8390- fprintf (fileout , "SMOKEFIREPROP\n" );
8391- fprintf (fileout , " %i %i\n" , 1 - use_soot_multiplier , use_soot_multiplier );
8392- }
83938389 fprintf (fileout , "SMOKEPROP\n" );
83948390 fprintf (fileout , " %f\n" , glui_mass_extinct );
83958391 glui_mass_extinct_default = glui_mass_extinct ;
0 commit comments