mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-04-08 18:35:09 +02:00
Fanta's transparent draw fix?
This commit is contained in:
parent
bbc42d1087
commit
ffd3329a5c
2.5DHero/2.5DHero/Entites/Other
@ -448,6 +448,10 @@
|
||||
MyBase.Update()
|
||||
End Sub
|
||||
|
||||
Protected Overrides Function CalculateCameraDistance(CPosition As Vector3) as Single
|
||||
Return MyBase.CalculateCameraDistance(CPosition) + 0.2f
|
||||
End Function
|
||||
|
||||
Public Overrides Sub UpdateEntity()
|
||||
If Me.Rotation.Y <> Screen.Camera.Yaw Then
|
||||
Me.Rotation.Y = Screen.Camera.Yaw
|
||||
@ -457,7 +461,10 @@
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub Render()
|
||||
Me.Draw(Me.Model, Textures, True)
|
||||
Dim state = GraphicsDevice.DepthStencilState
|
||||
GraphicsDevice.DepthStencilState = DepthStencilState.DepthRead
|
||||
Draw(Me.Model, Me.Textures, True)
|
||||
GraphicsDevice.DepthStencilState = state
|
||||
End Sub
|
||||
|
||||
#Region "Movement and Camera"
|
||||
|
@ -200,6 +200,10 @@
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Overrides Function CalculateCameraDistance(CPosition As Vector3) as Single
|
||||
Return MyBase.CalculateCameraDistance(CPosition) + 0.2f
|
||||
End Function
|
||||
|
||||
Public Overrides Sub UpdateEntity()
|
||||
If Me.Rotation.Y <> Screen.Camera.Yaw Then
|
||||
Me.Rotation.Y = Screen.Camera.Yaw
|
||||
@ -240,7 +244,10 @@
|
||||
Me.Draw(Me.Model, Textures, False)
|
||||
If Core.GameOptions.ShowGUI = True Then
|
||||
If Me.NameTexture IsNot Nothing Then
|
||||
Me.Draw(BaseModel.BillModel, {Me.NameTexture}, False)
|
||||
Dim state = GraphicsDevice.DepthStencilState
|
||||
GraphicsDevice.DepthStencilState = DepthStencilState.DepthRead
|
||||
Draw(BaseModel.BillModel, {Me.NameTexture}, False)
|
||||
GraphicsDevice.DepthStencilState = state
|
||||
End If
|
||||
If Me.BusyType <> "0" Then
|
||||
RenderBubble()
|
||||
|
@ -31,6 +31,10 @@
|
||||
Me.DropUpdateUnlessDrawn = False
|
||||
End Sub
|
||||
|
||||
Protected Overrides Function CalculateCameraDistance(CPosition As Vector3) as Single
|
||||
Return MyBase.CalculateCameraDistance(CPosition) + 0.2f
|
||||
End Function
|
||||
|
||||
Public Overrides Sub UpdateEntity()
|
||||
If Me.Rotation.Y <> Screen.Camera.Yaw Then
|
||||
Me.Rotation.Y = Screen.Camera.Yaw
|
||||
@ -66,7 +70,10 @@
|
||||
If IsCorrectScreen() = True Then
|
||||
If Me.PokemonTexture <> "" Then
|
||||
If Not Me.Textures Is Nothing Then
|
||||
Me.Draw(Me.Model, {Me.Textures(0)}, False)
|
||||
Dim state = GraphicsDevice.DepthStencilState
|
||||
GraphicsDevice.DepthStencilState = DepthStencilState.DepthRead
|
||||
Draw(Me.Model, {Me.Textures(0)}, False)
|
||||
GraphicsDevice.DepthStencilState = state
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
@ -97,6 +97,10 @@ Public Class OverworldPokemon
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Overrides Function CalculateCameraDistance(CPosition As Vector3) as Single
|
||||
Return MyBase.CalculateCameraDistance(CPosition) + 0.2f
|
||||
End Function
|
||||
|
||||
Public Overrides Sub UpdateEntity()
|
||||
If Me.Rotation.Y <> Screen.Camera.Yaw Then
|
||||
Me.Rotation.Y = Screen.Camera.Yaw
|
||||
@ -109,7 +113,10 @@ Public Class OverworldPokemon
|
||||
|
||||
Public Overrides Sub Render()
|
||||
If Me.IsVisible() = True Then
|
||||
Me.Draw(Me.Model, {Me.Textures(0)}, False)
|
||||
Dim state = GraphicsDevice.DepthStencilState
|
||||
GraphicsDevice.DepthStencilState = DepthStencilState.None
|
||||
Draw(Me.Model, {Me.Textures(0)}, False)
|
||||
GraphicsDevice.DepthStencilState = state
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
@ -71,12 +71,16 @@
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Overrides Function CalculateCameraDistance(CPosition As Vector3) as Single
|
||||
Return MyBase.CalculateCameraDistance(CPosition) + 0.2f
|
||||
End Function
|
||||
|
||||
Public Overrides Sub UpdateEntity()
|
||||
If Not Core.CurrentScreen Is Nothing Then
|
||||
If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
|
||||
If Screen.Camera.Name = "Overworld" Then
|
||||
Dim c As OverworldCamera = CType(Screen.Camera, OverworldCamera)
|
||||
Me.Position = New Vector3(c.Position.X + 0.01F, c.Position.Y - 0.1F, c.Position.Z + 0.01F)
|
||||
Me.Position = New Vector3(c.Position.X, c.Position.Y - 0.1F, c.Position.Z)
|
||||
End If
|
||||
End If
|
||||
If Me.Rotation.Y <> Screen.Camera.Yaw Then
|
||||
@ -176,7 +180,10 @@
|
||||
|
||||
Public Overrides Sub Render()
|
||||
If InCameraFocus() = True Then
|
||||
Dim state = GraphicsDevice.DepthStencilState
|
||||
GraphicsDevice.DepthStencilState = DepthStencilState.DepthRead
|
||||
Draw(Me.Model, Me.Textures, True)
|
||||
GraphicsDevice.DepthStencilState = state
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
@ -88,7 +88,7 @@
|
||||
End Sub
|
||||
|
||||
Protected Overrides Function CalculateCameraDistance(CPosition As Vector3) as Single
|
||||
Return MyBase.CalculateCameraDistance(CPosition) - 1000000
|
||||
Return MyBase.CalculateCameraDistance(CPosition) - 1000000f
|
||||
End Function
|
||||
|
||||
Public Overrides Sub UpdateEntity()
|
||||
|
Loading…
x
Reference in New Issue
Block a user