Changed a bit again particle drawing fix

This commit is contained in:
Aragas 2016-09-25 16:36:36 +03:00
parent 4595c78d8e
commit 71dcadc45a
2 changed files with 9 additions and 5 deletions

View File

@ -355,6 +355,10 @@
Return Me.Position + Me.GetCenter()
End Function
Protected Overridable Function CalculateCameraDistance(CPosition As Vector3) as Single
Return Vector3.Distance(Me.GetCameraDistanceCenterPoint(), CPosition)
End Function
Public Overridable Sub UpdateEntity()
Dim CPosition As Vector3 = Screen.Camera.Position
Dim ActionScriptActive As Boolean = False
@ -371,12 +375,8 @@
End If
End If
If Me.GetType = GetType(Particle)
CameraDistance = Vector3.Distance(Me.GetCameraDistanceCenterPoint(), CPosition) - 1000000
Else
CameraDistance = Vector3.Distance(Me.GetCameraDistanceCenterPoint(), CPosition)
End If
CameraDistance = CalculateCameraDistance(CPosition)
If Me.DropUpdateUnlessDrawn = True And Me.DrawnLastFrame = False And Me.Visible = True And ActionScriptActive = False Then

View File

@ -87,6 +87,10 @@
End Select
End Sub
Protected Overrides Function CalculateCameraDistance(CPosition As Vector3) as Single
Return Vector3.Distance(Me.GetCameraDistanceCenterPoint(), CPosition) - 1000000
End Function
Public Overrides Sub UpdateEntity()
If Me.Rotation.Y <> Screen.Camera.Yaw Then
Me.Rotation.Y = Screen.Camera.Yaw