mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-27 15:54:25 +02:00
Fix water textures not rotating on fast graphics
This commit is contained in:
parent
fef6b689ea
commit
d516a1e152
@ -15,6 +15,7 @@
|
|||||||
WaterAnimation = New Animation(TextureManager.GetTexture("Textures\Routes"), 1, 3, 16, 16, GameModeManager.ActiveGameMode.WaterSpeed, 15, 0)
|
WaterAnimation = New Animation(TextureManager.GetTexture("Textures\Routes"), 1, 3, 16, 16, GameModeManager.ActiveGameMode.WaterSpeed, 15, 0)
|
||||||
|
|
||||||
CreateWaterTextureTemp()
|
CreateWaterTextureTemp()
|
||||||
|
ChangeTexture()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Shared Sub ClearAnimationResources()
|
Public Shared Sub ClearAnimationResources()
|
||||||
@ -195,6 +196,7 @@
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Overrides Sub UpdateEntity()
|
Public Overrides Sub UpdateEntity()
|
||||||
|
If Core.GameOptions.GraphicStyle = 1 Then
|
||||||
If Not WaterAnimation Is Nothing Then
|
If Not WaterAnimation Is Nothing Then
|
||||||
WaterAnimation.Update(0.005)
|
WaterAnimation.Update(0.005)
|
||||||
If currentRectangle <> WaterAnimation.TextureRectangle Then
|
If currentRectangle <> WaterAnimation.TextureRectangle Then
|
||||||
@ -203,12 +205,11 @@
|
|||||||
currentRectangle = WaterAnimation.TextureRectangle
|
currentRectangle = WaterAnimation.TextureRectangle
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
MyBase.UpdateEntity()
|
MyBase.UpdateEntity()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ChangeTexture()
|
Private Sub ChangeTexture()
|
||||||
If Core.GameOptions.GraphicStyle = 1 Then
|
|
||||||
If WaterTexturesTemp.Count = 0 OrElse Water.WaterTexturesTemp.ContainsKey("_0") = False OrElse Water.WaterTexturesTemp.ContainsKey(AdditionalValue & "_0") = False Then
|
If WaterTexturesTemp.Count = 0 OrElse Water.WaterTexturesTemp.ContainsKey("_0") = False OrElse Water.WaterTexturesTemp.ContainsKey(AdditionalValue & "_0") = False Then
|
||||||
ClearAnimationResources()
|
ClearAnimationResources()
|
||||||
AddDefaultWaterAnimationResources()
|
AddDefaultWaterAnimationResources()
|
||||||
@ -253,7 +254,6 @@
|
|||||||
Me.Textures(0) = Water.WaterTexturesTemp(waterTextureName & "_11")
|
Me.Textures(0) = Water.WaterTexturesTemp(waterTextureName & "_11")
|
||||||
End Select
|
End Select
|
||||||
End Select
|
End Select
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub ResultFunction(ByVal Result As Integer)
|
Public Overrides Sub ResultFunction(ByVal Result As Integer)
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
WaterAnimation = New Animation(TextureManager.GetTexture("Textures\Routes"), 1, 3, 16, 16, 9, 13, 0)
|
WaterAnimation = New Animation(TextureManager.GetTexture("Textures\Routes"), 1, 3, 16, 16, 9, 13, 0)
|
||||||
|
|
||||||
CreateWaterTextureTemp()
|
CreateWaterTextureTemp()
|
||||||
|
ChangeTexture()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CreateWaterTextureTemp()
|
Private Sub CreateWaterTextureTemp()
|
||||||
@ -116,6 +117,8 @@
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub UpdateEntity()
|
Public Overrides Sub UpdateEntity()
|
||||||
|
|
||||||
|
If Core.GameOptions.GraphicStyle = 1 Then
|
||||||
If Not WaterAnimation Is Nothing Then
|
If Not WaterAnimation Is Nothing Then
|
||||||
WaterAnimation.Update(0.01)
|
WaterAnimation.Update(0.01)
|
||||||
If currentRectangle <> WaterAnimation.TextureRectangle Then
|
If currentRectangle <> WaterAnimation.TextureRectangle Then
|
||||||
@ -124,12 +127,12 @@
|
|||||||
currentRectangle = WaterAnimation.TextureRectangle
|
currentRectangle = WaterAnimation.TextureRectangle
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
MyBase.UpdateEntity()
|
MyBase.UpdateEntity()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ChangeTexture()
|
Private Sub ChangeTexture()
|
||||||
If Core.GameOptions.GraphicStyle = 1 Then
|
|
||||||
If WaterfallTexturesTemp.Count = 0 Or WaterTexturesTemp.Count = 0 OrElse Waterfall.WaterTexturesTemp.ContainsKey("_0") = False OrElse Waterfall.WaterTexturesTemp.ContainsKey(AdditionalValue & "_0") = False Then
|
If WaterfallTexturesTemp.Count = 0 Or WaterTexturesTemp.Count = 0 OrElse Waterfall.WaterTexturesTemp.ContainsKey("_0") = False OrElse Waterfall.WaterTexturesTemp.ContainsKey(AdditionalValue & "_0") = False Then
|
||||||
ClearAnimationResources()
|
ClearAnimationResources()
|
||||||
AddDefaultWaterAnimationResources()
|
AddDefaultWaterAnimationResources()
|
||||||
@ -182,7 +185,6 @@
|
|||||||
Me.Textures(1) = Waterfall.WaterTexturesTemp(waterTextureName & "_11")
|
Me.Textures(1) = Waterfall.WaterTexturesTemp(waterTextureName & "_11")
|
||||||
End Select
|
End Select
|
||||||
End Select
|
End Select
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub Render()
|
Public Overrides Sub Render()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user