Improved blizzard and thunderstorm weather skies

This commit is contained in:
JappaWakka 2022-08-16 19:02:02 +02:00
parent 73d079b26a
commit 3c78459f7c
1 changed files with 10 additions and 1 deletions

View File

@ -50,7 +50,14 @@
Public Sub Draw(ByVal FOV As Single) Public Sub Draw(ByVal FOV As Single)
If Screen.Level.World.EnvironmentType = World.EnvironmentTypes.Outside Then If Screen.Level.World.EnvironmentType = World.EnvironmentTypes.Outside Then
If World.GetWeatherFromWeatherType(Screen.Level.WeatherType) <> World.Weathers.Fog Then ' Don't render the sky if the weather is set to Fog. Dim DrawSky As Boolean
Select Case World.GetWeatherFromWeatherType(Screen.Level.WeatherType)
Case World.Weathers.Fog, World.Weathers.Blizzard, World.Weathers.Thunderstorm
DrawSky = False
Case Else
DrawSky = True
End Select
If DrawSky = True Then ' Don't render the sky if the weather is set to Fog.
RenderHalf(FOV, Yaw, 0.0F, True, GetSkyTexture(), 20, 1.0F) ' Draw the sky RenderHalf(FOV, Yaw, 0.0F, True, GetSkyTexture(), 20, 1.0F) ' Draw the sky
RenderHalf(FOV, MathHelper.TwoPi, 0.0F, True, TextureDown, 18, GetStarsAlpha()) ' Draw the stars. RenderHalf(FOV, MathHelper.TwoPi, 0.0F, True, TextureDown, 18, GetStarsAlpha()) ' Draw the stars.
If GetSunAlpha() > 0 Then If GetSunAlpha() > 0 Then
@ -58,6 +65,8 @@
Else Else
RenderHalf(FOV, MathHelper.TwoPi, 0.0F, True, TextureMoon, 16, 1.0F) ' Draw the Moon. RenderHalf(FOV, MathHelper.TwoPi, 0.0F, True, TextureMoon, 16, 1.0F) ' Draw the Moon.
End If End If
End If
If World.GetWeatherFromWeatherType(Screen.Level.WeatherType) <> World.Weathers.Fog Then
RenderHalf(FOV, MathHelper.TwoPi - Yaw * 2, 0.0F, True, GetCloudsTexture(), 12, GetCloudAlpha) ' Draw the clouds. RenderHalf(FOV, MathHelper.TwoPi - Yaw * 2, 0.0F, True, GetCloudsTexture(), 12, GetCloudAlpha) ' Draw the clouds.
End If End If
Else Else