From 478549283688a1f2b00941be6a53a265dde5eb37 Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Sun, 18 Sep 2022 21:01:34 +0200 Subject: [PATCH] AnimationBlocks now support SeasonTextures --- P3D/Entites/Enviroment/AnimatedBlock.vb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/P3D/Entites/Enviroment/AnimatedBlock.vb b/P3D/Entites/Enviroment/AnimatedBlock.vb index d4ab4b2a3..b09fc41f9 100644 --- a/P3D/Entites/Enviroment/AnimatedBlock.vb +++ b/P3D/Entites/Enviroment/AnimatedBlock.vb @@ -69,7 +69,12 @@ If BlockTexturesTemp.ContainsKey(AnimationNames(n) & "_0") = False Then For i = 0 To Me.rows(n) - 1 For j = 0 To Me.columns(n) - 1 - 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))) + 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)))) + 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 + Next Next End If