mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-27 15:54:25 +02:00
Fix Animatedblock not updating with seasons
This commit is contained in:
parent
f7fd221ce9
commit
3d44bf61f3
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
Shared BlockTexturesTemp As New Dictionary(Of String, Texture2D)
|
Shared BlockTexturesTemp As New Dictionary(Of String, Texture2D)
|
||||||
|
|
||||||
|
Dim CurrentSeason As World.Seasons
|
||||||
Dim AnimationNames As List(Of String)
|
Dim AnimationNames As List(Of String)
|
||||||
|
|
||||||
Dim Animations As List(Of Animation)
|
Dim Animations As List(Of Animation)
|
||||||
@ -70,6 +70,7 @@
|
|||||||
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 SeasonColorTexture <> "" Then
|
||||||
|
CurrentSeason = P3D.World.CurrentSeason
|
||||||
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, 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))))
|
||||||
Else
|
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)))
|
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)))
|
||||||
@ -193,6 +194,10 @@
|
|||||||
ClearAnimationResources()
|
ClearAnimationResources()
|
||||||
CreateBlockTextureTemp()
|
CreateBlockTextureTemp()
|
||||||
End If
|
End If
|
||||||
|
If Me.CurrentSeason <> P3D.World.CurrentSeason Then
|
||||||
|
ClearAnimationResources()
|
||||||
|
CreateBlockTextureTemp()
|
||||||
|
End If
|
||||||
If Not Animations Is Nothing Then
|
If Not Animations Is Nothing Then
|
||||||
Dim i = Animations(n).CurrentRow
|
Dim i = Animations(n).CurrentRow
|
||||||
Dim j = Animations(n).CurrentColumn
|
Dim j = Animations(n).CurrentColumn
|
||||||
|
Loading…
x
Reference in New Issue
Block a user