fix snowing for cloud

liquid_container
Maikel de Vries 2016-04-03 19:11:00 +02:00
parent 267bb1c3f1
commit 202f2c49df
1 changed files with 3 additions and 0 deletions

View File

@ -111,6 +111,9 @@ public func SetPrecipitation(string mat, int amount)
rain = BoundBy(amount * rain_max / 100, 0, 960);
// Store snow/water conversion
rain_mat_freeze_temp = GetMaterialVal("BelowTempConvert", "Material", Material(rain_mat));
// Hack: material val does not return nil for materials that do not freeze, so fix those explicitly.
if (mat == "Snow" || mat == "Ice")
rain_mat_freeze_temp = nil;
rain_mat_frozen = GetMaterialVal("BelowTempConvertTo", "Material", Material(rain_mat));
if (rain_mat_frozen == "Ice") rain_mat_frozen = "Snow";
}