Fix crash related to AnimatedBlocks

This commit is contained in:
JappaWakka 2023-10-13 09:50:20 +02:00
parent 8a39146e3e
commit bc4e42d1f3

View File

@ -69,13 +69,14 @@
If BlockTexturesTemp.ContainsKey(AnimationNames(n) & "_0") = False Then If BlockTexturesTemp.ContainsKey(AnimationNames(n) & "_0") = False Then
For i = 0 To Me.rows(n) - 1 For i = 0 To Me.rows(n) - 1
For j = 0 To Me.columns(n) - 1 For j = 0 To Me.columns(n) - 1
If SeasonColorTexture <> "" Then If BlockTexturesTemp.ContainsKey(AnimationNames(n) & "_" & (j + columns(n) * i).ToString) = False Then
CurrentSeason = P3D.World.CurrentSeason If SeasonColorTexture <> "" Then
BlockTexturesTemp.Add(AnimationNames(n) & "_" & (j + columns(n) * i).ToString, P3D.World.GetSeasonTexture(TextureManager.GetTexture("Textures\Seasons\" & Me.SeasonColorTexture), TextureManager.GetTexture(AdditionalValue, New Rectangle(r.X + r.Width * j, r.Y + r.Height * i, r.Width, r.Height)))) CurrentSeason = P3D.World.CurrentSeason
Else BlockTexturesTemp.Add(AnimationNames(n) & "_" & (j + columns(n) * i).ToString, P3D.World.GetSeasonTexture(TextureManager.GetTexture("Textures\Seasons\" & Me.SeasonColorTexture), TextureManager.GetTexture(AdditionalValue, New Rectangle(r.X + r.Width * j, r.Y + r.Height * i, r.Width, r.Height))))
BlockTexturesTemp.Add(AnimationNames(n) & "_" & (j + columns(n) * i).ToString, TextureManager.GetTexture(AdditionalValue, New Rectangle(r.X + r.Width * j, r.Y + r.Height * i, r.Width, r.Height))) Else
BlockTexturesTemp.Add(AnimationNames(n) & "_" & (j + columns(n) * i).ToString, TextureManager.GetTexture(AdditionalValue, New Rectangle(r.X + r.Width * j, r.Y + r.Height * i, r.Width, r.Height)))
End If
End If End If
Next Next
Next Next
End If End If