Maybe this'll prevent animatedblock crash

This commit is contained in:
JappaWakka 2022-07-24 10:45:18 +02:00
parent 2dd64aa7be
commit eb69a8ee5b
1 changed files with 6 additions and 8 deletions

View File

@ -184,19 +184,17 @@
End Sub
Private Sub ChangeTexture(ByVal n As Integer)
'If Core.GameOptions.GraphicStyle = 1 Then
If BlockTexturesTemp.Count = 0 Then
ClearAnimationResources()
CreateBlockTextureTemp()
End If
Dim i = Animations(n).CurrentRow
Dim j = Animations(n).CurrentColumn
If BlockTexturesTemp.ContainsKey(AnimationNames(n) & "_" & (j + columns(n) * i)) = True Then
Me.Textures(n) = BlockTexturesTemp(AnimationNames(n) & "_" & (j + columns(n) * i))
If Not Animations Is Nothing Then
Dim i = Animations(n).CurrentRow
Dim j = Animations(n).CurrentColumn
If BlockTexturesTemp.ContainsKey(AnimationNames(n) & "_" & (j + columns(n) * i)) = True Then
Me.Textures(n) = BlockTexturesTemp(AnimationNames(n) & "_" & (j + columns(n) * i))
End If
End If
'End If
End Sub
Public Overrides Sub ResultFunction(ByVal Result As Integer)