From fb63697ebdf8bc066f423f5fc3245f6867378caa Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Mon, 5 Jun 2023 17:29:17 +0200 Subject: [PATCH] Fixed freeze --- P3D/Entites/Enviroment/Water.vb | 3 ++- P3D/Entites/Enviroment/Waterfall.vb | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/P3D/Entites/Enviroment/Water.vb b/P3D/Entites/Enviroment/Water.vb index 08e90f5c9..7fb4cea4a 100644 --- a/P3D/Entites/Enviroment/Water.vb +++ b/P3D/Entites/Enviroment/Water.vb @@ -212,8 +212,9 @@ Private Sub ChangeTexture() If Core.GameOptions.GraphicStyle = 1 Then - If WaterTexturesTemp.Count = 0 OrElse Water.WaterTexturesTemp.ContainsKey("_0") = False Then + If WaterTexturesTemp.Count = 0 OrElse Water.WaterTexturesTemp.ContainsKey("_0") = False OrElse Water.WaterTexturesTemp.ContainsKey(AdditionalValue & "_0") = False Then ClearAnimationResources() + AddDefaultWaterAnimationResources() CreateWaterTextureTemp() End If diff --git a/P3D/Entites/Enviroment/Waterfall.vb b/P3D/Entites/Enviroment/Waterfall.vb index 52ccd1fcd..b711bfd27 100644 --- a/P3D/Entites/Enviroment/Waterfall.vb +++ b/P3D/Entites/Enviroment/Waterfall.vb @@ -132,8 +132,13 @@ Private Sub ChangeTexture() If Core.GameOptions.GraphicStyle = 1 Then - If WaterfallTexturesTemp.Count = 0 Or WaterTexturesTemp.Count = 0 Then + If WaterfallTexturesTemp.Count = 0 Or WaterTexturesTemp.Count = 0 OrElse Waterfall.WaterTexturesTemp.ContainsKey("_0") = False OrElse Waterfall.WaterTexturesTemp.ContainsKey(AdditionalValue & "_0") = False Then + ClearAnimationResources() + AddDefaultWaterAnimationResources() + CreateWaterTextureTemp() + End If + ClearAnimationResources() CreateWaterTextureTemp() End If